HEVC TS streaming: How to enforce bandwidth limits (1 mbps)

About encoding, codec settings, muxers and filter usage
David7578
Blank Cone
Blank Cone
Posts: 15
Joined: 01 May 2014 14:50

HEVC TS streaming: How to enforce bandwidth limits (1 mbps)

Postby David7578 » 16 Nov 2014 10:55

So I started using latest winx64 nightly to transcode a live streaming input with HEVC and restream the output all in realtime on a xDSL line with a 1mbps upload limit.

The input live stream is either a 576p50 x264 2 mbps stream or a 1080p50 5mbps x264 stream.
I do not encode the audio, I only reencode the video to 25FPS and lower the resolution to a 16/9 image with height and width being a multiple of 8. I then put all of that in a HTTP ts stream.

Everything works fine, except I can't enforce a bandwidth limit.
Sure, I can scale down the resolution, but when scenes become complex enough, the bandwidth skyrockets when I'd prefer to lower the quality of the ouput but remain below 1mbps at all times.
Here's the sequence I use and tweak to try and find the right set of commands:

Code: Select all

vlc.exe input1080.stream :sout=#transcode {vcodec=hevc,height=648,width=1152,fps=25,deinterlace,venc=x265{profile=main,preset=slow,bitrate=700k,vbv-maxrate=750k,ratetol=1,nal-HRD=CBR,audiosync}} :http{mux=ts,dst=:8080/}
I will not discuss the problems of corrupt packets or line congestion that force to resend packets and can also overload the upload, unless there's a surefire way to prevent that or I made an obvious mistake that brings me in that situation everytime.

If someone played with that and knows of ways to force the encode to remain below a fixed bitrate at all times, lowering the quality in realtime, I'd be very pleased.

Thanks

numma_cway
New Cone
New Cone
Posts: 1
Joined: 27 Nov 2014 19:24

Re: HEVC TS streaming: How to enforce bandwidth limits (1 mb

Postby numma_cway » 27 Nov 2014 20:01

Did you find a solution yet? I'm also interested in getting CBR to work with H265, as it worked fine with H264. I tried the vt parameter for sout (not sure if this actually works) the following parameters for x265: vbv-maxrate=768,vbv-bufsize=768,qcomp=0,ratetol=0.1,minrate=768,maxrate=768,bufsize=768,bitrate=768. They don't work. I honestly don't think that anything can be passed that way (bracket after venc=x265). Did you notice any parameter being effective?
Choosing a low enough bitrate to not have the bitrate get past 1 Mbit/s in complex scenes (400 seems viable) results in a quality worse than H264 I think. Additionally, CPU load seems to be related to bitrate.

David7578
Blank Cone
Blank Cone
Posts: 15
Joined: 01 May 2014 14:50

Re: HEVC TS streaming: How to enforce bandwidth limits (1 mb

Postby David7578 » 30 Nov 2014 21:01

No, i didn't find a solution.
As I understand, x265 is pretty much a work in progress and most options are not activated yet.
I guess there's a documentation related to the x265 version included in the last VLC nightlies.

as for x264, I played a bit with it in the past, before being able to use x265 with a more powerful box, but my tests with CBR failed short in quality.

David7578
Blank Cone
Blank Cone
Posts: 15
Joined: 01 May 2014 14:50

Re: HEVC TS streaming: How to enforce bandwidth limits (1 mb

Postby David7578 » 18 Jan 2015 09:58

Hi,
Where do you think I can get more info about x265 and its practical uses with VLC?

Because it seems these forums aren't exactly lively, so maybe it's the wrong place for noob users like me who try to get thinks working.

I get acceptable results, but I'm not there yet, particularly for the upstream limit... I really need to be able to limit the encode to 1mbps anytime... And I do not know what to do to be able to do so
in fast changing complex scenes.
Maybe anytime is a little too much, as I can always use some buffer... but if possible I prefer not to buffer anything to get closer to realtime.

Any help appreciated,
Thanks


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 5 guests