logo

Live Production Software Forums


Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
charleymackley  
#1 Posted : Monday, September 7, 2020 7:55:56 PM(UTC)
charleymackley

Rank: Newbie

Groups: Registered
Joined: 9/7/2020(UTC)
Posts: 4
United Kingdom
Location: London

Hi All,

New poster here but myself and colleagues have come across an issue and we are hoping the hive mind here maybe able to help.

We want to record isolated inputs of our SRT streams (some remote screen captures) coming into vMix. It's my understanding that the Multicorder settings will not adjust or edit the file format of the SRT stream coming in however if I have understood this wrong please let me know; (currently we are setting the Multicorder to 12 bit H264, but i have tried other file formats with the same result).


We have SRT streams coming into vMix via OBS these streams work perfectly within the vMix software and we can cut to the inputs and see and hear everything as expected.

However the MPEG-2.ts files that are created within the Multicorder folder are of the size you would expect to contain video data but when opened in vMix, VLC, Handbrake, OBS they only contain audio and black video. I have tried adding the HVEC and MPEG-2 codecs from the Microsoft store to the windows machines but same result. I have tried this on five windows machines with the same result.

Is this just how SRT records behave and currently there is no way of viewing or decoding the video information? This seems bizarre for me but unless i'm missing something massively fundamental i'm unsure what we are doing wrong.

Let me know if you need any more info, any testing ideas or just ideas in general would be greatly received.

Thanks
charleymackley  
#2 Posted : Tuesday, September 8, 2020 2:48:40 AM(UTC)
charleymackley

Rank: Newbie

Groups: Registered
Joined: 9/7/2020(UTC)
Posts: 4
United Kingdom
Location: London

So I have been able to circumvent this by following option 2 on OBS's SRT wiki -> https://obsproject.com/w...eaming-With-SRT-Protocol

This allows you to SRT stream in and the resulting MultiCorder file (taken direct from the OBS stream) is audio and video. N.B. you wont be able to use the record function within OBS if you use this method.
jomeurphy37  
#3 Posted : Thursday, September 10, 2020 8:28:52 PM(UTC)
jomeurphy37

Rank: Member

Groups: Registered
Joined: 6/4/2020(UTC)
Posts: 11

I think the way the Multicorder deals with SRT inputs at the moment is to save them as a direct stream copy of the input stream. This should contain both audio and video streams but I seem to run into some issues with the way it handles dropped frames or interruptions in the connection creating files that go out of sync. You might find you can play the files and see the video by opening them in ffplay if other players are struggling to show the video stream.

Typically if I need to record isos of SRT inputs I'll do it either directly with Multicorder and then re-encode the .ts files to MP4 in an attempt to create a more usable output file for editing or I'll route the SRT inputs to the four Outputs in vMix and set the recording appropriately there. The advantage in the second case is you can set the format to whatever you like and it will handle drop outs very well, but you're limited to four inputs and you'll need to be careful to route audio to separate busses.

If you're wanting to re-encode the .ts files in the way I mentioned above this is my current command line I'm using - I'd love to know if anyone else has experienced similar issues or found a better way to convert that .ts stream into something more compliant for NLEs?

ffmpeg -r 30 -i input.ts -c:v copy -c:a copy -vsync 1 output.mp4

NB. The -r switch before the input forces ffmpeg to treat the file as 30fps (which tends to be what my SRT streams come in at) but you might want to adjust that depending on your needs. Rather than attempting to copy the video and audio codecs you could always put in your preferred settings there but the -vsync 1 option for me is crucial in forcing the output to be in sync.

Again, I'd love to know if anyone else has a better route or if the vMix team are considering any other way to treat SRT inputs in Multicorder? I'd love to have the option to treat them as original format or encoded to a specified format in the way NDI does.

Joe
charleymackley  
#4 Posted : Thursday, September 10, 2020 10:39:40 PM(UTC)
charleymackley

Rank: Newbie

Groups: Registered
Joined: 9/7/2020(UTC)
Posts: 4
United Kingdom
Location: London

Originally Posted by: jomeurphy37 Go to Quoted Post
I think the way the Multicorder deals with SRT inputs at the moment is to save them as a direct stream copy of the input stream. This should contain both audio and video streams but I seem to run into some issues with the way it handles dropped frames or interruptions in the connection creating files that go out of sync. You might find you can play the files and see the video by opening them in ffplay if other players are struggling to show the video stream.

Typically if I need to record isos of SRT inputs I'll do it either directly with Multicorder and then re-encode the .ts files to MP4 in an attempt to create a more usable output file for editing or I'll route the SRT inputs to the four Outputs in vMix and set the recording appropriately there. The advantage in the second case is you can set the format to whatever you like and it will handle drop outs very well, but you're limited to four inputs and you'll need to be careful to route audio to separate busses.

If you're wanting to re-encode the .ts files in the way I mentioned above this is my current command line I'm using - I'd love to know if anyone else has experienced similar issues or found a better way to convert that .ts stream into something more compliant for NLEs?

ffmpeg -r 30 -i input.ts -c:v copy -c:a copy -vsync 1 output.mp4

NB. The -r switch before the input forces ffmpeg to treat the file as 30fps (which tends to be what my SRT streams come in at) but you might want to adjust that depending on your needs. Rather than attempting to copy the video and audio codecs you could always put in your preferred settings there but the -vsync 1 option for me is crucial in forcing the output to be in sync.

