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 6th December 2009, 01:51   #1  |  Link
AiDz0r
⃪ ͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤ ͤͤ
 
AiDz0r's Avatar
 
Join Date: Nov 2009
Location: Australia
Posts: 54
FFdshow with H264/x264 on AVI container.

Guys I need help making the best quality, everything so far I look here is all out-dated. I've got few problems, If there is any suggestions you may please.

Now I'm trying to capture a video from a game called "Counter-Strike" I can capture and edit but when it comes to rendering i need the best encoding format, I've heard people say not to use codec leave it on WMV, others say use H264, and so far I use FFDSHOW on h264/x264 but now when ever i try to upload it to youtube I get an error saying "Failed (unable to convert video file)" I've tried so many things eg: MeGUI, RipBot none of them turned out good. I really don't care about how big the file is its oke for me if itís 150+ Mb/minute. I just want something with good quality, and yet I released that on some XviD or other codec like x264 on its own, when there's an action in the movie like a lot of movements and just pause it and you can see like Big Square Pixel's, and once thatís uploaded to youtube the quality won't turn out good and I just need configuration or even if there's another better way.

So far this is what i do:
From Counter-Strike get the Images (.Tga files) and replace them inside VirtualDub and set frame rate to 120 (120 because it was set like that in Counter-Strike too) and then render as Uncompressed, from there i use Sony Vegas pro to edit and after I edit I render as AVI with "FFDSHOW video encoder" and bitrate as 4500 these are my current settings

thanks
-Aidz0r
AiDz0r is offline   Reply With Quote
Old 6th December 2009, 02:20   #2  |  Link
[ReX]
Registered User
 
Join Date: Jul 2007
Posts: 150
H.264 + AVI is not a good move. You should go with MKV or MP4 as your container.
[ReX] is offline   Reply With Quote
Old 6th December 2009, 02:29   #3  |  Link
AiDz0r
⃪ ͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤ ͤͤ
 
AiDz0r's Avatar
 
Join Date: Nov 2009
Location: Australia
Posts: 54
well oke but how could i do that as the most simplest, VirtualDub gets only AVI's i guess, and its not good using Sony Vegas MP4 ? well what should i do now?
AiDz0r is offline   Reply With Quote
Old 6th December 2009, 02:31   #4  |  Link
[ReX]
Registered User
 
Join Date: Jul 2007
Posts: 150
You can always remux using MKVToolnix after you're done, but if you need it in AVI, just keep it in AVI.
[ReX] is offline   Reply With Quote
Old 6th December 2009, 02:33   #5  |  Link
nm
Registered User
 
Join Date: Mar 2005
Location: Finland
Posts: 2,643
Whatever you do, don't use 1-pass ABR. Use CRF instead (try CRF=18 if you need nearly transparent output). And turn B-frames (3..5) and the loop filter on. TESA is complete overkill. Use UMH. Set threads to 0 if you have a multi-core CPU.
nm is offline   Reply With Quote
Old 6th December 2009, 02:38   #6  |  Link
Stephen R. Savage
Registered User
 
Stephen R. Savage's Avatar
 
Join Date: Nov 2009
Posts: 319
Ignore the comments about AVI. When you upload to YouTube, you have to consider their filesize limit, and there's not a lot you can do about the (crap) encoder they will re-compress your uploaded video with. That said, let's consider a few things:

1) You captured your video and rendered it at 120 fps. This will require 4 times as much bitrate as a 30 fps video, and YouTube will decimate it to 24 or 30 fps anyway. Moreover, there's no point in rendering to 120 fps for the final encode, unless you actually have a 120 fps screen. In VirtualDub, you can use the "Change Framerate" function to drop it to 30 fps. You might need some motion blur though.
2) Enabling B-frames and deblocking (first screenshot) will certainly increase the quality of your encode. Same with trellis (third screenshot).
3) One pass encoding leads to interesting results near the end of the video, as well as lower quality overall. Use two passes.
4) If you are concerned about compatibility, you can same another AVI in VirtualDub and then encode that. You could even use a lossless codec here to save some space.5) 5) There are a bunch of x264 GUIs. Try RipBot264 or something.

Point #1 is the most important one here.

Last edited by Stephen R. Savage; 6th December 2009 at 02:41.
Stephen R. Savage is offline   Reply With Quote
Old 6th December 2009, 02:38   #7  |  Link
RunningSkittle
Skittle
 
RunningSkittle's Avatar
 
