Encoding
[size=16][b]Encoding Bluray with cmd[/b][/size]
Preparing: Download AviSyth 2.5 and install, then download following rared applications: http://rapidshare.com/files/141663400/Aplikacje.rar Inside you have rared plugins to AviSynth, extract them to AviSynth/Plugins in program files. Now we can start encoding :)
[b]1)Demuxing audio:[/b]
Open tsRemuxer and drag n drop movie file to it. On the bottom, uncheck unnecessary stuff like video and subtitles, leave only audio track you want to demux.
At the bottom, change checked dot to "Demux", choose the track. Demux! :)
[b]2)Calculating bitrate:[/b]
Open meGUI. Go to tools --> bitrate calculator and enter movie runtime (in hours, minutes and seconds). Choose 23.976 fps and check B-frames. Choose the audio file you wanna put into the encode. Next, type demanded size in File Size. You will get calculated bitrate.
Image:[img]http://www.image-load.eu/out.php/i88912_Bitrate.PNG[/img]
[b]3)Making Graph:[/b]
To make it work we have to set in ffdshow video settings H.264/AVC and VC-1 for libavodec. We have to open GraphEdit program, in menu we choose Graph --> Insert Filters (CTRL+F)--> DirectShow Filters --> Haali Media Splitter and me click on "Insert Filter". It will the new window pop up, in which we have to choose from which movie file we want to encode. We have to re-open "Insert Filter" and now we choose "ffdshow Video Decoder" from DirectShow Filters. Next we have to connect this two boxes with an arrow. For the end we have to save this graph into the movie folder (xxx.grf). And thats it! We can continue in the next point :)
Image:[img]http://www.image-load.eu/out.php/i88913_Graph.PNG[/img]
[b]
4)Making the script:[/b]
1. starting writing the script: We write in notepad:
directshowsource("E:xxx.grf",audio=false,fps=23.976) converttoyv12()
We have to save it as xxx.avs (Your script name). Open AvsP program and we load in sript. We have to choose some light scene in the movie and the we zoom it for 400% to see how much we have to crop it. Then we make it 100% zoom again. We have to click right mouse button-->crop and we cut all the black bars. Click Apply and see to its good or nor:) If every black bar is out we can make a new line in a script and wite, if:
-source has blocks and bandings, which shows often in the dark scenes:
Blockbuster(method="noise",detail_max=8,cache=4096)
-we have to sharp it a little:
LimitedSharpenFaster(strength=xx) // for xx random numbers, for 720p encode best opptions are 10-25
Then, after all done, save script.
2. Count Resolution:
Lets say You crop by (1,120,-1,-120). So resolution is 1918x840. If You want to do 720p encode You have to do: (840/1918)*1280=560,5 So its 1280x560. Then we have to change line with Crop(1,120,-1,-120) to Spline36Resize(1280,560,1,120,-1,-120)
3. Making test encode:
If You want to do a test encode, just a few frames, in the end of script You write: trim(xxxx,yyyy) //where xxxx its a start frame and yyyy is a finish frame, so for example, if You will write: trim(2334,2534), it will encode only 200 frames :)
[b]5)Making executable file:[/b]
Open notepad, and type commands required to encoding (I use the following):
x264.exe --pass 1 --bitrate xxxx --stats "xxxx.stats" --ref 5 --mixed-refs --no-fast-pskip --bframes 6 --b-pyramid --b-rdo --b-bias 0 --bime --weightb --filter -3,-3 --subme 6 --trellis 2 --aq-strength 1.2 --analyse all --8x8dct --me umh --threads 6 --progress --no-psnr --output NUL "xxxx.avs" x264.exe --pass 2 --bitrate xxxx --stats "xxxx.stats" --ref 5 --mixed-refs --no-fast-pskip --bframes 6 --b-pyramid --b-rdo --b-bias 0 --bime --weightb --filter -3,-3 --subme 6 --trellis 2 --aq-strength 1.2 --analyse all --8x8dct --me umh --threads 6 --progress --no-psnr --output "xxxx.mkv" "xxxx.avs" pause
Save the files as encode.bat in the folder with .avs, .grf and the movie files.
[b]6)Encoding:[/b]
Download the latest version of x264 from http://x264.tk, extract .exe file to encoding folder and doubleclick on encode.bat