[FFmpeg-user] Duration of an image (video) concatenated to another video

Ilia Katz ilia.katz at gmail.com
Sat Oct 23 15:53:35 EEST 2021


I am using the following command to concatenate a PNG image to a MP4 video.
Both are of 920 × 256 resolution.

ffmpeg -loop 1 -vsync 2 -t '20ms' -i '/path/to/image' -t '20ms' -f lavfi -i
aevalsrc=0 -i '/path/to/video' -filter_complex '[0:0] [1:0] [2:0] [2:1]
concat=n=2:v=1:a=1' -r 'ntsc-film' '/path/to/output_video'

Everything works well but I am unable to shorten the image display duration
below ~20ms.

*ffprobe of input image*
Input #0, png_pipe, from 'image.png':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: png, rgba(pc), 920x256 [SAR 2835:2835 DAR 115:32], 25
fps, 25 tbr, 25 tbn, 25 tbc


*ffprobe of input video*
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input_video.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
creation_time : 2021-09-10T06:22:46.000000Z
encoder : Lavf58.45.100
Duration: 00:00:04.16, start: 0.000000, bitrate: 452 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv,
bt709/bt709/unknown), 920x256 [SAR 1:1 DAR 115:32], 119 kb/s, 25 fps, 25
tbr, 12800 tbn, 25600 tbc (default)
Metadata:
creation_time : 2021-09-10T06:22:46.000000Z
handler_name : VideoHandler
vendor_id : [0][0][0][0]
timecode : 01:00:00:00
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo,
fltp, 319 kb/s (default)
Metadata:
creation_time : 2021-09-10T06:22:46.000000Z
handler_name : SoundHandler
vendor_id : [0][0][0][0]
Stream #0:2(eng): Data: none (tmcd / 0x64636D74), 0 kb/s
Metadata:
creation_time : 2021-09-10T06:22:46.000000Z
handler_name : TimeCodeHandler
timecode : 01:00:00:00
Unsupported codec with id 0 for input stream 2

When running the same command but with 10ms time, i.e.
ffmpeg -loop 1 -vsync 2 -t '10ms' -i '/path/to/image' -t '10ms' -f lavfi -i
aevalsrc=0 -i '/path/to/video' -filter_complex '[0:0] [1:0] [2:0] [2:1]
concat=n=2:v=1:a=1' -r 'ntsc-film' '/path/to/output_video'

ffmpeg is stuck in what seems to be an infinite loop of:

[mp4 @ 0x7fc0f483d600] Delay between the first packet and last packet in
the muxing queue is 10010000 > 10000000: forcing output
[libx264 @ 0x7fc0f483e800] frame=2027 QP=13.00 NAL=0 Slice:B Poc:50 I:0 P:0
SKIP:928 size=18 bytes
[mp4 @ 0x7fc0f483d600] Delay between the first packet and last packet in
the muxing queue is 10010000 > 10000000: forcing output
[libx264 @ 0x7fc0f483e800] frame=2028 QP=13.00 NAL=0 Slice:B Poc:54 I:0 P:0
SKIP:928 size=18 bytes
[mp4 @ 0x7fc0f483d600] Delay between the first packet and last packet in
the muxing queue is 10010000 > 10000000: forcing output
[libx264 @ 0x7fc0f483e800] frame=2029 QP=11.00 NAL=2 Slice:P Poc:64 I:0 P:0
SKIP:928 size=26 bytes
[mp4 @ 0x7fc0f483d600] Delay between the first packet and last packet in
the muxing queue is 10010000 > 10000000: forcing output
[libx264 @ 0x7fc0f483e800] frame=2030 QP=12.00 NAL=2 Slice:B Poc:60 I:0 P:0
SKIP:928 size=21 bytes
[mp4 @ 0x7fc0f483d600] Delay between the first packet and last packet in
the muxing queue is 10010000 > 10000000: forcing output
[libx264 @ 0x7fc0f483e800] frame=2031 QP=13.00 NAL=0 Slice:B Poc:58 I:0 P:0
SKIP:928 size=18 bytes
[mp4 @ 0x7fc0f483d600] Delay between the first packet and last packet in
the muxing queue is 10010000 > 10000000: forcing output
[libx264 @ 0x7fc0f483e800] frame=2032 QP=13.00 NAL=0 Slice:B Poc:62 I:0 P:0
SKIP:928 size=18 bytes
[mp4 @ 0x7fc0f483d600] Delay between the first packet and last packet in
the muxing queue is 10010000 > 10000000: forcing output
[libx264 @ 0x7fc0f483e800] frame=2033 QP=13.00 NAL=2 Slice:P Poc:68 I:0 P:0
SKIP:928 size=27 bytes
[mp4 @ 0x7fc0f483d600] Delay between the first packet and last packet in
the muxing queue is 10010000 > 10000000: forcing output
[libx264 @ 0x7fc0f483e800] frame=2034 QP=13.00 NAL=0 Slice:B Poc:66 I:0 P:0
SKIP:928 size=18 bytes
[mp4 @ 0x7fc0f483d600] Delay between the first packet and last packet in
the muxing queue is 10010000 > 10000000: forcing output

Any help will be appreciated.

Thanks


More information about the ffmpeg-user mailing list