Opened 3 years ago

Closed 3 years ago

#9026 closed defect (fixed)

Invalid data found when processing a gphoto2 video that used to work earlier

Reported by: fairlix Owned by:
Priority: important Component: avformat
Version: git-master Keywords: mjpeg regression
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: yes

Description

Summary of the bug:
FFmpeg used to be able to direct a video stream from gphoto2 to v4l2.
Now the videostream from gphoto2 that originates from a Canon camera causes FFmpeg to fail.

I have directed the video stream into a file. While mplayer can play this file, ffmpeg fails.
I intend to provide this video file.

Please let me know if I can provide further information or test something.

The minimal way to reproduce:

% ffmpeg -i canon-camera-gphoto2-video.mjpg
ffmpeg version n4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 10.1.0 (GCC)
  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-avisynth --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmfx --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librav1e --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-nvdec --enable-nvenc --enable-omx --enable-shared --enable-version3
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument '9'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument '99'.
Reading option '-i' ... matched as input url with argument 'movie.mjpg'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument 9.
Successfully parsed a group of options.
Parsing a group of options: input url movie.mjpg.
Successfully parsed a group of options.
Opening an input file: movie.mjpg.
[NULL @ 0x5608f9be1b40] Opening 'movie.mjpg' for reading
[file @ 0x5608f9be2600] Setting default whitelist 'file,crypto,data'
Probing jpeg_pipe score:25 size:2048
Probing jpeg_pipe score:25 size:4096
Probing jpeg_pipe score:25 size:8192
Probing jpeg_pipe score:25 size:16384
Probing jpeg_pipe score:25 size:32768
Probing jpeg_pipe score:25 size:65536
Probing jpeg_pipe score:25 size:131072
Probing jpeg_pipe score:25 size:262144
Probing jpeg_pipe score:25 size:524288
[AVIOContext @ 0x5608f9bea9c0] Statistics: 1048576 bytes read, 0 seeks
movie.mjpg: Invalid data found when processing input

Attachments (1)

canon-camera-gphoto2-video.mjpg (2.4 MB ) - added by fairlix 3 years ago.
video from gphoto2 from a Canon camera

Change History (3)

by fairlix, 3 years ago

video from gphoto2 from a Canon camera

comment:1 by Carl Eugen Hoyos, 3 years ago

Analyzed by developer: set
Component: undeterminedavformat
Keywords: mjpeg regression added; AVIOContext removed
Priority: normalimportant
Reproduced by developer: set
Status: newopen
Version: unspecifiedgit-master

The (low resolution) mjpeg frames are so big (612016 bytes) that two frames will never be probed.

Patch sent.

comment:2 by Carl Eugen Hoyos, 3 years ago

Resolution: fixed
Status: openclosed

Should be fixed in 7ab5192260c387a10998481fe1468f1304f6ebd2, thank you for the report!

Note: See TracTickets for help on using tickets.