Log in

View Full Version : Any suggestions to speed up x264 conversion for this command line ?


mordorspfc
3rd November 2009, 17:27
Hey guys,

Im using this command line to convert my videos:

Title %~n1 -- pass 1
"C:\ffmpeg\ffmpeg.exe" -i %1 -acodec libfaac -ab 96k -vcodec libx264 -g 250 -keyint_min 25 -vpre C:\ffmpeg\ffpresets\libx264-hq.ffpreset -crf 25 -threads 0 -f flv "%~dp1%~n1.flv"

The input and output names are like that because this way i can just right on files and "Send To" a .bat file.

Anyways, with this command line im getting around 70 fps on a xeon x3360 (2.83ghz), 8gb ram, windows server 2003 64bit

Its 70 fps for 1 single file, if i convert lets say 3 files at a time, it will be like 25 per file.

Is there anything i can do to speed this up ?? I read something about hardware acceleration, can i implement it somehow ? Or do i need a specific hardware to do it ??

Any suggestion is appreciated, thank you.

Dark Shikari
3rd November 2009, 17:53
Use a faster preset, like normal. Worse compression, faster encoding.

nm
3rd November 2009, 18:17
Is there anything i can do to speed this up ?? I read something about hardware acceleration, can i implement it somehow ? Or do i need a specific hardware to do it ??

As DS said, use a faster preset if you need more speed.

Hardware decoding of some common formats is possible with AviSynth and DG NV Tools (http://forum.doom9.org/showthread.php?t=147945) (license costs $15 (http://neuron2.net/dgavcdecnv/dgavcdecnv.html)), if you have an NVIDIA GPU with at least VP2 video decoding capabilities. This will only boost encoding speed if your sources are HD video.

GPU-accelerated encoding is not really useful at the moment.

mordorspfc
4th November 2009, 10:56
I thought the quality would drop too much, but no, normal preset still gives a decent quality. Convertion speed for one file went up to 190fps.

Thanks a lot DS and nm, appreciate it.

mara-
7th November 2009, 17:59
Since my question is similar to this topic, I wont create new topic. I used following command line in MeGUI to convert 1h 43mn long video. Source was 1080p movie with 8GB size. I converted it to 720p, 4GB size, just video, without audio.

program --profile high --level 4.1 --preset fast --pass 2 --bitrate 4534 --stats ".stats" --thread-input --deblock -1:-1 --keyint 24 --min-keyint 2 --bframes 3 --b-adapt 2 --direct auto --b-bias 0 --scenecut 40 --ref 3 --ipratio 1.1 --pbratio 1.1 --vbv-bufsize 30000 --vbv-maxrate 40000 --qcomp 0.5 --rc-lookahead 40 --no-mbtree --aq-mode 1 --aq-strength 1.0 --merange 16 --me umh --subme 7 --partitions p8x8,b8x8,i4x4,i8x8 --trellis 2 --psy-rd 1.0:0 --mvrange 511 --nal-hrd --sar 1:1 --output "output" "input"

It took me 10 hours for second pass and maybe 2-3 hours for first. Second pass was going 3FPS, I can't remember for the first but it was much higher. Now, is this normal speed for Core2Duo E4500 @2.2GHz? Somehow it seems very slow, but I'm new to this and I can't say is this normal. For other specs, I have 3GB RAM and 8600GT 256MB graphic card. I'm on Windows 7 and I'm using latest Jeeb's x264.exe. Thanks in advance for any input.

Cheers ;)

Limit
7th November 2009, 18:06
"--me hex --trellis 1" should be much faster.

Dark Shikari
7th November 2009, 18:24
Since my question is similar to this topic, I wont create new topic. I used following command line in MeGUI to convert 1h 43mn long video. Source was 1080p movie with 8GB size. I converted it to 720p, 4GB size, just video, without audio.

program --profile high --level 4.1 --preset fast --pass 2 --bitrate 4534 --stats ".stats" --thread-input --deblock -1:-1 --keyint 24 --min-keyint 2 --bframes 3 --b-adapt 2 --direct auto --b-bias 0 --scenecut 40 --ref 3 --ipratio 1.1 --pbratio 1.1 --vbv-bufsize 30000 --vbv-maxrate 40000 --qcomp 0.5 --rc-lookahead 40 --no-mbtree --aq-mode 1 --aq-strength 1.0 --merange 16 --me umh --subme 7 --partitions p8x8,b8x8,i4x4,i8x8 --trellis 2 --psy-rd 1.0:0 --mvrange 511 --nal-hrd --sar 1:1 --output "output" "input"

