[FFmpeg-user] Conversion from mjpeg to H.264 with 2 overlays failed, trace gives me no idea why ...

Jens Berger jberger at gmx.net
Fri Feb 11 20:22:34 EET 2022


Many thanks for your comments.

I'm really sorry for '-hide_banner'!

I try it again with ffmpeg/ffprobe 5.0, downloaded minutes ago:

MacBook-Jens:test jb$ ./ffprobe -i ./test.mov
ffprobe version 5.0-tessus  https://evermeet.cx/ffmpeg/  Copyright (c)
2007-2022 the FFmpeg developers
   built with Apple clang version 11.0.0 (clang-1100.0.33.17)
   configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg
--extra-version=tessus --enable-avisynth --enable-fontconfig
--enable-gpl --enable-libaom --enable-libass --enable-libbluray
--enable-libdav1d --enable-libfreetype --enable-libgsm
--enable-libmodplug --enable-libmp3lame --enable-libmysofa
--enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-libopenh264 --enable-libopenjpeg --enable-libopus
--enable-librubberband --enable-libshine --enable-libsnappy
--enable-libsoxr --enable-libspeex --enable-libtheora
--enable-libtwolame --enable-libvidstab --enable-libvmaf
--enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
--enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs
--enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi
--enable-version3 --pkg-config-flags=--static --disable-ffplay
   libavutil      57. 17.100 / 57. 17.100
   libavcodec     59. 18.100 / 59. 18.100
   libavformat    59. 16.100 / 59. 16.100
   libavdevice    59.  4.100 / 59.  4.100
   libavfilter     8. 24.100 /  8. 24.100
   libswscale      6.  4.100 /  6.  4.100
   libswresample   4.  3.100 /  4.  3.100
   libpostproc    56.  3.100 / 56.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from './test.mov':
   Metadata:
     major_brand     : qt
     minor_version   : 537199360
     compatible_brands: qt
     creation_time   : 2022-02-11T09:25:31.000000Z
     com.apple.quicktime.player.movie.visual.brightness: 0.000000
     com.apple.quicktime.player.movie.visual.color: 1.000000
     com.apple.quicktime.player.movie.visual.tint: 0.000000
     com.apple.quicktime.player.movie.visual.contrast: 1.000000
     com.apple.quicktime.player.version: 7.6.6 (7.6.6)
     com.apple.quicktime.version: 7.7.3 (3040) 0x7738000 (Mac OS X,
10.14.6, 18G9323)
   Duration: 00:01:00.84, start: 0.000000, bitrate: 3630 kb/s
   Stream #0:0[0x2](eng): Video: mjpeg (Baseline) (jpeg / 0x6765706A),
yuvj422p(pc, bt470bg/unknown/unknown), 768x576, 3622 kb/s, 7.66 fps, 50
tbr, 600 tbn (default)
     Metadata:
       creation_time   : 2022-02-11T09:25:31.000000Z
       handler_name    : Apple Video Mediensteuerung
       vendor_id       : Bich
       encoder         : Acuson JPEG


The report log file:

ffmpeg started on 2022-02-11 at 19:12:07
Report written to "ffmpeg-20220211-191207.log"
Log level: 56
Command line:
./ffmpeg -y -xerror -thread_queue_size 1500 -loglevel trace -report
-framerate 7.66 -f mjpeg -i /Users/jb/test/test.mov -i
/Users/jb/test/768x576_0_mf.png -i /Users/jb/test/768x576_1_mf.png
-filter_complex
"[0:v]scale=trunc(iw/2)*2:trunc(ih/2)*2[bg];[1:v]setpts=PTS-STARTPTS[fg1];[2:v]setpts=PTS-STARTPTS[fg2];[bg][fg1]overlay=36:0[ol];[ol][fg2]overlay=4:557,format=yuvj420p[v]"
-map "[v]" -map 0 -pix_fmt yuvj420p -framerate 7.66 -c libx264 -f mp4
-crf 0 /Users/jb/test/test.mp4
ffmpeg version 5.0-tessus  https://evermeet.cx/ffmpeg/  Copyright (c)
2000-2022 the FFmpeg developers
   built with Apple clang version 11.0.0 (clang-1100.0.33.17)
   configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg
