Re: [FFmpeg-user] recording video file with 2 video tracks of two live cams
ffmpeg -i "rtsp://$USERNAME:$PASSWORD@192.168.234.34:554" -i "rtsp://$USERNAME:$PASSWORD@192.168.234.33:554" -map 0:0 -map 1:0 -map 0:1 -c copy "$(date +%Y%m%d%H%M%S)".mkv Complete, uncut console output missing. Here's the complete output: https://pastebin.com/Y1ZuMJ2L (run on the Windows 10 machine, where it's supposed to be running once it's perfected) I've added the options -re and -thread_queue_size 1024 to my first commandline. However the problem of videos out of sync remains, so it's not caused by buffering problems etc. The warnings about circular_buffer_size not being supported don't do any harm, right? I think the difference comes from which stream connects first and starts receiving packets first, since there’s no reference time to sync both streams to. Many (most?) devices of this kind also transmit the absolute timestamps separately from the video stream, so if you have the system time synchronized on both cameras, perhaps using ntp, maybe it would be possible to use this information to sync the two streams up but i don’t know if it is possible to do this automatically using ffmpeg alone. I'm also pretty sure that this is the reason. Is it perhapt possible to tell ffmpeg to handle both inputs equally, so both start at the same time? I kinda like the idea of syncing them based on the system time, which, in case it works, should be in sync well enough for this purpose. But I fear implementing this is over my head. Still, I'll keep this in mind in case nothing else works, so Ted, thanks a lot for this idea! Since I'll run this command by a bat file on this Windows machine (it's supposed to be idiot proof unfortunately), a workaround could be to re-merge the video with mkvmerge and then just delay the second video track. I don't really like this idea all too much, since the length of this delay could e.g. depend on the cpu load when the commandline gets executed. Hope you guys have even better ideas than me, being kind of an ffmpeg noob to be honest... Thanks a lot so far! sekret ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] recording video file with 2 video tracks of two live cams
Complete, uncut console output missing. Crap, you're right, thanks for pointing it out! I'll deliver asap, will most probably be there again tomorrow. ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] recording video file with 2 video tracks of two live cams
2019-04-10 10:23 GMT+02:00, sek...@posteo.se : > ffmpeg -i "rtsp://$USERNAME:$PASSWORD@192.168.234.34:554" > -i "rtsp://$USERNAME:$PASSWORD@192.168.234.33:554" > -map 0:0 -map 1:0 -map 0:1 -c copy > "$(date +%Y%m%d%H%M%S)".mkv Complete, uncut console output missing. Carl Eugen ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] recording video file with 2 video tracks of two live cams
> BUT: The videos aren't in sync. The audio and video of the first camera are > perfectly in sync (obviously, since the mic is connected to the first > camera), but the second camera's video track is about 1.3 seconds ahead. > > So, my questions are: > - Is this command line of mine too primitive for this to work properly? > - Is there a way to sync the video tracks? Maybe to delay the first one by > those 1.3 seconds? > - Is there a different approach which potentionally works better? > (- Does maybe one of you guys happen to know a perfectly working software for > this?) (I've searched and searched ... It's not a typical use case for > surveillance cameras, so no success) I think the difference comes from which stream connects first and starts receiving packets first, since there’s no reference time to sync both streams to. Many (most?) devices of this kind also transmit the absolute timestamps separately from the video stream, so if you have the system time synchronized on both cameras, perhaps using ntp, maybe it would be possible to use this information to sync the two streams up but i don’t know if it is possible to do this automatically using ffmpeg alone. ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".