HEVC TS streaming: How to enforce bandwidth limits (1 mbps)
Posted: 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:
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
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/}
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