It took me 10 hours for second pass and maybe 2-3 hours for first. Second pass was going 3FPS, I can't remember for the first but it was much higher. Now, is this normal speed for Core2Duo E4500 @2.2GHz? Somehow it seems very slow, but I'm new to this and I can't say is this normal. For other specs, I have 3GB RAM and 8600GT 256MB graphic card. I'm on Windows 7 and I'm using latest Jeeb's x264.exe. Thanks in advance for any input.

Cheers ;)Start by using a simpler commandline; everything becomes easy if you don't use 20 irrelevant options.

Forteen88
7th November 2009, 18:53
Since my question is similar to this topic, I wont create new topic. I used following command line in MeGUI to convert 1h 43mn long video. Source was 1080p movie with 8GB size. I converted it to 720p, 4GB size, just video, without audio.

program --profile high --level 4.1 --preset fast --pass 2 --bitrate 4534 --stats ".stats" --thread-input --deblock -1:-1 --keyint 24 --min-keyint 2 --bframes 3 --b-adapt 2 --direct auto --b-bias 0 --scenecut 40 --ref 3 --ipratio 1.1 --pbratio 1.1 --vbv-bufsize 30000 --vbv-maxrate 40000 --qcomp 0.5 --rc-lookahead 40 --no-mbtree --aq-mode 1 --aq-strength 1.0 --merange 16 --me umh --subme 7 --partitions p8x8,b8x8,i4x4,i8x8 --trellis 2 --psy-rd 1.0:0 --mvrange 511 --nal-hrd --sar 1:1 --output "output" "input"

It took me 10 hours for second pass and maybe 2-3 hours for first. Second pass was going 3FPS, I can't remember for the first but it was much higher. Now, is this normal speed for Core2Duo E4500 @2.2GHz? Somehow it seems very slow, but I'm new to this and I can't say is this normal. For other specs, I have 3GB RAM and 8600GT 256MB graphic card. I'm on Windows 7 and I'm using latest Jeeb's x264.exe. Thanks in advance for any input.

Cheers ;)Quality takes time (although your settings aren't high-quality for that bitrate if it's normal film, not cartoon/anime). Write "start /low /b myvideo.bat" to make your batchfile take less resources if you are using your encoding-computer for other things.
I'd use --deblock -3:-3 --merange 24 --aq-strength 0.8 for HD-resolutions (also subme 10, but that's for high-quality/longer encodingtime).

mara-
7th November 2009, 20:24
Thank you for the input guys. I was using Standalone Bluray preset which I got from MeGui update. Can somebody tell how much difference in quality is between preset I mentioned and preset Standalone Bluray Fast? For fast command is:

program --profile high --level 4.1 --preset fast --pass 2 --bitrate 4534 --stats ".stats" --thread-input --deblock -1:-1 --keyint 24 --min-keyint 2 --bframes 3 --direct auto --b-bias 0 --scenecut 40 --ref 3 --ipratio 1.1 --pbratio 1.1 --vbv-bufsize 30000 --vbv-maxrate 40000 --qcomp 0.5 --rc-lookahead 40 --no-mbtree --aq-mode 1 --aq-strength 1.0 --merange 12 --subme 5 --partitions p8x8,b8x8,i4x4,i8x8 --trellis 0 --psy-rd 0:0 --mvrange 511 --nal-hrd --sar 1:1 --output "output" "input"

Cheers ;)

Forteen88
7th November 2009, 20:44
@mara-: I forgot to mention, you can use your graphicscard for hardware-decoding (of the source) to make it somewhat faster when encoding (if your graphicscard supports CUDA or maybe even DXVA). I don't know how good MeGUI's Standalone Bluray preset is, but --subme 5 sucks for quality :P
darkshikari wrote: "Well, in terms of quality, I'd say that the least useful things relative to speed cost are trellis 2, me esa/tesa, ref 16 (for most sources), etc. This is not really because they're not useful, but rather because they take so much time. Subme 9 will give far more benefit relative to speed than any of those."

mara-
8th November 2009, 00:12
MeGUI's Standalone Bluray preset is command I posted in my first post of this topic. And, thank you for the information on what commands slows the most. I adjusted some options according to suggestion. I'll check the speed with my next conversion. One more question. How much is the difference in quality when using Hexagon or Multi hexagon M. E. Algorithm?

Cheers ;)