Hello.
Thanks for reading my topic.
I want convert some videos having codec Xvid to H.264 so need information about bitrate.
For example an video xvid 640X480 use 978 kbps and MP3 128 kbps what is an good and very good bitrate value for H.264 and what is the better sound codec ? ACC or AC3 and what bitrate for good and very good quality ?
Thus which are good and very good bitrate values for type of videos below if using H.264 ?
320X240 30 FPS
640X480 30 FPS
1280X720 30 FPS
1920X1080 30 and 24 FPS
Have an nice week.
+ Reply to Thread
Results 1 to 10 of 10
-
-
Keep mp3; every further conversion degrades the audio.
Thus which are good and very good bitrate values for type of videos below if using H.264 ?
320X240 30 FPS
640X480 30 FPS
1280X720 30 FPS
1920X1080 30 and 24 FPS
My 2c -
Yeah for the x264 encoder it's better to use quality based encoding.
Setting a bitrate lets you specify the file size but you have no idea what the quality will be, as videos usually require different bitrates to compress to the same quality (depending on picture complexity, noise, and motion etc).
CRF encoding lets you specify the quality, but the bitrate/file size becomes the unknown factor. Unless you need a particular file size for some reason, CRF encoding is the way to go.
The lower the CRF value, the higher the quality. Try CRF 18 for standard definition and 720p, and CRF 20 for 1080p (you can get away with slightly lower quality for HD).
http://www.chaneru.com/Roku/HLS/X264_Settings.htm#Ratecontrol
There's an example command line on this page for encoding with ffmpeg and x264's CRF mode while copying the existing audio.
https://trac.ffmpeg.org/wiki/Encode/H.264Last edited by hello_hello; 25th Jun 2025 at 12:01.
Avisynth functions Resize8 Mod - Audio Speed/Meter/Wave - FixBlend.zip - Position.zip
Avisynth/VapourSynth functions CropResize - FrostyBorders - CPreview (Cropping Preview) -
As previous users said: don't convert the audio (avoiding any useless conversion is ALWAYS the best thing to do).. and using CRF 18-20 for video is the way to go.
And don't worry, FFMPEG is an amazing tool, if there's not much detail in a video it will not purposelessly increase the file size. -
if you are on windows .. try
Best-Video-Converter
[check if Xvid is supported]
H.264, also known as AVC, is a video codec, that is paired with the Advanced Audio Codec (AAC) for audio.
Other audio codecs that can be used with H.264 include MP3 and AC-3, depending on the container format.
AAC (Advanced Audio Codec) generally offers better audio quality at lower bitrates and is widely used for
streaming and mobile devices, while AC3 (Dolby Digital) is favored for its surround sound capabilities in
home theater systems.
The choice between them depends on your specific needs, such as file size versus audio experience.
I prefer AVC/AAC .. for max compatibility.Last edited by videoAI; 25th Jun 2025 at 14:21.
As always .. there is nothing wrong with my environment -
@ProWo
"Keep mp3; every further conversion degrades the audio."
If the source video use for example bitrate above 200 kbps is as if converting for AAC 128 or 96 kbps degrade the audio ?
"Use CRF 20 instead of bitrate for all this resolutions."
Here using Shutter Enconder is possible select between VBR , CBR and CQ.
CQ means CRF ?
@hello_hello
@ krykmoon
"Try CRF 18 for standard definition and 720p, and CRF 20 for 1080p (you can get away with slightly lower quality for HD)."
"and using CRF 18-20 for video is the way to go."
I have tested using CQ 18 using ffmpeg NVENC.
Original source file is 170 MB xvid
the coverted file is 411 MB H.264.
Not is exactly the type of convertion I want to use.
For me H.264 does more compression with same quality compared with Xvid, but selected options not are showing it.
I want converting from xvid to H.264 having less file size with same quality.
I have used CQ 30 and the coverted file is 127,3 MB having in some moments few noise. -
Every kind of lossy encoding lose some original information, so: yes.
Hardware Accelerated encoding is usually less efficient (and coherent) than CPU encoding, regarding the file size.
You may try without the NVENC, it should give you better quality and smaller file size. -
Hardware encoding is generally less efficient than software encoding in respect to compression, although it tends to be faster.
It's not uncommon to encode a file with x264 (originally encoded with an older codec such as Xvid) and for the file size not to decrease, or even increase, as if the Xvid encoder introduced artefacts (and it definitely did), when you re-encode the Xvid video the encoder will have to re-encode those artefacts too. That could make the Xvid encoded version harder to compress than the original source would have been.
CQ encoding is not the same as x264's CRF encoding. Both allow you to choose a quality by specifying a CQ or CRF value, but CQ encoding is based on a fixed quantizer value, whereas CRF encoding aims to produce the same visual quality as CQ by adjusting the quantizer according to the picture content.
I know nothing about hardware encoding, but it appears if you want the Nvidia encoder to use adaptive quantisation and b frames etc (for something similar to x264's CRF encoding) you have specify them in the command line. There also appears to be quality presets these days. What was the ffmpeg command line you actually used?
https://docs.nvidia.com/video-technologies/video-codec-sdk/11.1/ffmpeg-with-nvidia-gpu...ty-transcoding
The problem is, the tricks used by the encoder, and therefore the amount it can compress, can vary greatly even though the output will still be a valid h.264 stream. Even for the x264 encoder, the fastest preset will produce much larger file sizes than the slower presets, even when the same CRF value is used (and the quality is roughly the same).
I don't normally use ffmpeg for x264 encoding, but this should be correct if you want to see how it compares.
-i input -c:v libx264 -preset veryslow -crf 18 -c:a copy output.mkvLast edited by hello_hello; 26th Jun 2025 at 10:19.
Avisynth functions Resize8 Mod - Audio Speed/Meter/Wave - FixBlend.zip - Position.zip
Avisynth/VapourSynth functions CropResize - FrostyBorders - CPreview (Cropping Preview) -
Thanks for all replies above.
Thus I have done an test with the original source file Xvid MPEG-4 being
52,3 MB
640X480 29,9 FPS
668 kbps variable bitrate
Using Shutter Enconder with FFMPEG 4 and Geforce GT 640 with NVENC 11.
Using CQ 30 in both cpu and nvenc the encoded file size was
CPU software enconding = 37,7 MB
good quality and variable bitrate maximum 543 kbps
GPU NVENC = 57,5
good quality , but better than cpu enconding.
variable bitrate maximum 782 kbps
If using VBR
CPU enconding VBR 543 kbps = 43,5 MB
good quality ... strangely in some scenes has better quality than using CQ 30
GPU NVENC VBR 782 kbps = 58,5 MB
good quality
If using GPU NVENC CQ 35 = 37,4 MB
good quality and has good file size.
I has done some test converting H.264 to another H.264 with few less bitrate and original video quality is visualy destroyed.
Have an good way to shrink an H.264 for optimize the file size without loss quality ?
Shutter Enconder not has much options for NVENC.
FastFlix can use NVENCC ... NVENCC is an enconder using NVENC with several options.
I will try using Fastflix and NVENCC and then reply the results.
https://github.com/cdgriffith/FastFlix/releases
https://github.com/rigaya/NVEnc/releases
Have an nice week.
Similar Threads
-
convert HEVC video to H.264 mp4 without loosing quality
By jimclark in forum Video ConversionReplies: 8Last Post: 20th Mar 2024, 14:38 -
Information on discs
By pjnz in forum Newbie / General discussionsReplies: 1Last Post: 19th Mar 2024, 08:08 -
Convert movies to Xvid 1.1.2 writing library?
By Emilumin in forum Newbie / General discussionsReplies: 5Last Post: 20th Dec 2022, 17:06 -
Convert Divx to Xvid batch
By nick7461 in forum Video ConversionReplies: 8Last Post: 2nd Oct 2021, 11:37 -
Batch convert H.265 MKVs to H.264
By Nico Darko in forum Video ConversionReplies: 2Last Post: 28th Jun 2020, 17:09