[FFmpeg-user] Video overlay of several network inputs using ffmpeg
Miguel Titos
mtitos at verparacreer.net
Thu Apr 26 23:06:49 EEST 2018
Hi,
I use something similar with two RTSP signals and it works for me. This is
the command I execute:
ffmpeg -rtsp_transport tcp -thread_queue_size 512 -rtbufsize 50M -r 15
-i rtsp://XXXX -rtsp_transport tcp -thread_queue_size 512 -rtbufsize 50M -r
15
-c:a aac -i rtsp://YYYY -filter_complex "[0:v]pad=iw*2:ih,setpts=PTS-S
TARTPTS[bg];
[1:v]setpts=PTS-STARTPTS[fg]; [bg][fg]overlay=w[out]" -map "[out]" -f hls
-hls_time 2 -hls_list_size 5 -use_localtime 1 -use_localtime_mkdir 1
-hls_segment_filename 'LIVE/file-%s.ts' -map a -ar 16000 -ac 1 -ab 64000
-c:a aac
-y output.m3u8
I think perhaps you need some higher buffer_size parameter or add a
thread_queue_size parameter (like I do).
If I can think of any more parameters you may need, I say to you ;)
Luck!
2018-04-26 14:41 GMT+02:00 Hristo Ivanov Ivanov <hristo.idgh at gmail.com>:
> Hi,
>
> I am trying to overlay several network inputs(udp streams). The command I
> have so far looks like this:
>
> .\ffmpeg.exe -threads auto -y -i input0 -i input1 \
> -filter_complex
> "[0:v]scale=1920x1080[v0];[1:v]scale=480x270[v1];[v0][v1]ove
> rlay=1440:810[v2]"
> \
> -map [v2] -map 0:a -c:v libx264 -preset ultrafast -c:a copy output.mp4
>
> When input0 and input1 are files the resulting output is correct, on the
> other hand, when the inputs are udp streams the resulting output is not
> correct, the video freezes most of the time.
>
> The file inputs are generated from the udp streams, using the following
> command:
> .\ffmpeg.exe -threads auto -y -i "udp://@ip:port" -c copy -f mpegts
> input1.mpg
>
> Why is the above command not producing good ouput for upd streams?
> What are the differences between the original stream and the dump of that
> stream for `ffmpeg.exe`.
> How can it be fixed?
>
> Thanks.
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://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