Join Date: Mar 2008
Posts: 539
Your making this WAY too complicated. Just make a simple avisynth script and feed that to x264.exe. STOP USING VFW!!

(write this in notepad, and change extension to avs)
Code:
DirectShowSource("x:\path\file.tga")
ConvertToYV12()
Code:
x264.exe --preset slow --output "x:\path\x264output.mkv" "x:\path\avisynthscript.avs"
Read about x264 presets and tunings here: http://mewiki.project357.com/wiki/X264_Settings
Read about avisynth here: http://forum.doom9.org/forumdisplay.php?f=33
Get x264 here: http://www.x264.nl
RunningSkittle is offline   Reply With Quote
Old 6th December 2009, 02:47   #8  |  Link
AiDz0r
⃪ ͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤ ͤͤ
 
AiDz0r's Avatar
 
Join Date: Nov 2009
Location: Australia
Posts: 54
thanks alot, oke now im re-rendering with what you said on "b frames" the "max. consecutive b frames" is set to 1 hope thats fine and deblock are set to 0 both of them. One last thing ar 4) what do you mean, should i render uncompressed from Sony vegas and Encode it from VirtualDub or RipBot264, btw for ripbot264 you need these .txt (presets) and i don't know which ever is the best.
AiDz0r is offline   Reply With Quote
Old 6th December 2009, 02:48   #9  |  Link
AiDz0r
⃪ ͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤ ͤͤ
 
AiDz0r's Avatar
 
Join Date: Nov 2009
Location: Australia
Posts: 54
hmm, now i see. thats why the new x264 wasn't a installer, well then whats wrong with VFW's ? those are outdated or something too?
AiDz0r is offline   Reply With Quote
Old 6th December 2009, 02:53   #10  |  Link
RunningSkittle
Skittle
 
RunningSkittle's Avatar
 
Join Date: Mar 2008
Posts: 539
Yes, dont use it. Its easier to use x264.exe anyway.
RunningSkittle is offline   Reply With Quote
Old 6th December 2009, 02:59   #11  |  Link
AiDz0r
⃪ ͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤ ͤͤ
 
AiDz0r's Avatar
 
Join Date: Nov 2009
Location: Australia
Posts: 54
Oke whats the avs for then?, i Use VirtualDub to make it an uncompressed, and its not 1 .TGA file its like 1000 of them. its images and i use virtualdub to make it a AVI file
AiDz0r is offline   Reply With Quote
Old 6th December 2009, 03:05   #12  |  Link
nm
Registered User
 
Join Date: Mar 2005
Location: Finland
Posts: 2,643
Quote:
Originally Posted by Stephen R. Savage View Post
When you upload to YouTube, you have to consider their filesize limit
2 GB is quite a lot for 10 minutes of H.264 video, even for 1080p. I'd consider the filesize limit irrelevant in this case.

Quote:
and there's not a lot you can do about the (crap) encoder they will re-compress your uploaded video with
I hear they're using x264 for HD video.

Quote:
3) One pass encoding leads to interesting results near the end of the video, as well as lower quality overall. Use two passes.
One-pass CRF is perfectly fine for this purpose and saves a lot of encoding time.
nm is offline   Reply With Quote
Old 6th December 2009, 03:15   #13  |  Link
AiDz0r
⃪ ͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤ ͤͤ
 
AiDz0r's Avatar
 
Join Date: Nov 2009
Location: Australia
Posts: 54
Well im going to render as RunningSkittle said but the only thing for AVS i didn't use a tga file, I edited my video from sony vegas and rendered it as Uncompressed AVI then replaced
Code:
DirectShowSource("x:\path\file.tga")
with
Code:
DirectShowSource("D:\Uncompressed.avi")
hope im doing the right thing.
AiDz0r is offline   Reply With Quote
Old 6th December 2009, 03:31   #14  |  Link
AiDz0r
⃪ ͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤ ͤͤ
 
AiDz0r's Avatar
 
Join Date: Nov 2009
Location: Australia
Posts: 54
I just found this on the internet, will it work and Is it Good!?? please feedback

Code:
--pass 2 --bitrate 4500 --stats ".stats" --level 4.1 --ref 3 --mixed-refs --bframes 3 --b-rdo --bime --weightb
--direct auto --nf --subme 6 --trellis 1 --partitions p8x8,b8x8,i4x4,i8x8 --8x8dct --ipratio 1.1 --pbratio 1.1
--vbv-bufsize 9000 --vbv-maxrate 24000 --qcomp 0.5 --me umh --merange 12 --threads auto
--thread-input --progress --no-psnr --no-ssim --output "output" "input"
AiDz0r is offline   Reply With Quote
Old 6th December 2009, 03:39   #15  |  Link
AiDz0r
⃪ ͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤ ͤͤ
 
