View Single Post
Old 5th November 2015, 10:27   #2  |  Link
Chyrka
Registered User
 
Join Date: Oct 2011
Location: Kyiv, Ukraine
Posts: 24
Continuation

Joined m2ts exception
If you have encoded Blu-ray with episodes joined into a single m2ts file, after indexing and chapter extraction you will have three files in each BD folder: the index-file, the file with chapters and the QP-file.
Now create a script-file (by the AvsPmod editor) and and save it in the same folder as “01.avs” for example.
After that we can move to encoding preparation. Let’s start chapters. We can copy or modify the created earlier file. I prefer to copy it and have a backup. Open it in the Notepad. It looks like this

And here we should recognize a “structure” of chapters and catch a regularity in time marks. After that just type the proper names for each of them up to the end of the file.

Now create ‘xcode.bat’ with the single line where encoding parameters are defined:
Code:
avs2yuv -raw "01.avs" -o - | x264.exe - --demuxer raw --input-res 1920x1080 --fps 24000/1001 --input-depth 10 --crf 16 --ref 4 --mixed-refs --deblock 0:0 --bframes 16 --direct auto --min-keyint 24 --keyint 240 --scenecut 40 --rc-lookahead 60 --b-adapt 2 --trellis 2 --weightb --psy-rd 1.0:0.1 --no-mbtree --aq-mode 1 --aq-strength 0.8 --partitions p8x8,b8x8,i4x4,i8x8 --no-fast-pskip --subme 11 --me umh --merange 32 --qcomp 0.6 --qpmax 40 --vbv-maxrate 50000 --vbv-bufsize 62500 --colorprim bt709 --colormatrix bt709 --transfer bt709 --qpfile qpf.txt -o 01.264
Encode it.
The next step is audio streams extraction that is described in the section Extraction of HD audio from m2ts for BD rips.
Final step is muxing. In this case I prefer to use MKVMerge GUI.
Run MKVMerge GUI and drop the encoded video file and extracted audio file here.
Now is the most important part of the muxing set-up process. Move to the tab “Global”, in the “Splitting” section set splitting by timecodes and type corresponding times of each episode beginning. Also we should specify the chapter-file in the “Chapters” section.

Now we can start muxing. After finishing the process, we obtain a set of files for each episode 01-00x.mkv. They should be renamed with proper names and episode numbers manually or by yet another bat-file.
Do the same operations for each BD.
Extraction of HD audio from m2ts for BD rips
Unlike DVD indexer that perfectly extract DVD audio, HD audio is better to extract by eac3to.
If you have joined episodes on the Blu-ray, I propose to use eac3to with GUI UsEac3To. Drag-and-drop the main *.m2ts file to the main window of the program. Wait till the scanning complete.

Now look at the number of interested stream (1), set it in the droplist (2), chose desirable format (3), press “Add” button (4) and run the command line by the button (5). Wait for the finish of encoding.
In the more usual case with separated files for each episode it is better to use command line.
Firstly, find the number of the audio stream by using GUI UsEac3To as it is described above (step (1)). After that create a file ‘xtract.bat’ with the next line (as example)
Code:
"C:\Program Files (x86)\eac3to\eac3to.exe" "G:\Anime\Chihayafuru_S2\CHIHAYAFURU_2_1\BDMV\STREAM\00003.m2ts" 3:"G:\Anime\Chihayafuru_S2\Orig Sound\01.flac"
Replicate this line for each episode and modify episode numbers and corresponding disc indexes.
Finally, run this bat-file before muxing of the rip.
Good luck.
Chyrka is offline   Reply With Quote