View Full Version : X264 encoder settings for SD content captured from camcorder
somy
16th January 2014, 17:13
Hi,
I have some uncompressed AVI files captured from my old camcorder, and videos are interlaced (50i) in DVD quality.
To reduce the storage size, I'd like to convert them to MP4 with the help of X264 (with GUI).
I'd like to ask whether if it is the correct way to go and if so,
what would be the optimal settings for X264 encoder if I want the max. quality and reasonable file size?
Thank you in advance!
Stereodude
16th January 2014, 17:20
Whether it's the correct way to go or not depends on what you want to do with these files down the road. That usage may also drive the "optimal" settings.
Do you plan to just watch them as is occasionally? You want to save them for later editing / processing work?
FWIW, max. quality and reasonable file size are generally on opposite ends of the spectrum so you're going to have to compromise somewhere.
somy
16th January 2014, 19:29
Whether it's the correct way to go or not depends on what you want to do with these files down the road. That usage may also drive the "optimal" settings.
Do you plan to just watch them as is occasionally? You want to save them for later editing / processing work?
FWIW, max. quality and reasonable file size are generally on opposite ends of the spectrum so you're going to have to compromise somewhere.
Thank you for your reply and sorry I didn't write it clearly.
I plan to keep the videos in my PC and just watch them occasionally, I don't plan to edit them further.
I tried to encode the video to mpeg2 with the bitrate 9000kbs, and I'm happy with the result. I'd like to know what would be the proper bitrate if I use X264 encoder instead? I'd like to keep the quality at least similar to 9000kbs mpeg2.
Thank you!
Stereodude
16th January 2014, 19:43
You probably should use the veryslow preset and find the CRF value that looks acceptable to you by encoding a sample, watch the results, and adjusting the CRF setting upward (lower numbers) until you are happy with the results. You could start at something like 20. Once you are happy with the video quality from that CRF value encode all the video files you have with that CRF.
So your command line would look something like this:
x264 --crf 20 --preset veryslow --tune film --level 3.1 --keyint 25 --open-gop --tff --colorprim "bt470bg" --transfer "bt470bg" --colormatrix "bt470bg" --sar 12:11 -o out.264 input.avi
This assumes your content is PAL 704x576, 4:3, and top field first.
somy
16th January 2014, 22:20
@somy:
Please edit your thread title to make it comply with forum rule #12 (http://forum.doom9.org/forum-rules.htm). Thanks!
Modified, sorry!
somy
16th January 2014, 22:26
You probably should use the veryslow preset and find the CRF value that looks acceptable to you by encoding a sample, watch the results, and adjusting the CRF setting upward (lower numbers) until you are happy with the results. You could start at something like 20. Once you are happy with the video quality from that CRF value encode all the video files you have with that CRF.
So your command line would look something like this:
x264 --crf 20 --preset veryslow --tune film --level 3.1 --keyint 25 --open-gop --tff --colorprim "bt470bg" --transfer "bt470bg" --colormatrix "bt470bg" --sar 12:11 -o out.264 input.avi
This assumes your content is PAL 704x576, 4:3, and top field first.
Thanks! I tried CRF 20 in HandBrake which looks fine to me, and the size is half of the original mpeg2 file.
I have one doubt though, my original videos are interlaced with 25 FPS. If I use decomb option in HandBrake, shall I set the output FPS to 25 or 50?
Atak_Snajpera
16th January 2014, 23:16
50 fps
Stereodude
16th January 2014, 23:42
Thanks! I tried CRF 20 in HandBrake which looks fine to me, and the size is half of the original mpeg2 file.
I have one doubt though, my original videos are interlaced with 25 FPS. If I use decomb option in HandBrake, shall I set the output FPS to 25 or 50?Deinterlace or decomb? Your footage is interlaced, and it's highly unlikely a decomb (IVTC) operation is the proper thing to do to it. If a CRF of 20 is fine, keep trying higher numbers until it's not fine, then go back down 1.
nm
16th January 2014, 23:59
HandBrake's decomb filter is a deinterlacer with various parameters and algorithm options.
Asmodian
17th January 2014, 04:12
Thanks! I tried CRF 20 in HandBrake which looks fine to me, and the size is half of the original mpeg2 file.
I just want to make sure but you are starting with the uncompressed AVIs in HandBrake and not the MPEG2s, right?
somy
17th January 2014, 09:12
I just want to make sure but you are starting with the uncompressed AVIs in HandBrake and not the MPEG2s, right?
Thanks for the hint! That was the plan until yesterday I found out that I deleted the original AVIs long time ago......
I guess your point is the transcoding from compressed MPEG2 to H264 will suffer quality loss, and in this regard maybe it is better to keep the MPEG2 files?
somy
17th January 2014, 09:13
HandBrake's decomb filter is a deinterlacer with various parameters and algorithm options.
That's how I read it in Handbrake's WIKI. Decomb applys YADIF (slower deinterlacing) when it detect the frame which needs deinterlacing. However the manual it doesn't say whether I should double the frame rate or not.
:(
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.