Video and Audio is off-sync on Decklink SDI output
Dear all I am testing to setup a decoder with ffmpeg, take live stream in (RTMP/HLS,.) and output to Decklink SDI. Its working but I have the issue of audio and video is off-sync on decklink SDI output, I tried to play around with vf setpts and af asetpts but couldnt make video/audio to sync. Any input will be very appreciated. Here is my command so far * ffmpeg -i rtmp://something -vf "setpts=PTS-STARTPTS" -af "asetpts=PTS-STARTPTS" -f decklink -pix_fmt uyvy422 "DeckLink SDI" * Video and audio of input rtmp is synced on VLC or other software. --- Best regards, *Tung Tran*
2017-02-22 23:32 GMT+01:00 Tung Tran <tung.tran@v247.com>:
* ffmpeg -i rtmp://something -vf "setpts=PTS-STARTPTS" -af "asetpts=PTS-STARTPTS" -f decklink -pix_fmt uyvy422 "DeckLink SDI" *
Complete, uncut console output missing. Why are you using filters?
Video and audio of input rtmp is synced on VLC or other software.
Does the following produce a file that plays in-sync? $ ffmpeg -i rtmp://something -qscale 2 out.avi Carl Eugen
Just seeing this now. If filters is the wrong solution for setting points for Decklink SDI output, what would be the correct way to do so? ~Thomas On 2/22/17, 3:39 PM, "ffmpeg-user on behalf of Carl Eugen Hoyos" <ffmpeg-user-bounces@ffmpeg.org on behalf of ceffmpeg@gmail.com> wrote: 2017-02-22 23:32 GMT+01:00 Tung Tran <tung.tran@v247.com>: > * ffmpeg -i rtmp://something -vf "setpts=PTS-STARTPTS" -af > "asetpts=PTS-STARTPTS" -f decklink -pix_fmt uyvy422 "DeckLink SDI" * Complete, uncut console output missing. Why are you using filters? > Video and audio of input rtmp is synced on VLC or other software. Does the following produce a file that plays in-sync? $ ffmpeg -i rtmp://something -qscale 2 out.avi Carl Eugen _______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-request@ffmpeg.org with subject "unsubscribe".
2017-02-28 23:32 GMT+01:00 Matthias, Thomas <Thomas.Matthias@dolby.com>:
If filters is the wrong solution for setting points for Decklink SDI output, what would be the correct way to do so?
What are "points" / what happens if you don't use the setpts filters? Please do not top-post here, Carl Eugen
Dear Carl Sorry for late response as I dont know why somehow google email filtered your previous emails. The reason I used vf setpts filter is, if not, the image on SDI outout will lag alot. I played around and found out if I use vf setpts then I can fix lagging issue but its lipsync. Here is the log *Before apply vf filter* [flv @ 0x38d33c0] audio stream discovered after head already parsed [flv @ 0x38d33c0] video stream discovered after head already parsed [h264 @ 0x38f4660] Increasing reorder buffer to 2 Input #0, flv, from 'rtmp://something': Duration: N/A, start: 26639.381000, bitrate: N/A Stream #0:0: Audio: aac (LC), 48000 Hz, stereo, fltp Stream #0:1: Video: h264 (High), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 30.30 fps, 29.97 tbr, 1k tbn, 59.94 tbc [decklink @ 0x38f5a00] Found Decklink mode 1920 x 1080 with rate 29.97 Output #0, decklink, to 'DeckLink SDI (1)': Metadata: encoder : Lavf57.66.102 Stream #0:0: Video: rawvideo (UYVY / 0x59565955), uyvy422, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 29.97 fps, 29.97 tbn, 29.97 tbc Metadata: encoder : Lavc57.80.101 rawvideo Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s Metadata: encoder : Lavc57.80.101 pcm_s16le Stream mapping: Stream #0:1 -> #0:0 (h264 (native) -> rawvideo (native)) Stream #0:0 -> #0:1 (aac (native) -> pcm_s16le (native)) Press [q] to stop, [?] for help [decklink @ 0x38f5a00] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly [decklink @ 0x38f5a00] Encoder did not produce proper pts, making some up. frame= 156 fps= 38 q=-0.0 size=N/A time=00:00:05.20 bitrate=N/A dup=35 drop=0 speed=1.33x frame= 291 fps= 36 q=-0.0 size=N/A time=00:00:09.70 bitrate=N/A dup=35 drop=0 speed=1.19x frame= 414 fps= 34 q=-0.0 size=N/A time=00:00:13.81 bitrate=N/A dup=35 drop=0 speed= 1.1x *After apply vf setpts filter* encoder : Lavc57.80.101 pcm_s16le Stream mapping: Stream #0:1 -> #0:0 (h264 (native) -> rawvideo (native)) Stream #0:0 -> #0:1 (aac (native) -> pcm_s16le (native)) Press [q] to stop, [?] for help [decklink @ 0x42bd1e0] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly [decklink @ 0x42bd1e0] Encoder did not produce proper pts, making some up. [decklink @ 0x42bd1e0] There's no buffered audio. Audio will misbehave!2 drop=0 speed=3.41x [decklink @ 0x42bd1e0] There's no buffered audio. Audio will misbehave!2 drop=0 speed=2.97x [decklink @ 0x42bd1e0] There's no buffered audio. Audio will misbehave!2 drop=0 speed=2.67x [decklink @ 0x42bd1e0] There's no buffered audio. Audio will misbehave!2 drop=0 speed=2.44x [decklink @ 0x42bd1e0] There's no buffered audio. Audio will misbehave!2 drop=0 speed=2.27x [decklink @ 0x42bd1e0] There's no buffered audio. Audio will misbehave!2 drop=0 speed=1.68x Last message repeated 1 times [decklink @ 0x42bd1e0] There's no buffered audio. Audio will misbehave!2 drop=0 speed=1.66x [decklink @ 0x42bd1e0] There's no buffered audio. Audio will misbehave!2 drop=0 speed=1.64x [decklink @ 0x42bd1e0] There's no buffered audio. Audio will misbehave!2 drop=0 speed=1.62x [decklink @ 0x42bd1e0] There's no buffered audio. Audio will misbehave!2 drop=0 speed= 1.6x [decklink @ 0x42bd1e0] There's no buffered audio. Audio will misbehave!2 drop=0 speed=1.58x [decklink @ 0x42bd1e0] There's no buffered audio. Audio will misbehave!2 drop=0 speed=1.57x Last message repeated 1 times [decklink @ 0x42bd1e0] There's no buffered audio. Audio will misbehave!2 drop=0 speed=1.55x [decklink @ 0x42bd1e0] There's no buffered audio. Audio will misbehave!2 drop=0 speed=1.54x Last message repeated 2 times [decklink @ 0x42bd1e0] There's no buffered audio. Audio will misbehave!2 drop=0 speed=1.43x Last message repeated 1 times [decklink @ 0x42bd1e0] There's no buffered audio. Audio will misbehave!2 drop=0 speed=1.42x --- Best regards, *Tung Tran* On Wed, Mar 1, 2017 at 2:53 AM, Carl Eugen Hoyos <ceffmpeg@gmail.com> wrote:
2017-02-28 23:32 GMT+01:00 Matthias, Thomas <Thomas.Matthias@dolby.com>:
If filters is the wrong solution for setting points for Decklink SDI output, what would be the correct way to do so?
What are "points" / what happens if you don't use the setpts filters?
Please do not top-post here, Carl Eugen _______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email ffmpeg-user-request@ffmpeg.org with subject "unsubscribe".
On 22 Feb 2017, at 23:32, Tung Tran <tung.tran@v247.com> wrote:
Dear all
I am testing to setup a decoder with ffmpeg, take live stream in (RTMP/HLS,.) and output to Decklink SDI. Its working but I have the issue of audio and video is off-sync on decklink SDI output, I tried to play around with vf setpts and af asetpts but couldnt make video/audio to sync.
Perhaps unrelated, but on my system, depending on the state of my machine (Eg if I have run Avid MC before), the output of my decklink is out of sync on known good sync input. (No matter the player, it seems a Decklink driver issue.) So you might want to test output with a known good local input file. (While looking / listening to Decklink output.) hth, Bouke
Any input will be very appreciated. Here is my command so far
* ffmpeg -i rtmp://something -vf "setpts=PTS-STARTPTS" -af "asetpts=PTS-STARTPTS" -f decklink -pix_fmt uyvy422 "DeckLink SDI" *
Video and audio of input rtmp is synced on VLC or other software. --- Best regards,
*Tung Tran* _______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email ffmpeg-user-request@ffmpeg.org with subject "unsubscribe".
participants (4)
-
Bouke / VideoToolShed -
Carl Eugen Hoyos -
Matthias, Thomas -
Tung Tran