Page 1 of 1

canvas vfilter vs x264 crf performances

Posted: 13 Apr 2018 12:18
by StCyr
Hello,

I'm live streaming a 1080p media (that's, I'm screencasting my desktop) and transcoding it for less-powerfull devices on wifi (like a sasmung S4 mini smartphone for example).

Here's my current stream output definition:

Code: Select all

#transcode{vfilter=canvas{width=852,height=480},vcodec=h264,venc=x264{profile=baseline,level=3,preset=ultrafast,tune=zerolatency,keyint=50},acodec=aac,ab=128,channels=2,samplerate=44100}:rtp{sdp=rtsp://:9090/desktop.sdp}
For performances reasons, I'm wondering if it could be better to remove the downscaling performed by the canvas vfilter and instead just lowering the h264 ouptput quality by increasing the --crf setting. Something like this:

Code: Select all

#transcode{vcodec=h264,venc=x264{profile=baseline,level=3,preset=ultrafast,tune=zerolatency,crf=28,keyint=50},acodec=aac,ab=128,channels=2,samplerate=44100}:rtp{sdp=rtsp://:9090/desktop.sdp}
According to https://developers.google.com/media/vp9/bitrate-modes/ it seems that it is not a good idea, and that performing downscaling before encoding is better performance-wise.

What do you think in general about this idea of just lowering the CRF quality?

Am I right in believing that downscaling before encoding is better (performance-wise) than simply lowering the CRF quality?

Do the conclusions in https://developers.google.com/media/vp9/bitrate-modes/ also hold true for the x264 encoder?

Thanks for the help.

Cyrille

Re: canvas vfilter vs x264 crf performances

Posted: 26 Jun 2018 21:13
by Jean-Baptiste Kempf
It depends mostly about your bandwidth availability, to be honest. But a S4 should be able to have 720p without any issue.