Sunday, November 06, 2005

Convert HD to DVD (old hipix notes)

OK, I have a reliable Hipix files --> DVD+R disc process, after dorking around countless days with *many* mpeg/dvd/ac3/vob/ifo/divx/avi utils and reading many webpages & this avs thread. And yes, audio and video are in-sync.

With this process, I can convert my HD/SD hipix files to standard DVD-R discs that play in my basic DVD STB. So far I get 2GB = 1hour of video at 16:9 DVD quality. That's about 2 hours per DVD+R.

It involves:

* Converting the hipix .ts files to a file (call it "file1.mpg") with HDTVtoMPEG2. I use the 09 version.

* Extracting (demuxing) the video stream from file1.mpg with TMPG Enc. Call it file2.m2v. Discard the extracted ac3; why? see below.

* Converting (encoding) file2.m2v to DVD standard video with TMPG. As you know, this requires a lot of cpu. Call this file2_converted.m2v

* Extracting (demuxing) the ac3 audio from file1.mpg with DVD2AVI. Call it file3.ac3

* Fixing the sync (delay adjust) of file3.ac3 with AC3Machine. Call it file3_adjusted.ac3

* Creating the DVD (VOB) files with IfoEdit 0.95 ("DVD Author" menu item) with file2_converted.m2v and file3_adjusted.ac3. Dump to a VIDEO_TS directory. Test play from hard drive.

* Burn to DVD+R/+RW with RecordNow Max.

Now that I have this down. I let my PC encode the video for 16hrs and then mux/adjust everything.

Notes:
a. I can correct the aspect ratio to 16:9 using ifoedit. Load vts_01_0.ifo and double click the lines that have "4:3". Save.
b. Don't forget to do "Get VTS sectors" on video_ts.ifo in ifoedit before burning.
c. Max file size of fat32 restricts you to 4GB files. May have to join finished VOB files with something like Vobedit.
d. I use TMPG's DVD (NTSC) template.
e. Demuxing ac3 with DVD2AVI gives you the delay (in ms) to adjust for video/audio sync. AC3Machine automatically sets itself to add/chop by this delay amount. I used to have to convert the ac3 to wav, adjust delay in Sound Forge, then convert back to ac3. After much research, my final approach is faster and keeps everything in the ac3 domain.
f. Had to make sure I installed m2v.vfp into the TMPG dir. and set its priority in Environment settings higher than Directshow file reader.
g. TMPG radio button setting: "ES (Video only)"
h. Doom9 has a good AC3Machine guide
i. Dvdrhelp.com has a good "DVD authoring with freeware/ifoedit" guide

Many late nights spent finding this recipe. But now I'm happy. ah...

fluf

---

Indeed, a single program that can do all of these steps would be great. It is certainly possible. Most of these tools have source code available. So, it would involve taking the pieces and integrating them into one program.

A workaround would be to make a macro that does all of these steps.

After converting more last night, I think I can eliminate some steps from my recipe. I noticed that dvd2avi can load multiple m2v files numbered 000,001,002,etc. Using the d2v file from dvd2avi, I might be able to cut out a couple steps: creating the m2v (use d2v instead) with tmpg and joining the VOBs with Vobedit (dvd2avi ac3 output will be one file). The downside is that the encoding step may take a little longer.

Will try and see if there's a significant time difference...

fluf

---

Last night I optimized the process as follows:

* Converting the hipix .ts files to a file (call it "file1.mpg") with HDTVtoMPEG2. I use the 09 version.

* Loading file1.mpg in DVD2AVI. Creating a small d2v file for the video with DVD2AVI. Call it file2.d2v. At the same time, this extracts (demuxs) the audio stream from file1.mpg with DVD2AVI. Call it file3.ac3. [If you have a series of .mpg files (eg. file000.mpg, file001.mpg, etc.) DVD2AVI can process them all at once: just load the 000 file.]

* Converting (encoding) the video to DVD standard video with TMPG. Load file2.d2v as the video source. As you know, this requires a lot of cpu. Call this file2_converted.m2v (requires m2v.vfp in the TMPG dir).

