UDP stream input SYNC out

#1
i'm streaming udp from casparcg server location 1 on VPN link with these parameters
add 1 stream udp:x.x.x.x:5000 -f mpegts -vcodec libx264 -pix_fmt yuv420p -strict experimental -c:a aac -b:a 128k -ar 48000 -tune zerolatency -preset medium -crf 10 -maxrate 3000K -bufsize 3000K -framerate 25


receiving it on 2nd location on VLC is perfect. but when i play it on casparcg server it is out of sync. audio is delay 4-5 seconds.
[2017-09-27 11:09:32.337] [7956] [error]
[2017-09-27 11:09:32.337] [7956] [error] [ffmpeg] [h264 @ 000000008A732DC0] decode_slice_header er
ror
[2017-09-27 11:09:32.337] [7956] [error]
[2017-09-27 11:09:32.338] [7956] [error] [ffmpeg] [h264 @ 000000008A732DC0] non-existing PPS 0 ref
erenced
[2017-09-27 11:09:32.338] [7956] [error]
[2017-09-27 11:09:32.338] [7956] [error] [ffmpeg] [h264 @ 000000008A732DC0] decode_slice_header er
ror
[2017-09-27 11:09:32.338] [7956] [error]
[2017-09-27 11:09:32.338] [7956] [error] [ffmpeg] [h264 @ 000000008A732DC0] non-existing PPS 0 ref
erenced
[2017-09-27 11:09:32.338] [7956] [error]
[2017-09-27 11:09:32.338] [7956] [error] [ffmpeg] [h264 @ 000000008A732DC0] decode_slice_header er
ror
[2017-09-27 11:09:32.338] [7956] [error]
[2017-09-27 11:09:32.338] [7956] [error] [ffmpeg] [h264 @ 000000008A732DC0] non-existing PPS 0 ref
erenced
[2017-09-27 11:09:32.338] [7956] [error]
[2017-09-27 11:09:32.338] [7956] [error] [ffmpeg] [h264 @ 000000008A732DC0] decode_slice_header er
ror
[2017-09-27 11:09:32.338] [7956] [error]
[2017-09-27 11:09:32.338] [7956] [error] [ffmpeg] [h264 @ 000000008A732DC0] non-existing PPS 0 ref
erenced
[2017-09-27 11:09:32.338] [7956] [error]
[2017-09-27 11:09:32.339] [7956] [error] [ffmpeg] [h264 @ 000000008A732DC0] decode_slice_header er
ror
[2017-09-27 11:09:32.339] [7956] [error]
[2017-09-27 11:09:32.339] [7956] [error] [ffmpeg] [h264 @ 000000008A732DC0] non-existing PPS 0 ref
erenced
[2017-09-27 11:09:32.339] [7956] [error]
[2017-09-27 11:09:32.339] [7956] [error] [ffmpeg] [h264 @ 000000008A732DC0] decode_slice_header er
ror
[2017-09-27 11:09:32.339] [7956] [error]
[2017-09-27 11:09:32.339] [7956] [error] [ffmpeg] [h264 @ 000000008A732DC0] no frame!
[2017-09-27 11:09:32.339] [7956] [error]
[2017-09-27 11:09:32.392] [7956] [info] ffmpeg[udp://192.168.22.14:5000|720x576p25.00|0/0] [video-d
ecoder] H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
[2017-09-27 11:09:32.401] [7956] [info] ffmpeg[udp://192.168.22.14:5000|720x576p25.00|0/0] [audio-d
ecoder] AAC (Advanced Audio Coding)
[2017-09-27 11:09:32.410] [7956] [info] transition[empty=>ffmpeg[udp://10.20.22.14:5000|720x576p2
5.00|0/0]] Initialized
[2017-09-27 11:09:33.016] [7644] [info] [frame_muxer] simple 720x576p25.00

kindly guide me how to get it synced on casparcg server
thanks,
Last edited by sirfnomi on 28 Sep 2017, 18:15, edited 1 time in total.

Re: UDP stream input SYNC out

#2
I haven't been able to get perfect sync yet, but restreaming to a unix domain socket (requires linux) with ffmpeg with parameter

Code: Select all

-vsync 1
got me in the order of 100's of milliseconds vs multiple seconds. Still not good enough in my opinion though.

I haven't heard of anyone being able to do perfect sync in caspar.
CasparCG enthusiast and broadcast geek

Re: UDP stream input SYNC out

#3
After playing all night with parameters I have found a way to get it sync on CasparCG
I set key frame to 10 like -x264opts keyint=10
With this keyint value CasparCG playing stream synced
But this keyint value reduce quality of streaming for this we can set it back to default value after playing stream on CasparCG.