Opened 4 years ago

Last modified 3 years ago

#8759 new defect

ffmpeg generated Photo-JPEG QuickTime with yuvj422p won't play in QT on macOS Catalina/BigSur (10.15+)

Reported by: Dyami Caliri Owned by:
Priority: normal Component: avcodec
Version: git-master Keywords: mjpeg
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:

Our software uses ffmpeg to generate PhotoJPEG QuickTime movies via the 'mjpeg' codec, with pixel format yuvj422p.

As of macOS 10.15 (Catalina), these generated movie files do not play in QuickTime.

Catalina still supports the Photo-JPEG codec, and can play QuickTime-generated Photo-JPEG movies with the yuvj422p pixel format.

However, files of the same format created with ffmpeg no longer work.

Interestingly, if you use the default pixel format, yuvj420p, the movie file will work with QuickTime on Catalina.

How to reproduce:

% ffmpeg -i anymovie.mov -c:v mjpeg -pix_fmt yuvj422p output_yuvj422p.mov

ffmpeg version 4.3 Copyright (c) 2000-2020 the FFmpeg developers
  built with Apple clang version 11.0.0 (clang-1100.0.33.17)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.3_1 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --disable-libjack --disable-indev=jack
  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
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

built on macOS 10.14.5 via homebrew

We witnessed this behavior with ffmpeg versions going back to 3.2.2, so it is not a regression.

Attachments (3)

qt_photojpeg.mov (1.4 MB ) - added by Dyami Caliri 4 years ago.
QT generated PhotoJPEG movie
ffmpeg_photojpeg.mov (1.2 MB ) - added by Dyami Caliri 4 years ago.
FFmpeg generated PhotoJPEG file
ffmpeg_photojpeg2_mjpegadump.mov (1.2 MB ) - added by Dyami Caliri 4 years ago.
ffmpeg with mjpegadump bitstream filter

Change History (8)

in reply to:  description comment:1 by Carl Eugen Hoyos, 4 years ago

Component: avcodecundetermined
Version: 4.2unspecified

Replying to dyamized:

Our software uses ffmpeg to generate PhotoJPEG QuickTime movies via the 'mjpeg' codec, with pixel format yuvj422p.

As of macOS 10.15 (Catalina), these generated movie files do not play in QuickTime.

Then why are you reporting an issue on this bug tracker? We cannot fix QuickTime...

Please test current FFmpeg git head and provide the command line - using testsrc2 as input - you tested together with the complete, uncut console output to make this a valid ticket.
And please attach a short file that works with QuickTime.

by Dyami Caliri, 4 years ago

Attachment: qt_photojpeg.mov added

QT generated PhotoJPEG movie

by Dyami Caliri, 4 years ago

Attachment: ffmpeg_photojpeg.mov added

FFmpeg generated PhotoJPEG file

comment:2 by Dyami Caliri, 4 years ago

Then why are you reporting an issue on this bug tracker? We cannot fix QuickTime...

I thought you might want FFmpeg to produce Photo-JPEG files that are compatible with QuickTime on macOS 10.15+. Apple is unlikely to issue patches to support FFmpeg.

I've attached the samples you requested.

