Giter VIP home page Giter VIP logo

Comments (5)

aous72 avatar aous72 commented on May 23, 2024

Thank you for reporting this.

I am not familiar with ffprobe.

What commandline was used to generate test.j2c? and if possible, can I have access to test.j2c?

from openjph.

NEOAdvancedTechnology avatar NEOAdvancedTechnology commented on May 23, 2024

ffprobe is an ffmpeg app that gathers information from multimedia streams and prints it in human- and machine-readable fashion. https://ffmpeg.org/ffprobe.html

I made an artificial test image "bars.ppm", with HTJ2K encode file "bars.j2c", and decoded file "bars_out.ppm". ffprobe still says bars_out.ppm: Invalid data found when processing input

The files are in this repository: https://github.com/NEOAdvancedTechnology/htj2k_test_files

from openjph.

aous72 avatar aous72 commented on May 23, 2024

Thank you for the files. I had a look.

Next is a speculation.

I think this might be a bug in ffprobe.
I can open both bars.ppm and bars_out.ppm with IrfanView64 without any issues.

I think the difference that is causing the issue is related to how white spaces are interpreted.

bars.ppm:
ASCII code: 50 36 0a 31 32 38 30 20 37 32 30 0a 32 35 35 0a
ASCII char: P6.1280 720.255.

bars_out.ppm:
ASCII code: 50 36 20 31 32 38 30 20 37 32 30 20 32 35 35 0a
ASCII char: P6 1280 720 255.

Note the whitespace between P6 and 1280, and then again between 720 and 255. bars_out.ppm is using a space (0x20) while bars.ppm is using \newline (0x0a).

According to this document:
http://netpbm.sourceforge.net/doc/ppm.html
Any white space should be alright.

It is very easy to modify from my side, but ffprobe should have better support for the ppm format.

from openjph.

NEOAdvancedTechnology avatar NEOAdvancedTechnology commented on May 23, 2024

Indeed, I converted bars_out.ppm using ImageMagick to another ppm file, and it also has the 0x0a "." after the P6, which ffprobe/ffmpeg seems too be happier with.

from openjph.

aous72 avatar aous72 commented on May 23, 2024

I forgot to send this.

The version I have of ffprobe does not have this issue.

ffprobe version 4.1 Copyright (c) 2007-2018 the FFmpeg developers
  built with Apple LLVM version 10.0.0 (clang-1000.11.45.5)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1_1 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gpl --enable-libmp3lame --enable-libopus --enable-libsnappy --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-opencl --enable-videotoolbox
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100
Input #0, image2, from 'bars_out.ppm':
  Duration: 00:00:00.04, start: 0.000000, bitrate: 552963 kb/s
    Stream #0:0: Video: ppm, rgb24, 1280x720, 25 tbr, 25 tbn, 25 tbc

In any case, I am modifying the code to generate a header acceptable to the older version of ffprobe you are using. I think this is better.

from openjph.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.