Again, I'd love to know if anyone else has a better route or if the vMix team are considering any other way to treat SRT inputs in Multicorder? I'd love to have the option to treat them as original format or encoded to a specified format in the way NDI does.

Joe



Hey Joe,

Thanks ever so much for this and i didn't think about using command line to re-encode the files. It didn't work for these files unfortunately.

Unfortunately in this instance the issue is that OBS is not correctly packaging the data so when vMix records in it's current state it takes that error with it. So fingers crossed OBS fix that issue their end.

However I too would love to see an option like how NDI is managed in MultiCorder especially if the stream is already decoded to be available as an input in vMix. Plus saves having to encode all the files after the fact when needed. :)
jomeurphy37  
#5 Posted : Saturday, September 12, 2020 9:02:14 PM(UTC)
jomeurphy37

Rank: Member

Groups: Registered
Joined: 6/4/2020(UTC)
Posts: 11

Hi Charley,

That's a shame that you weren't able to recover those files by re-encoding. Out of interest, if you bring the .ts files into vMix are you able to view them with video that way? You could always do play back and re-record them in real-time as a last resort if needed.

You might also want to run the .ts files through TSDuck's tsanalyze app to see if it reports the video track being there and intact - again you might be able to extract the individual tracks then and rebuild them that way.


vMix devs - it would be really useful to know if there's any way to handle .ts recorded MultiCorder files more elegantly - I assume the underlying ffmpeg command for MultiCorder is just outputting that direct stream capture but is there a way to recover the resulting files in the event of a transmission interruption or corrupt frame? I feel like there's probably an ffmpeg command that would tell it to ignore those corrupt frames and resume the resulting file neatly afterwards and back in sync but I've yet to find it!
charleymackley  
#6 Posted : Monday, September 14, 2020 4:24:36 PM(UTC)
charleymackley

Rank: Newbie

Groups: Registered
Joined: 9/7/2020(UTC)
Posts: 4
United Kingdom
Location: London

Originally Posted by: jomeurphy37 Go to Quoted Post
Hi Charley,

That's a shame that you weren't able to recover those files by re-encoding. Out of interest, if you bring the .ts files into vMix are you able to view them with video that way? You could always do play back and re-record them in real-time as a last resort if needed.

You might also want to run the .ts files through TSDuck's tsanalyze app to see if it reports the video track being there and intact - again you might be able to extract the individual tracks then and rebuild them that way.


vMix devs - it would be really useful to know if there's any way to handle .ts recorded MultiCorder files more elegantly - I assume the underlying ffmpeg command for MultiCorder is just outputting that direct stream capture but is there a way to recover the resulting files in the event of a transmission interruption or corrupt frame? I feel like there's probably an ffmpeg command that would tell it to ignore those corrupt frames and resume the resulting file neatly afterwards and back in sync but I've yet to find it!


Hey Joe,

Unfortunately vMix or anything else i have tried can decode the files the data was stored without the header so i think its just a mess of data with no way of ordering it now. I hadn't come across TSDuck but tried that and also no joy :(. But thanks for shouting out that app super useful.

Thanks
admin  
#7 Posted : Monday, September 14, 2020 4:40:52 PM(UTC)
admin

Rank: Administration

Groups: Administrators
Joined: 1/13/2010(UTC)
Posts: 4,527
Man
Location: Gold Coast, Australia

Was thanked: 2795 time(s) in 1164 post(s)
Originally Posted by: jomeurphy37 Go to Quoted Post
vMix devs - it would be really useful to know if there's any way to handle .ts recorded MultiCorder files more elegantly


vMix simply saves the actual SRT stream coming in, without any processing or re-muxing, directly to .ts.
So any missing headers will be missing from the SRT stream itself.

The reason this issue happens, is some encoders are only sending the SPS/PPS headers at the start of the stream and not with every I-frame.

In theory we could save these headers and re-encode the TS files ourselves, however that would lose a huge benefit of the current
recording method: a perfect copy of the original source stream.




jomeurphy37  
#8 Posted : Tuesday, September 15, 2020 6:33:43 PM(UTC)
jomeurphy37

Rank: Member

Groups: Registered
Joined: 6/4/2020(UTC)
Posts: 11

Originally Posted by: admin Go to Quoted Post

In theory we could save these headers and re-encode the TS files ourselves, however that would lose a huge benefit of the current
recording method: a perfect copy of the original source stream.


I wonder if it would be possible to save the headers to a separate file that could be used to rebuild the resulting .ts in the event it's unreadable after MultiCorder has captured it? I can definitely see the benefit of the low processing cost of just saving the original source stream but if the resulting file is unreadable in some cases I'm not sure how useful it becomes then.
admin  
#9 Posted : Tuesday, September 15, 2020 8:14:39 PM(UTC)
admin

Rank: Administration

Groups: Administrators
Joined: 1/13/2010(UTC)
Posts: 4,527
Man
Location: Gold Coast, Australia

Was thanked: 2795 time(s) in 1164 post(s)
Well the issue is caused by a bug in the encoder, as the streams are non-compliant anyway, so best to get the vendor to solve the problem.
jomeurphy37  
#10 Posted : Wednesday, September 16, 2020 11:56:04 PM(UTC)
jomeurphy37

Rank: Member

Groups: Registered
Joined: 6/4/2020(UTC)
Posts: 11

Ok, thanks - I think for me the most common issue with how MultiCorder handles SRT streams is when there's a break in transmission. The resulting .ts typically then has sync issues. Is that something you've run into or have any thoughts on workarounds for?

Many thanks!
Joe
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.