--extra-version=tessus --enable-avisynth --enable-fontconfig
--enable-gpl --enable-libaom --enable-libass --enable-libbluray
--enable-libdav1d --enable-libfreetype --enable-libgsm
--enable-libmodplug --enable-libmp3lame --enable-libmysofa
--enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-libopenh264 --enable-libopenjpeg --enable-libopus
--enable-librubberband --enable-libshine --enable-libsnappy
--enable-libsoxr --enable-libspeex --enable-libtheora
--enable-libtwolame --enable-libvidstab --enable-libvmaf
--enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
--enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs
--enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi
--enable-version3 --pkg-config-flags=--static --disable-ffplay
   libavutil      57. 17.100 / 57. 17.100
   libavcodec     59. 18.100 / 59. 18.100
   libavformat    59. 16.100 / 59. 16.100
   libavdevice    59.  4.100 / 59.  4.100
   libavfilter     8. 24.100 /  8. 24.100
   libswscale      6.  4.100 /  6.  4.100
   libswresample   4.  3.100 /  4.  3.100
   libpostproc    56.  3.100 / 56.  3.100
Splitting the commandline.
Reading option '-y' ... matched as option 'y' (overwrite output files)
with argument '1'.
Reading option '-xerror' ... matched as option 'xerror' (exit on error)
with argument '1'.
Reading option '-thread_queue_size' ... matched as option
'thread_queue_size' (set the maximum number of queued packets from the
demuxer) with argument '1500'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging
level) with argument 'trace'.
Reading option '-report' ... matched as option 'report' (generate a
report) with argument '1'.
Reading option '-framerate' ... matched as AVOption 'framerate' with
argument '7.66'.
Reading option '-f' ... matched as option 'f' (force format) with
argument 'mjpeg'.
Reading option '-i' ... matched as input url with argument
'/Users/jb/test/test.mov'.
Reading option '-i' ... matched as input url with argument
'/Users/jb/test/768x576_0_mf.png'.
Reading option '-i' ... matched as input url with argument
'/Users/jb/test/768x576_1_mf.png'.
Reading option '-filter_complex' ... matched as option 'filter_complex'
(create a complex filtergraph) with argument
'[0:v]scale=trunc(iw/2)*2:trunc(ih/2)*2[bg];[1:v]setpts=PTS-STARTPTS[fg1];[2:v]setpts=PTS-STARTPTS[fg2];[bg][fg1]overlay=36:0[ol];[ol][fg2]overlay=4:557,format=yuvj420p[v]'.
Reading option '-map' ... matched as option 'map' (set input stream
mapping) with argument '[v]'.
Reading option '-map' ... matched as option 'map' (set input stream
mapping) with argument '0'.
Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel
format) with argument 'yuvj420p'.
Reading option '-framerate' ... matched as AVOption 'framerate' with
argument '7.66'.
Reading option '-c' ... matched as option 'c' (codec name) with argument
'libx264'.
Reading option '-f' ... matched as option 'f' (force format) with
argument 'mp4'.
Reading option '-crf' ... matched as AVOption 'crf' with argument '0'.
Reading option '/Users/jb/test/test.mp4' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option y (overwrite output files) with argument 1.
Applying option xerror (exit on error) with argument 1.
Applying option loglevel (set logging level) with argument trace.
Applying option report (generate a report) with argument 1.
Applying option filter_complex (create a complex filtergraph) with
argument
[0:v]scale=trunc(iw/2)*2:trunc(ih/2)*2[bg];[1:v]setpts=PTS-STARTPTS[fg1];[2:v]setpts=PTS-STARTPTS[fg2];[bg][fg1]overlay=36:0[ol];[ol][fg2]overlay=4:557,format=yuvj420p[v].
Successfully parsed a group of options.
Parsing a group of options: input url /Users/jb/test/test.mov.
Applying option thread_queue_size (set the maximum number of queued
packets from the demuxer) with argument 1500.
Applying option f (force format) with argument mjpeg.
Successfully parsed a group of options.
Opening an input file: /Users/jb/test/test.mov.
[mjpeg @ 0x7f914b507300] Opening '/Users/jb/test/test.mov' for reading
[file @ 0x7f914b507780] Setting default whitelist 'file,crypto,data'
[mjpeg @ 0x7f914b507300] Before avformat_find_stream_info() pos: 0 bytes
read:32768 seeks:0 nb_streams:1
[mjpeg @ 0x7f914b507f80] marker=f7 avail_size_in_buf=116591
[mjpeg @ 0x7f914b507f80] Changing bps from 0 to 1
[mjpeg @ 0x7f914b507f80] sof0: picture: 258x28928
[mjpeg @ 0x7f914b507f80] marker=d8 avail_size_in_buf=57418
[mjpeg @ 0x7f914b507f80] marker parser used 0 bytes (0 bits)
[mjpeg @ 0x7f914b507f80] marker=db avail_size_in_buf=57416
[mjpeg @ 0x7f914b507f80] index=0
[mjpeg @ 0x7f914b507f80] qscale[0]: 3
[mjpeg @ 0x7f914b507f80] index=1
[mjpeg @ 0x7f914b507f80] qscale[1]: 4
[mjpeg @ 0x7f914b507f80] marker parser used 132 bytes (1056 bits)
[mjpeg @ 0x7f914b507f80] marker=c4 avail_size_in_buf=57282
[mjpeg @ 0x7f914b507f80] marker parser used 0 bytes (0 bits)
[mjpeg @ 0x7f914b507f80] marker=c0 avail_size_in_buf=56862
[mjpeg @ 0x7f914b507f80] Changing bps from 1 to 8
[mjpeg @ 0x7f914b507f80] sof0: picture: 768x576
[mjpeg @ 0x7f914b507f80] component 0 2:1 id: 0 quant:0
[mjpeg @ 0x7f914b507f80] component 1 1:1 id: 1 quant:1
[mjpeg @ 0x7f914b507f80] component 2 1:1 id: 2 quant:1
[mjpeg @ 0x7f914b507f80] pix fmt id 21111100
[mjpeg @ 0x7f914b507f80] Format yuvj422p chosen by get_format().
[mjpeg @ 0x7f914b507f80] marker parser used 17 bytes (136 bits)
[mjpeg @ 0x7f914b507f80] escaping removed 586 bytes
[mjpeg @ 0x7f914b507f80] marker=da avail_size_in_buf=56843
[mjpeg @ 0x7f914b507f80] marker parser used 56257 bytes (450056 bits)
[mjpeg @ 0x7f914b507f80] marker=d9 avail_size_in_buf=0
[mjpeg @ 0x7f914b507f80] decode frame unused 0 bytes
[mjpeg @ 0x7f914b507300] All info found
[mjpeg @ 0x7f914b507300] stream 0: start_time: NOPTS duration: NOPTS
[mjpeg @ 0x7f914b507300] format: start_time: NOPTS duration: NOPTS
(estimate from bit rate) bitrate=0 kb/s
[mjpeg @ 0x7f914b507300] After avformat_find_stream_info() pos: 177152
bytes read:196608 seeks:0 frames:2
Input #0, mjpeg, from '/Users/jb/test/test.mov':
   Duration: N/A, bitrate: N/A
   Stream #0:0, 2, 1/1200000: Video: mjpeg (Baseline), 1 reference