* Fixing the sync (delay adjust) of file3.ac3 with AC3Machine. Call it file3_adjusted.ac3

* Creating the DVD (VOB) files with IfoEdit 0.95 ("DVD Author" menu item) with file2_converted.m2v and file3_adjusted.ac3. Dump to a VIDEO_TS directory. Test play from hard drive.

* Burn to DVD+R/+RW with RecordNow Max.

This recipe works too and eliminates the separate m2v and ac3 demuxing steps. Also saves disk space cuz you can now encode the .mpg directly via the .d2v file.

fluf

---

I'm using an unmodified version of DVD2AVI. "1.77.3 by LOLI.J"

fluf

---

Yes, you won't get precise chopping with HDTVtoMPEG2, but it's better than nothing. Actually, I don't even bother with that chopping interface. What I do is go ahead and encode the whole thing, and then set chapter points when the show comes back from a commericial. When watching and a commercial starts, I hit the next-chapter button on my DVD player, and PRESTO, I'm resuming the show. [there is a trick to setting chapter points in IfoEdit: you decide on the mm:ss elapsed where you want the chapter point, then convert to frames for the celltimes.txt file. So if I want a point at 7:55, my spreadsheet does ((7*60)+55)*29.97 = the_value for celltimes.txt.]

I haven't run into any problems with sync drift yet. I will keep an eye on it though and report if I see it. I did see stuff like that when I experimented with divx a looooong time ago. As long as the ac3 file differs from the video by only the DELAY amount, I don't think there will be a problem. I have determined that the delay amount is the amount that must be deleted from the front of the audio file.

fluf

---

Did you try an un-altered version of DVD2AVI? I'm using the latest DVD2AVI directly from the developer (no add-ons). Ver 1.77.3 by LOLI.J

The official site is:
http://arbor.ee.ntu.edu.tw/~jackei/dvd2avi/

Curious if it makes a difference.

fluf
ps: I'm not aware of any MPEG2DEC3.DLL renaming or anything like that. All my tools are the virgin download/unzips, except for installing m2v.vfp into my TMPG directory.

---

I'm using IfoEdit 0.95 for DVD muxing and authoring. DVD's play fine with Windvd and normal consumer STBs. I don't use Zoomplayer yet (it looks very cool).

One thing I did run into: I had to make sure I re-loaded the video_ts.ifo file in ifoedit and clicked Get VTS Sectors, then burn. But, you already knew that.

Are you playing the authored DVD from a subdir on the hard drive or off a burned disc. Quite frankly, ifoedit does barebones DVD authoring and is just what I like. I do not like DVD menus. I want to put the disc in and it should start playing the feature.

---

Audio processing is very easy for me:
1. Load .mpg file from hdtv2mpeg2 in DVD2AVI.
2. Click 'Save Project' on the menu bar. Results in "BLAH BLAH DELAY -179ms.ac3" file. And the small .d2v file.
3. Load the .ac3 file from Step 2 into ac3machine, click "Give me AC3!" button.
4. Use the .ac3 file from Step3 in my DVD authoring program (IfoEdit). My dvd-compliant video file comes from TMPG.
5. Author and burn.

ac3machine settings:
* Bitrate: 256
* Channels mode: stereo
* Dynamic compression: unchecked (off)
* "Set delay to" will automatically be set when you load the .ac3 file from Step 2! (nice; this is why I use ac3machine)
* Everything else is unchecked.

I don't use the ES (Video+Audio) mode of TMPG. I use ES (Video only) and it processes the video great everytime. NOTE: I don't use tmpg at all for audio processing! See above.

I found a nice TMPG settings tutorial for high quality video:
http://dvd-hq.info/Compression.html

fluf
ps: I dont have a clue how to use dvd2avi either. I have been very successful just using it for Step1 and Step2, above. All I do is two operations: Load the .mpg from hdtv2mpeg2 and then 'Save Project'. Pretty simple.

0 Comments:

Post a Comment

<< Home