Opened 3 years ago

Last modified 3 years ago

#4948 new defect

ffmpeg overlay not stitching videos in order of pts

Reported by: godivyam Owned by:
Priority: normal Component: avfilter
Version: git-master Keywords: overlay
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
How to reproduce:

% ffmpeg -i {rtmp stream} -i {rtmp stream} -filter_complex "[0:v:0]pad=iw*2:ih[bg]; [bg][1:v:0]overlay=w; amerge,pan=stereo:c0<c0+c2:c1<c1+c3" -f flv {rtmp stream}
ffmpeg version - N-76137-gb0bb1dc
built on trusty unix

Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.

Change History (6)

comment:1 Changed 3 years ago by godivyam

  • Summary changed from ffmpeg overlay not stitching videos in order of pst to ffmpeg overlay not stitching videos in order of pts

comment:2 Changed 3 years ago by godivyam

output :

ffmpeg -i rtmp://livestreamdev.my.tv:1935/LikesLiveShows/s50592289 -i rtmp://livestreamdev.my.tv:1935/LikesLiveShows/s50592289 -filter_complex "[0:v:0]pad=iw*2:ih[bg]; [bg][1:v:0]overlay=w; amerge,pan=stereo:c0<c0+c2:c1<c1+c3" -f flv rtmp://livestreamdev.my.tv:1935/hls/merged_mid

ffmpeg version N-76137-gb0bb1dc Copyright (c) 2000-2015 the FFmpeg developers

built with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
configuration: --prefix=/usr/local --bindir=/usr/local/bin --pkg-config-flags=--static --enable-gpl --enable-libass --enable-libfdk-aac --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --disable-static --enable-shared --enable-libspeex --enable-libfreetype
libavutil 55. 4.100 / 55. 4.100
libavcodec 57. 7.100 / 57. 7.100
libavformat 57. 8.102 / 57. 8.102
libavdevice 57. 0.100 / 57. 0.100
libavfilter 6. 12.100 / 6. 12.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.100 / 2. 0.100
libpostproc 54. 0.100 / 54. 0.100

[flv @ 0x187f5e0] audio stream discovered after head already parsed
Input #0, flv, from 'rtmp://livestreamdev.my.tv:1935/LikesLiveShows/s50592289':

Duration: N/A, start: 3387.899000, bitrate: N/A

Stream #0:0: Video: h264 (Baseline), yuv420p(tv), 320x480 [SAR 1:1 DAR 2:3], 30.30 fps, 30 tbr, 1k tbn, 60 tbc
Stream #0:1: Audio: nellymoser, 44100 Hz, mono, flt

[flv @ 0x18d3d80] audio stream discovered after head already parsed
Input #1, flv, from 'rtmp://livestreamdev.my.tv:1935/LikesLiveShows/s50592289':

Duration: N/A, start: 3389.942000, bitrate: N/A

Stream #1:0: Video: h264 (Baseline), yuv420p(tv), 320x480 [SAR 1:1 DAR 2:3], 30.30 fps, 30 tbr, 1k tbn, 60 tbc
Stream #1:1: Audio: nellymoser, 44100 Hz, mono, flt

[Parsed_pan_3 @ 0x18af940] This syntax is deprecated. Use '|' to separate the list items.
[Parsed_pan_3 @ 0x18dd4a0] This syntax is deprecated. Use '|' to separate the list items.
[Parsed_amerge_2 @ 0x18de1c0] No channel layout for input 1
[Parsed_amerge_2 @ 0x18de1c0] Input channel layouts overlap: output layout will be determined by the number of distinct input channels
[flv @ 0x18af200] removing common factors from framerate
Output #0, flv, to 'rtmp://livestreamdev.my.tv:1935/hls/merged_mid':

Metadata:

encoder : Lavf57.8.102
Stream #0:0: Video: flv1 (flv) ([2][0][0][0] / 0x0002), yuv420p, 640x480 [SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 30 fps, 1k tbn, 30 tbc (default)
Metadata:

encoder : Lavc57.7.100 flv

Stream #0:1: Audio: adpcm_swf ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 352 kb/s (default)
Metadata:

encoder : Lavc57.7.100 adpcm_swf

Stream mapping:

Stream #0:0 (h264) -> pad
Stream #0:1 (nellymoser) -> amerge:in0
Stream #1:0 (h264) -> overlay:overlay
Stream #1:1 (nellymoser) -> amerge:in1
overlay -> Stream #0:0 (flv)
pan -> Stream #0:1 (adpcm_swf)

Press [q] to stop, ? for help
[flv @ 0x187f5e0] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
[flv @ 0x18d3d80] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
Past duration 0.979988 too large
Past duration 0.919991 too large
Past duration 0.699989 too large 213kB time=00:00:01.97 bitrate= 884.1kbits/s
Past duration 0.709999 too large
Past duration 0.659996 too large
Past duration 0.639992 too large
Past duration 0.719994 too large 268kB time=00:00:02.53 bitrate= 866.0kbits/s dup=0 drop=1
Past duration 0.949989 too large 336kB time=00:00:03.08 bitrate= 890.9kbits/s dup=0 drop=1
Past duration 0.719994 too large 532kB time=00:00:05.03 bitrate= 864.5kbits/s dup=0 drop=1
Past duration 0.699989 too large
Past duration 0.709999 too large
Past duration 0.739998 too large 577kB time=00:00:05.59 bitrate= 844.5kbits/s dup=0 drop=1
Past duration 0.729988 too large
Past duration 0.759987 too large 833kB time=00:00:08.56 bitrate= 796.6kbits/s dup=0 drop=1
Past duration 0.829994 too large
Past duration 0.809990 too large
Past duration 0.820000 too large
Past duration 0.769997 too large
Past duration 0.749992 too large 872kB time=00:00:09.08 bitrate= 786.6kbits/s dup=0 drop=1
[flv @ 0x191fe00] Failed to update header with correct duration.
[flv @ 0x191fe00] Failed to update header with correct filesize.
frame= 262 fps= 33 q=17.4 Lsize= 928kB time=00:00:09.49 bitrate= 800.7kbits/s dup=0 drop=2
video:512kB audio:409kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.824687%

comment:3 Changed 3 years ago by cehoyos

  • Priority changed from critical to normal

Is the issue only reproducible with rtmp output or also with file output?
Does a simpler filter chain also allow to reproduce the issue?

comment:4 Changed 3 years ago by godivyam

only reproducible with rtmp, not with mp4 files
yes even if I remove the amerge and pan filters I am able to reproduce it.

comment:5 Changed 3 years ago by godivyam

  • Priority changed from normal to important

comment:6 Changed 3 years ago by cehoyos

  • Priority changed from important to normal

If you think this is a regression please add the change that introduced the regression.
If you know how I can reproduce the issue please do not hesitate to add the information here!

Note: See TracTickets for help on using tickets.