This forum is run by the BATC (British Amateur Television Club), it is service made freely available to all interested parties, please do not abuse this privilege.
Non-monotonous DTS in out stream 0:1 previous: 2252563, current 290108; changing to 2252564. This may result in incorrect timestamps in the output file.
I believe the error is due to OBS starting a new RTMP stream, but ffmpeg is still expecting the next frame from the original RTMP stream. So the OBS stream now has to be stopped and the ffmpeg script has to be restarted, only then can the OBS stream can be restarted with no errors from ffmpeg.
As the ffmpeg script has to be restarted every time the OBS RTMP stream is restarted, has anyone got a possible workaround not having to restart ffmpeg with every new RTMP stream?
If you install the obs-websocket plugin you can control OBS functions over a network connection.
I'm using the obswebsocket plugin in Python to do this in Linux, but I see there's a Windows executable here that could be called inside a script easily: https://obsproject.com/forum/resources/ ... ndows.615/. If this works okay then you could have it startrecord/stoprecord/startstream/stopstream. Not sure if it will work in a Windows batch script as something's going to need to go in to the background and it could do with being stoprecord being sent on the window closing.
The Python script I'm using in Linux, https://github.com/JayGe/dvbsdr/blob/ma ... calcalc.py, turns OBS recording on if requested in this way. I have another script to send to the Portsdown over UDP I can upload.
Code: Select all
if (obson): # Uses OBS Websocket to turn Record on when we transmit client = obswebsocket.obsws("localhost", 4444, "whatever") client.connect() client.call(obswebsocket.requests.StartRecording()) client.disconnect() time.sleep(1)