Hello, I’m trying to capture x11 screen recording and pulse audio and mux them into one rtp output stream but I’m having issues when it comes to the actual muxing part. If I record only audio or only video then the resulting output stream plays with little issue but once I mux them together then the stream gets jittery and the audio drops/stutters randomly. Here’s my FFMPEG commands (launched from JavaScript) [cid:image001.png@01D77D53.B51EEF60] Here is the resulting cli logs: [cid:image003.png@01D77D54.413BEC50]
From what I’ve seen this has to do with the separate timestamps for each stream not lining up correctly and causing playback error I’m just not sure how to fix it. Forward Error Correction has had no effect. Any ideas on how I can ensure the tracks are synced?
Sorry, here they are in text form: Command: -hide_banner -use_wallclock_as_timestamps 1 -r 20 -f x11grab -video_size 1280x720 -draw_mouse 0 -i :1 -f pulse -i default -c:a aac -c:v libx265 -preset ultrafast -bufsize 3968k -pix_fmt yuv420p -f rtp_mpegts -async 44100 -fec prompeg=l=20:d=5 rtp://host.docker.internal:3200 CLI Logs: frame= 21 fps=0.0 q=35.0 size= 57kB time=00:00:01.92 bitrate= 243.6kbits/s speed=3.47x frame= 51 fps= 48 q=32.6 size= 104kB time=00:00:01.92 bitrate= 442.8kbits/s speed=1.81x frame= 55 fps= 35 q=32.8 size= 108kB time=00:00:01.95 bitrate= 452.3kbits/s speed=1.25x frame= 55 fps= 27 q=32.8 size= 108kB time=00:00:01.95 bitrate= 452.3kbits/s speed=0.942x frame= 55 fps= 21 q=32.8 size= 108kB time=00:00:01.95 bitrate= 452.3kbits/s speed=0.757x [aac @ 0x7fa68bd0c080] Queue input is backward in time [rtp_mpegts @ 0x7fa68bd7a0c0] Non-monotonous DTS in output stream 0:1; previous: 178560, current: 752; changing to 178561. This may result in incorrect timestamps in the output file. [rtp_mpegts @ 0x7fa68bd7a0c0] Non-monotonous DTS in output stream 0:1; previous: 178561, current: 2672; changing to 178562. This may result in incorrect timestamps in the output file. [rtp_mpegts @ 0x7fa68bd7a0c0] Non-monotonous DTS in output stream 0:1; previous: 178562, current: 4592; changing to 178563. This may result in incorrect timestamps in the output file. [rtp_mpegts @ 0x7fa68bd7a0c0] Non-monotonous DTS in output stream 0:1; previous: 178563, current: 6512; changing to 178564. This may result in incorrect timestamps in the output file. [rtp_mpegts @ 0x7fa68bd7a0c0] Non-monotonous DTS in output stream 0:1; previous: 178564, current: 8432; changing to 178565. This may result in incorrect timestamps in the output file.
participants (1)
-
Rodriguez, Josue