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: 6
United Kingdom
Location: London

Thanks: 1 times
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: 6
United Kingdom
Location: London

Thanks: 1 times
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: 15

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: 6
United Kingdom
Location: London

Thanks: 1 times
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: 15

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: 6
United Kingdom
Location: London

Thanks: 1 times
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: 5,208
Man
Location: Gold Coast, Australia

Was thanked: 4288 time(s) in 1520 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: 15

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: 5,208
Man
Location: Gold Coast, Australia

Was thanked: 4288 time(s) in 1520 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: 15

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
pstone  
#11 Posted : Tuesday, February 2, 2021 7:59:49 AM(UTC)
pstone

Rank: Newbie

Groups: Registered
Joined: 2/2/2021(UTC)
Posts: 7
United States

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
So I came across this same issue - Set multicorder to MP4 yet just got .TS - 4 / 5 of them converted fine using pretty much any converter .ts to .mp4 except one had a timing issue after conversion - even missing the ending of the video - it was a mess.

So I renamed the problematic .TS to .AVI and ran it through vMixes own vMix Video Tools option "Repair vMix AVI" - It made a new AVI which in windows media player didn't play the audio right but was fine in VLC. BUT when I ran that fixed .AVI through a converter .AVI->.MP4 it worked great.

Your milage may vary...
pba  
#12 Posted : Thursday, February 4, 2021 6:05:36 AM(UTC)
pba

Rank:: Advanced Member

Groups: Registered
Joined: 10/14/2015(UTC)
Posts: 147
Location: Hungary

Thanks: 38 times
Was thanked: 24 time(s) in 20 post(s)
Originally Posted by: admin Go to Quoted Post
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.


Anyway the "fun fact" is: the VMIX SRT output with multiple audio channel is also non-compliant, which is a big pain. Its simple not compatible with any software or hardware SRT decoder, only works with another VMIX. The audio pids are missing, so you cant address the needed audio channels with another decoders. Not too elegant thing...
admin  
#13 Posted : Thursday, February 4, 2021 12:45:43 PM(UTC)
admin

Rank: Administration

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

Was thanked: 4288 time(s) in 1520 post(s)
It absolutely is compliant! VLC will happily play the audio channels for example.

Some decoders only support 2 channels of audio and thus want all the channels placed in separate streams/tracks.
vMix combines them all into one track which is a perfectly valid way of doing things, and is better for things like audio sync, but
sadly hardware decoders are not very flexible in this regard.

Regards,

Martin
vMix
pba  
#14 Posted : Friday, February 5, 2021 7:59:40 PM(UTC)
pba

Rank:: Advanced Member

Groups: Registered
Joined: 10/14/2015(UTC)
Posts: 147
Location: Hungary

Thanks: 38 times
Was thanked: 24 time(s) in 20 post(s)
Dear Martin,

thank you for your answer! First of all, I'm really respect you and the hard work behind in VMIX!


If we talking about multi-language broadcasting (and that is the case) than I have to say its absolute not compliant. The 7.1 format was created for the surround audio, not for the multi-language/multi-track things.

I know, you say its by-design, but for the broadcast purposes its a wrong design, its a missing feature, its a non-compliant thing.

Yes, VLC can playback the SRT feed with multi-audio from VMIX. But can you select the needed audio bus in VLC? No, you can't, it will be a messed up mix with all the audio tracks. For multi-language purposes, its absolutely useless.

Let me describe our problems and goal (and as I see well, its not just our problem, but another users talk about this in the feature request section):

If you want to create and broadcast livestream with multi-language, than you have to select the needed audio track/bus in the ingest/player side. Unfortunatelly, that is impossible with the VMIX SRT source because of the missing audio pids.

All the hardware decoders, software decoders, software encoders (even the OBS!), hardware encoders, ingest servers (Wowza, Nimble), and streaming platforms works in the compliant way: with the different audio pids for the different audio tracks. The only exception is the VMIX. Please, show me other exception! You can't. And thats why its just compatible with yourself.

There is no multi-audio SRT sync issue with the other products, because its a well-known, standardized thing, its used by all the products in the market, even the Netflix, HBO, etc. broadcast in this way.

With the actual situation you are not able to create multi-language SRT stream with VMIX, the multi-audio SRT output is absolute useless (except if you want to connect to another VMIX). For the multi-language SRT output is only one piece is missing: the different audio PIDs for the different audio buses. If its a paid option or a paid development, than I'm happy to pay, and I'm sure, I'm not the only one.

I can't repeat myself enough: VMIX is a real capable brilliant software! Almost everything is available for the multi-language stream: the audio buses, etc. Only the audio pids are missing. Anyway if you drop the 7.1 audio format and go with the different audio PID's, than the 8 channel limit is also disappear, because the SRT format is support 16 audio channel, so you can output all the audio buses.

I'm really interested about your opinion about this. Please consider my suggestion, I'm sure it can be really usefull for another users, and the users happy to pay for it. We will buy at least 2 more PRO licence if the multi-audio SRT out will available (with the compliant way of course).
Only this "small" piece is missing for the multi-language broadcasting, which can be a really great feature! Only just a small output format change needed, one little step for the compliant way. :)

Thank you!
Users browsing this topic
Guest (2)
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.