Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 3rd August 2020, 20:19   #1  |  Link
desktop_ready
Registered User
 
Join Date: Jul 2020
Posts: 2
FFmpeg and h264_vaapi

Hello,

Not sure if this is the right forum.
I have an Intel CPU and I wanted to use hardware acceleration to encode videos in H.264.

Without the hardware acceleration, I am currently having good results with the veryslow preset (which is using CRF 23 I believe):
Code:
ffmpeg -i <input>  -acodec aac -vcodec libx264 -preset veryslow  -y <output>
With the hardware acceleration, I can use:
Code:
ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format vaapi -i <input> -acodec aac -vcodec h264_vaapi  -b:v 6M -y <output>
As you can see, I manually specified the bitrate (6M) which does not result in the same quality as using CRF.

Is there any way I can improve the quality of the results without messing too much with the parameters depending on the video ?

Thanks
desktop_ready is offline   Reply With Quote
Old 3rd August 2020, 22:00   #2  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,997
Hardware accelerated H.264 encoding will generally need many more bits per frame to match x264 quality, especially if veryslow is your reference.
Blue_MiSfit is offline   Reply With Quote
Old 4th August 2020, 06:38   #3  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,846
Quote:
Originally Posted by Blue_MiSfit View Post
Hardware accelerated H.264 encoding will generally need many more bits per frame to match x264 quality, especially if veryslow is your reference.
It would be interesting to know how many percent more bits hw encoding needs in general to match quality of software encoding.
stax76 is offline   Reply With Quote
Old 4th August 2020, 20:02   #4  |  Link
desktop_ready
Registered User
 
Join Date: Jul 2020
Posts: 2
Basically I am just looking for a general purpose command-line which can be applicable for all kind of videos.
The preset veryslow is working very well for that purpose.
I am a bit lost with h264_vaapi.
desktop_ready is offline   Reply With Quote
Reply

Tags
crf, ffmpeg, h264_vaapi

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 23:49.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.