AiDz0r's Avatar
 
Join Date: Nov 2009
Location: Australia
Posts: 54
I get unkown Option's now D:
AiDz0r is offline   Reply With Quote
Old 6th December 2009, 03:53   #16  |  Link
Inspector.Gadget
Registered User
 
Join Date: May 2008
Posts: 1,618
Quote:
I just found this on the internet, will it work and Is it Good!??
The answer to that question is almost always "No."
Inspector.Gadget is offline   Reply With Quote
Old 6th December 2009, 03:54   #17  |  Link
JEEB
もこたんインしたお!
 
JEEB's Avatar
 
Join Date: Jan 2008
Location: Finland / Japan
Posts: 510
1) You can load AVI files with AVISource or DSS (DirectShowSource) -- since DSS rather never really is good at certain things, I'd rather keep away from it if only possible (If whatever you saved your video with is directshow-only or if DSS gives you better output, then it's alright to use).

2) Damn, you were given links and examples... just that they missed ratecontrol (which you should decide by yourself -- here I'm using the 1pass CRF "constant quality" mode with a value 19, which is rather transparent on HD video and quite OK'ish SD, depending on your eyes and usedness to perfection. Higher value means "use less bitrate" and a lower one means "use more bitrate", so basically you can try finding the highest value that still gives you acceptable output and keep encoding with that.
Code:
x264.exe --crf 19 --preset slow --output "x:\path\x264output.mkv" "x:\path\avisynthscript.avs"
I usually write the input file name before the settings and use -o instead of --output for the output setup. I also would not recommend using old MeGUI profile settings in any case, which is what you seem to have found...

Also, you were linked with this URL, which explains the presets, which is pretty much all that you need to touch when encoding. Tuning might come in later, but I'd say that mostly you can just use the preset to control the quality/speed compression ratio.
__________________
[I'm human, no debug | Unofficial x264 Builds]
JEEB is offline   Reply With Quote
Old 6th December 2009, 04:19   #18  |  Link
AiDz0r
⃪ ͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤ ͤͤ
 
AiDz0r's Avatar
 
Join Date: Nov 2009
Location: Australia
Posts: 54
Oke I do understand things now, fistly let me fully explain what i do,

1- a game named "Counter-Strike" Fist person shooting game, i take images from that game and i set the fps to 120 so evey second i receive 120 Frames of images.
2- I use VirtualDub to make all those images into 1 AVI file, (Uncompressed)
3- I use Sony Vegas Pro to Edit/effect the movie. and render again Uncompressed AVI Force it to 30FPS
4- Now i use x264.exe to encode it

Now eveything seems so good, except the presets, all i need is one that Locks framerate to 30 and resolution to 1280x720, and with CRF what will be the quality, because these videos ill be doing will be uplaoded to an Online streem (Youtube)....

**And i don't need to use AVS all i just do is locate the Uncompressed AVI with edited one. (step 3)**

so now it would look something like

Code:
x264.exe --crf 19 --preset slow --output "x:\path\x264output.mkv" "x:\path\uncompressed.avi"
right?
AiDz0r is offline   Reply With Quote
Old 6th December 2009, 04:40   #19  |  Link
AiDz0r
⃪ ͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤ ͤͤ
 
AiDz0r's Avatar
 
Join Date: Nov 2009
Location: Australia
Posts: 54
JEEB here's a video of 3 seconds in counter-strike i just uploaded it to youtube...
http://www.youtube.com/watch?v=JVLzMmLTdEs
AiDz0r is offline   Reply With Quote
Old 6th December 2009, 04:44   #20  |  Link
AiDz0r
⃪ ͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤͤ ͤͤ
 
AiDz0r's Avatar
 
Join Date: Nov 2009
Location: Australia
Posts: 54
I get a better quality way better quality on normal uncompressed so its not about the actual file.


This is what happened when i encoded it from x264.exe and upload it to youtube (It's not suppose to be like this, i've seen better video's with better quality)

Last edited by AiDz0r; 12th December 2009 at 11:46.
AiDz0r is offline   Reply With Quote
Reply

Tags
codec, ffdshow, h264, x264

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 02:40.


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