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
jdrwor  
#1 Posted : Tuesday, June 28, 2016 1:10:25 PM(UTC)
jdrwor

Rank: Member

Groups: Registered
Joined: 7/26/2013(UTC)
Posts: 13

I am running into an issue trying to do multi-bitrate switching when streaming on the vMix Go box using ffmpeg encoder. For multi-bitrate (adaptive) switching to work properly it is very important that the encoder has all streams keyframe aligned. When the video player detects it needs to switch to a different bitrate if the streams are keyframe aligned the switch is done seamlessly and the user only notices a video quality change. But when they are not aligned when the switch occurs the video appears to jump forward or backward in time, depending on the direction of the switch. Using the default ffmpeg encoder on vMix Go I am seeing the non-aligned behaviour. For a client with bandwidth that goes up and down this makes the video playback appear very poor.
Doing keyframe alignment appears to be doable uing options like these:
http://superuser.com/que...rames-in-ffmpeg-for-dash
Quote:
-c:v libx264 -x264opts keyint=GOPSIZE:min-keyint=GOPSIZE:scenecut=-1


Is it possible for these options to be enabled for an ffmpeg stream?

Wirecast seems to be doing something like this.
[img]https://screencloud.net/v/qrq2[/img]
jdrwor attached the following image(s):
927f499a5df5c6f48006eb1e68c8b743.png (62kb) downloaded 11 time(s).

You cannot view/download attachments. Try to login or register.
admin  
#2 Posted : Tuesday, June 28, 2016 9:57:08 PM(UTC)
admin

Rank: Administration

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

Was thanked: 4166 time(s) in 1497 post(s)
Hi,

We can certainly look at adding these options to further restrict the keyframe, but before I do that can you try the following?

* Tick "Use Hardware Encoder". In our testing using GPU encoding has a much stricter keyframe interval.

Can you also confirm what encoding settings you have tried in vMix such as Bitrate, Size, Profile and Preset?

Thanks,

Martin
vMix
jdrwor  
#3 Posted : Wednesday, June 29, 2016 10:19:06 AM(UTC)
jdrwor

Rank: Member

Groups: Registered
Joined: 7/26/2013(UTC)
Posts: 13

Hi Martin,
I did try enabling the Hardware encoder but unfortunately I get an error when I try to do more than 2 bitrates I get an error. See the attached image. It appears that the hardware encoder is limited to two simultaneous encodes. For effective bitrate switching I need 3 bitrates.
I have attached the encoder settings I am using in another image.
jdrwor attached the following image(s):
hwenc_error.PNG (25kb) downloaded 5 time(s).
sw_encoder_settings.PNG (27kb) downloaded 11 time(s).

You cannot view/download attachments. Try to login or register.
admin  
#4 Posted : Wednesday, June 29, 2016 11:04:33 AM(UTC)
admin

Rank: Administration

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

Was thanked: 4166 time(s) in 1497 post(s)
Thanks,

In Streaming Quality where Profile is set to "Main" the text can be changed to the following:

Main -keyint_min:v 60 -sc_threshold:v 0

Try that and let me know if it helps.

Regards,

Martin
vMix
jdrwor  
#5 Posted : Wednesday, June 29, 2016 7:15:11 PM(UTC)
jdrwor

Rank: Member

Groups: Registered
Joined: 7/26/2013(UTC)
Posts: 13

Hi Martin,
My initial feedback is that those settings do seem to help. When I made those changes and tested this whole afternoon I have not been able to reproduce any issues with bitrate switching. The bad news is that during my testing I had ffmpeg crash. I don't know if it is related to the new options or not, but I have it happen twice in 4 hours of testing.

I've attached the log file from one of the crashes. I have edited it slightly to obscure sensitive information.
File Attachment(s):
streaming 20160628-151819.txt (226kb) downloaded 8 time(s).

You cannot view/download attachments. Try to login or register.
admin  
#6 Posted : Wednesday, June 29, 2016 11:03:00 PM(UTC)
admin

Rank: Administration

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

Was thanked: 4166 time(s) in 1497 post(s)
Is it possible there were temporary internet issues or problems with the CDN? This is usually what causes that type of error
and vMix should automatically attempt to reconnect when it happens.
jdrwor  
#7 Posted : Thursday, June 30, 2016 10:29:27 AM(UTC)
jdrwor

Rank: Member

Groups: Registered
Joined: 7/26/2013(UTC)
Posts: 13

It is possible that there was a brief network issue, though I did not see any other indication of that. vMix did reconnect automatically so at least it recovered, but there was about 30 seconds of no video. I will continue monitoring this.
jdrwor  
#8 Posted : Thursday, June 30, 2016 6:57:51 PM(UTC)
jdrwor

Rank: Member

Groups: Registered
Joined: 7/26/2013(UTC)
Posts: 13

I did some further testing today and changed the Profile value to

Main -x264opts keyint=60:min-keyint=60:scenecut=-1

I streamed for 8 hours today and never had any issues. The adaptive switching worked and there were no ffmpeg crashes. If yesterdays errors were caused by the args, these seem to work better. If, however, yesterday's issues were network related then the network must have behaved better today. Tomorrow I will do some tests attempting to introduce network errors and see how it behaves.
jdrwor  
#9 Posted : Friday, July 1, 2016 5:58:52 PM(UTC)
jdrwor

Rank: Member

Groups: Registered
Joined: 7/26/2013(UTC)
Posts: 13

Hi Martin,
More testing today. I continued using the new settings from yesterday. I saw no failures.
I also tested interrupting the network and verified stability to my satisfaction.
My impression is it would be best to implement this option using the second profile values I was using today as they seem the most stable. Is this something you would anticipate introducing in the next release? What would the timing of that release be?

Thanks!
Mathijs  
#10 Posted : Sunday, July 3, 2016 6:13:42 AM(UTC)
Mathijs

Rank: Advanced Member

Groups: Registered
Joined: 5/24/2015(UTC)
Posts: 370
Location: Netherlands

Thanks: 16 times
Was thanked: 81 time(s) in 72 post(s)
The 2 nvenc encodes limit would be a reason to choose Quadro instead of a Geforce card. But the price difference is quite big to justify for the one extra encode needed, but doing 3 h.264 encodes on the CPU costs a lot of resources.
At this moment I use multibitrate streaming, but with 2 streams instead of 3. This works fine using nvenc.
One is the 1080p high quality stream, the other a 1024x576 500kbps stream to ensure everyone can watch the livestream.

Does the hardware encoding also work on AMD opencl and Intel Quicksync, or only with nvenc?

I'm thinking about using FFMPEG on the server to transcode one incoming stream to 3 different streams for multi-bitrate streaming. This would offload this from the vMix machine and makes me need less bandwidth. Only downside to this would be the quality of the HQ stream, which I imagine, would suffer from being encoded twice.
admin  
#11 Posted : Thursday, July 7, 2016 3:04:01 AM(UTC)
admin

Rank: Administration

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

Was thanked: 4166 time(s) in 1497 post(s)
Just uploaded vMix 17.0.0.100 which has a new Keyframe Aligned checkbox in the Streaming Quality settings.
Users browsing this topic
Guest
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.