Log in

View Full Version : Workflow to encode an MPEG2 transport stream to H264 HD-DVD/Blu-ray


VincentNguyen
6th September 2006, 16:16
Here is the problem statement: I have quite a few TS streams encoded at roughly 10Mbps, 1080i, MPEG2, 29.97 fps. Obviously, they're huge... audio stream is AC3

I'd like to convert them to H264, but not just any H264.

Specifically:

- I'd like the H264 stream to be compatible with HD-DVD or Blue-ray standalone players (I'll worry later about how to author an HD-DVD...)
- I'd like the H264 file to be able to take advantage of any HW acceleration offered by Cyberlink/NVIDIA solutions (for example PowerDVD 7 with AVC support can decrease CPU usage by as much as 30%, depending on bit rate)

Encoding speed is not an issue (I have a dedicated system for this, dual core 840).

I have tested one method, from
http://forum.doom9.org/showthread.php?t=107990&highlight=x264+encoder

The main difference is that I used the HD-DVD profile, I used two passes encoding, and I did not encode audio (I'd like to keep AC3 for the source)

Output format was x264 (not mkv)


It was partially successfull, ie:

Goods:
- File was reduced in size by a factor of three (I used 5Mbps bit stream)
- Still image of the movie was very good, no interlacing artifact (so deinterlacing function was working properly)

Cons:
- playback was jerky using VLC, looked like frame drop, but every two/three seconds
- could not play at all with Cyberlink PowerDVD AVC module
- could not figure out how to mux the audio stream back into the original h264 file

My system is an FX57 processor, so I would be surprised if the frame drop of the playback content was linked to CPU usage (all the more since it's not maxing out).

What I'm looking for:

- a reliable way to encode to H264 HD-DVD or Blue-Ray profiles
- how to ensure that the file output is compatible with PowerDVD
- how to mux the AC3 audio back into the main file
- and lastly, to save time during my encoding sessions, how can I reuse the result of the first pass of the encoding session ?

Any advice would be welcome.

Regards

Sharktooth
6th September 2006, 17:16
The frame drop is... due to CPU usage :)
Get CoreAVC.
To use AC3 audio you need to mux the .264 raw stream into .mkv along with the ac3 stream (use mkvmerge or megui adaptive muxer).
HD-DVD profile is experimental (not guaranteed to work) and is limiting x264.
Actually x264 produces compliant streams, so if there are problem with PowerDVD then the issue is on the decoder.

pyrates
6th September 2006, 21:06
HD-DVD and BLU-Ray both use high profile with level 4 or level 4.1. Not sure. But I think it is level 4.1.

But seeing as how the studios are, I don't even think they'll let burned hd-dvd's and bd-rom's to play back. Which is stupid because what if you have home videos you want to watch.

Taxidermista
6th September 2006, 23:45
FYI I've tried some 720p x264 encodings with the HD-DVD profile and Apple DVD Studio Pro 4.1 rejected them as valid assets in a HD-DVD project. I don't know where is the problem, maybe the frame rate (23.976).

Sharktooth
7th September 2006, 02:56
It would be interesting to test different framerates and to find any possible incompatible options in the profile.

VincentNguyen
8th September 2006, 15:57
Questions / comments / reply on the remarks above:

- I doubt it is related to CPU usage, since my PC is capable of playing back an H264 15Mbps stream 1080i (transport stream) without a hitch, and the encoding I'm trying to make is 5Mbps. Plus I checked my CPU usage, it's not even anywhere close to 70% CPU usage when playing back.

Note that I have seen this 'jerkiness' when playing back the MKV file

I'll try CoreAVC and see what it achieves.

- On compatible stream, I understand that x264 produces compliant stream, but my question is more related to the container: PowerDVD does not support mkv or x264 file (whereas it can playback fine transport stream or h264 files). So the question is more: how to construct a regular h264 file with x264 encoder, muxing the audio into it. Ideally, a transport stream (I have a transport stream with AC3 audio, h264 video, that plays like a charm, so I know it's feasible)

Thanks for any insight

foxyshadis
8th September 2006, 19:25
x264 file? h264? Those don't refer to containers at all. Do you mean raw (often .264 or .avc), mp4, mpeg, vob, ts?

sjchmura
8th September 2006, 19:46
Or you could wait 10 days and get the new Nero 7 Reloaded with teh high profile, editing functions, and high profile. Yes it costs money but they have fixed alot of the problems (I sent problem streams to nero JohnV who encoded them all correctly).

Blue_MiSfit
9th September 2006, 06:32
I have found that certain encoding features like CABAC can totally murder realtime HD playback. Switching to CAVLC really made a difference for me when working with 1080i MPEG2 sources that had beeen deinterlaced to 1080p and encoded with x264.

I was using the once freely available version of CoreAVC (which I no longer use ), which handles the Apple HD trailers (which use CAVLC as opposed to CABAC) perfectly fine.

I guess the point of my rambling would be to make sure your encoder settings are apropriate for HD.

Also, regarding DVD Studio Pro, it's a great app, don't get me wrong. However, what it calls HD-DVD isn't really HD-DVD. It's an apple only thing. They throw their crappy ass H.264 codec (in HD) together with their rather good AAC codec, and "author" a DVD that plays back ONLY with the Apple DVD player. This is all what I understand though, and I have no real world experience using it ... :)

~MiSfit

Taxidermista
9th September 2006, 14:47
Also, regarding DVD Studio Pro, it's a great app, don't get me wrong. However, what it calls HD-DVD isn't really HD-DVD. It's an apple only thing. They throw their crappy ass H.264 codec (in HD) together with their rather good AAC codec, and "author" a DVD that plays back ONLY with the Apple DVD player. This is all what I understand though, and I have no real world experience using it ... :)

~MiSfit
Well, I guess this is something difficult to test because there is almost no HD-DVD burners/media available. I think that burning HD-DVD projects on red-laser media and feed Toshiba players with them is not a very reliable test system. We'll see. :)