frame, yuvj422p(pc, bt470bg/unknown/unknown, center), 768x576, 0/1,
lossless, 7.66 tbr, 1200k tbn
Successfully opened the file.
Parsing a group of options: input url /Users/jb/test/768x576_0_mf.png.
Successfully parsed a group of options.
Opening an input file: /Users/jb/test/768x576_0_mf.png.
[NULL @ 0x7f914b404c80] Opening '/Users/jb/test/768x576_0_mf.png' for
reading
[file @ 0x7f914b40a000] Setting default whitelist 'file,crypto,data'
Probing image2 score:50 size:364
Probing mpegts score:2 size:364
Probing png_pipe score:99 size:364
[png_pipe @ 0x7f914b404c80] Format png_pipe probed with size=2048 and
score=99
[png_pipe @ 0x7f914b404c80] Before avformat_find_stream_info() pos: 0
bytes read:364 seeks:0 nb_streams:1
[png_pipe @ 0x7f914b404c80] stream 0: start_time: NOPTS duration: NOPTS
[png_pipe @ 0x7f914b404c80] format: start_time: NOPTS duration: NOPTS
(estimate from bit rate) bitrate=0 kb/s
[png_pipe @ 0x7f914b404c80] After avformat_find_stream_info() pos: 364
bytes read:364 seeks:0 frames:1
Input #1, png_pipe, from '/Users/jb/test/768x576_0_mf.png':
   Duration: N/A, bitrate: N/A
   Stream #1:0, 1, 1/25: Video: png, 1 reference frame, pal8(pc),
640x21, 0/1, 25 fps, 25 tbr, 25 tbn
Successfully opened the file.
Parsing a group of options: input url /Users/jb/test/768x576_1_mf.png.
Successfully parsed a group of options.
Opening an input file: /Users/jb/test/768x576_1_mf.png.
[NULL @ 0x7f914b40b200] Opening '/Users/jb/test/768x576_1_mf.png' for
reading
[file @ 0x7f914b404340] Setting default whitelist 'file,crypto,data'
Probing image2 score:50 size:374
Probing mp3 score:1 size:374
Probing mpegts score:2 size:374
Probing png_pipe score:99 size:374
[png_pipe @ 0x7f914b40b200] Format png_pipe probed with size=2048 and
score=99
[png_pipe @ 0x7f914b40b200] Before avformat_find_stream_info() pos: 0
bytes read:374 seeks:0 nb_streams:1
[png_pipe @ 0x7f914b40b200] stream 0: start_time: NOPTS duration: NOPTS
[png_pipe @ 0x7f914b40b200] format: start_time: NOPTS duration: NOPTS
(estimate from bit rate) bitrate=0 kb/s
[png_pipe @ 0x7f914b40b200] After avformat_find_stream_info() pos: 374
bytes read:374 seeks:0 frames:1
Input #2, png_pipe, from '/Users/jb/test/768x576_1_mf.png':
   Duration: N/A, bitrate: N/A
   Stream #2:0, 1, 1/25: Video: png, 1 reference frame, pal8(pc),
