Opened 6 months ago

Closed 6 months ago

#7125 closed defect (fixed)

ffmpeg not identifying jpeg without extension

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

Description

Summary of the bug:

The latest version of ffmpeg does not identify the attached jpeg as a jpeg when passed as an argument without extension. A build of ffmpeg from homebrew works fine.

How to reproduce:

twiggy:FFmpeg-official bjorn$ ./ffmpeg -i /Users/bjorn/Downloads/chex out.gif
ffmpeg version N-90612-g2f27370111 Copyright (c) 2000-2018 the FFmpeg developers
  built with Apple LLVM version 9.0.0 (clang-900.0.39.2)
  configuration: --prefix=/usr/local --enable-gpl --enable-nonfree --enable-libass --enable-libvpx --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libopus --enable-libxvid --samples=../fate-suite/
  libavutil      56. 13.100 / 56. 13.100
  libavcodec     58. 17.100 / 58. 17.100
  libavformat    58. 10.100 / 58. 10.100
  libavdevice    58.  2.100 / 58.  2.100
  libavfilter     7. 14.100 /  7. 14.100
  libswscale      5.  0.102 /  5.  0.102
  libswresample   3.  0.101 /  3.  0.101
  libpostproc    55.  0.100 / 55.  0.100
[amrnb @ 0x7f86f3001200] Estimating duration from bitrate, this may be inaccurate
Input #0, amrnb, from '/Users/bjorn/Downloads/chex':
  Duration: 00:41:39.14, bitrate: 3 kb/s
    Stream #0:0: Audio: amr_nb, 8000 Hz, mono, flt
Output #0, gif, to 'out.gif':
Output file #0 does not contain any stream

homebrew (custom build options) 3.4.2 works fine, albeit with a warning:

ffmpeg version 3.4.2 Copyright (c) 2000-2018 the FFmpeg developers
  built with Apple LLVM version 9.0.0 (clang-900.0.39.2)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/3.4.2 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --disable-jack --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfontconfig --enable-libfreetype --enable-libmp3lame --enable-librtmp --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-opencl --enable-videotoolbox --enable-openssl --disable-lzma --enable-libopenjpeg --disable-decoder=jpeg2000 --extra-cflags=-I/usr/local/Cellar/openjpeg/2.3.0/include/openjpeg-2.3 --enable-nonfree
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libavresample   3.  7.  0 /  3.  7.  0
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
[jpeg_pipe @ 0x7fe116805e00] Format jpeg_pipe detected only with low score of 25, misdetection possible!
Input #0, jpeg_pipe, from '/Users/bjorn/Downloads/chex':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 7880x7880 [SAR 788:788 DAR 1:1], 25 tbr, 25 tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (mjpeg (native) -> gif (native))
Press [q] to stop, [?] for help
[swscaler @ 0x7fe116816400] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 0x7fe116816400] No accelerated colorspace conversion found from yuv420p to bgr8.
Output #0, gif, to 'out.gif':
  Metadata:
    encoder         : Lavf57.83.100
    Stream #0:0: Video: gif, bgr8, 7880x7880 [SAR 1:1 DAR 1:1], q=2-31, 200 kb/s, 25 fps, 100 tbn, 25 tbc
    Metadata:
      encoder         : Lavc57.107.100 gif
frame=    1 fps=0.0 q=-0.0 Lsize=     636kB time=00:00:00.01 bitrate=521400.8kbits/s speed=0.0122x    
video:636kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.124281%

Attachments (2)

chex.jpg (1.1 MB) - added by bjorn 6 months ago.
this file is detected as jpg and read fine from ffmpeg as long as it has an extension.
chex (1.1 MB) - added by bjorn 6 months ago.
here is the same file without an extension

Change History (4)

Changed 6 months ago by bjorn

this file is detected as jpg and read fine from ffmpeg as long as it has an extension.

comment:1 Changed 6 months ago by cehoyos

  • Component changed from undetermined to avformat
  • Keywords mjpeg amr probe regression added
  • Priority changed from normal to important
  • Reproduced by developer set
  • Status changed from new to open

(Why did you attach the file with the correct extension?)

Thank you for the sample, patch sent.

Changed 6 months ago by bjorn

here is the same file without an extension

comment:2 Changed 6 months ago by cehoyos

  • Resolution set to fixed
  • Status changed from open to closed

Fixed in 233f52fd2534e6844fd5831e3a6c7ca3a1c8fc2d, thanks again for your report.

Note: See TracTickets for help on using tickets.