Dyamis-MacBook-Pro-2:Desktop dyamicaliri$ /Users/dyamicaliri/ffmpegmaster/bin/ffmpeg -i testsrc2.mp4 -c:v mjpeg -pix_fmt yuvj422p -qscale:v 5 ffmpeg_photojpeg.mov
ffmpeg version 4.3.git Copyright (c) 2000-2020 the FFmpeg developers
  built with Apple clang version 11.0.0 (clang-1100.0.33.16)
  configuration: --prefix=/Users/dyamicaliri/ffmpegmaster
  libavutil      56. 55.100 / 56. 55.100
  libavcodec     58. 93.100 / 58. 93.100
  libavformat    58. 47.100 / 58. 47.100
  libavdevice    58. 11.100 / 58. 11.100
  libavfilter     7. 86.100 /  7. 86.100
  libswscale      5.  8.100 /  5.  8.100
  libswresample   3.  8.100 /  3.  8.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'testsrc2.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2mp41
    encoder         : Lavf58.47.100
  Duration: 00:00:01.00, start: 0.000000, bitrate: 2844 kb/s
    Stream #0:0(und): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 2836 kb/s, 30 fps, 30 tbr, 15360 tbn, 30 tbc (default)
    Metadata:
      handler_name    : VideoHandler
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg4 (native) -> mjpeg (native))
Press [q] to stop, [?] for help
[swscaler @ 0x10508b000] deprecated pixel format used, make sure you did set range correctly
Output #0, mov, to 'ffmpeg_photojpeg.mov':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2mp41
    encoder         : Lavf58.47.100
    Stream #0:0(und): Video: mjpeg (jpeg / 0x6765706A), yuvj422p(pc), 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 30 fps, 15360 tbn, 30 tbc (default)
    Metadata:
      handler_name    : VideoHandler
      encoder         : Lavc58.93.100 mjpeg
    Side data:
      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A
frame=   30 fps=0.0 q=5.0 Lsize=    1198kB time=00:00:00.96 bitrate=10150.2kbits/s speed=9.34x    
video:1197kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.071633%

comment:3 by mkver, 4 years ago

Please test the mjpegadump bitstream filter.

comment:4 by Dyami Caliri, 4 years ago

The output with the mjpegadump filter still does not play on macOS 10.15+.

Dyamis-MacBook-Pro-2:Desktop dyamicaliri$ /Users/dyamicaliri/ffmpegmaster/bin/ffmpeg -i testsrc2.mp4 -c:v mjpeg -pix_fmt yuvj422p -qscale:v 5 -bsf:v mjpegadump ffmpeg_photojpeg2_mjpegadump.mov
ffmpeg version 4.3.git Copyright (c) 2000-2020 the FFmpeg developers
  built with Apple clang version 11.0.0 (clang-1100.0.33.16)
  configuration: --prefix=/Users/dyamicaliri/ffmpegmaster
  libavutil      56. 55.100 / 56. 55.100
  libavcodec     58. 93.100 / 58. 93.100
  libavformat    58. 47.100 / 58. 47.100
  libavdevice    58. 11.100 / 58. 11.100
  libavfilter     7. 86.100 /  7. 86.100
  libswscale      5.  8.100 /  5.  8.100
  libswresample   3.  8.100 /  3.  8.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'testsrc2.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2mp41
    encoder         : Lavf58.47.100
  Duration: 00:00:01.00, start: 0.000000, bitrate: 2844 kb/s
    Stream #0:0(und): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 2836 kb/s, 30 fps, 30 tbr, 15360 tbn, 30 tbc (default)
    Metadata:
      handler_name    : VideoHandler
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg4 (native) -> mjpeg (native))
Press [q] to stop, [?] for help
[swscaler @ 0x112def000] deprecated pixel format used, make sure you did set range correctly
Output #0, mov, to 'ffmpeg_photojpeg2_mjpegadump.mov':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2mp41
    encoder         : Lavf58.47.100
    Stream #0:0(und): Video: mjpeg (jpeg / 0x6765706A), yuvj422p(pc), 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 30 fps, 15360 tbn, 30 tbc (default)
    Metadata:
      handler_name    : VideoHandler
      encoder         : Lavc58.93.100 mjpeg
    Side data:
      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A
frame=   30 fps=0.0 q=5.0 Lsize=    1199kB time=00:00:00.96 bitrate=10161.1kbits/s speed=8.74x    
video:1198kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.071556%

by Dyami Caliri, 4 years ago

ffmpeg with mjpegadump bitstream filter

comment:5 by Carl Eugen Hoyos, 3 years ago

Component: undeterminedavcodec
Keywords: mjpeg added
Version: unspecifiedgit-master

I suspect this is a duplicate of / depends on ticket #4709.

Note: See TracTickets for help on using tickets.