760x20, 0/1, 25 fps, 25 tbr, 25 tbn
Successfully opened the file.
[Parsed_scale_0 @ 0x7f914b40c900] Setting 'w' to value 'trunc(iw/2)*2'
[Parsed_scale_0 @ 0x7f914b40c900] Setting 'h' to value 'trunc(ih/2)*2'
[Parsed_scale_0 @ 0x7f914b40c900] w:trunc(iw/2)*2 h:trunc(ih/2)*2
flags:'' interl:0
[Parsed_setpts_1 @ 0x7f914b40d440] Setting 'expr' to value 'PTS-STARTPTS'
[Parsed_setpts_2 @ 0x7f914b40da00] Setting 'expr' to value 'PTS-STARTPTS'
[Parsed_overlay_3 @ 0x7f914b40df80] Setting 'x' to value '36'
[Parsed_overlay_3 @ 0x7f914b40df80] Setting 'y' to value '0'
[Parsed_overlay_4 @ 0x7f914b40c840] Setting 'x' to value '4'
[Parsed_overlay_4 @ 0x7f914b40c840] Setting 'y' to value '557'
[Parsed_format_5 @ 0x7f914b40ec40] Setting 'pix_fmts' to value 'yuvj420p'
Parsing a group of options: output url /Users/jb/test/test.mp4.
Applying option map (set input stream mapping) with argument [v].
Applying option map (set input stream mapping) with argument 0.
Applying option pix_fmt (set pixel format) with argument yuvj420p.
Applying option c (codec name) with argument libx264.
Applying option f (force format) with argument mp4.
Successfully parsed a group of options.
Opening an output file: /Users/jb/test/test.mp4.
[file @ 0x7f914b410180] Setting default whitelist 'file,crypto,data'
Successfully opened the file.
detected 8 logical cores
Stream mapping:
   Stream #0:0 (mjpeg) -> scale:default (graph 0)
   Stream #1:0 (png) -> setpts:default (graph 0)
   Stream #2:0 (png) -> setpts:default (graph 0)
   format:default (graph 0) -> Stream #0:0 (libx264)
   Stream #0:0 -> #0:1 (mjpeg (native) -> h264 (libx264))
Press [q] to stop, [?] for help
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless
if it occurs once at the start per stream)
[mjpeg @ 0x7f914b508540] marker=f7 avail_size_in_buf=116591
[mjpeg @ 0x7f914b508540] Changing bps from 8 to 1
[mjpeg @ 0x7f914b508540] sof0: picture: 258x28928
[AVIOContext @ 0x7f914b410340] Statistics: 0 bytes written, 0 seeks, 0
writeouts
[AVIOContext @ 0x7f914b507940] Statistics: 262144 bytes read, 0 seeks
[AVIOContext @ 0x7f914b403680] Statistics: 364 bytes read, 0 seeks
[AVIOContext @ 0x7f914b40a8c0] Statistics: 374 bytes read, 0 seeks
Conversion failed!

Many thanks for further suggestions,

Best regards,

Jens

Am 11.02.22 um 17:25 schrieb Carl Zwanzig:

> On 2/11/2022 6:39 AM, Jens Berger wrote:
>> This line seems to be weird to me, but I cannot find more about this
>> problem:
>>
>>  ï¿½ï¿½ï¿½ï¿½sof0: picture: 258x28928
>
> If that is trying to report the size of the picture, 28k is
> unrealistically large. Might be correct but...
>
>
>> Please - can somebody have a look on this problem?
>
> Two of the first rules of this list are to post the complete and
> unedited output of ffmpeg and to use the most current ffmpeg available,
> which may require downloading from from the ffmpeg.org site (for
> instance, the packages of some linux distributions lag months or years
> behind current). The latter probably has no effect here, but it's still
> a good idea.
>
> See https://ffmpeg.org/mailing-list-faq.html
>
> Late,r
>
> z!
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-user mailing list