PDA

View Full Version : Transcoding from .mkv to .wmv for x360?


benro2
24th April 2007, 16:05
Hi,

I can finally post after the 5 day wait! :) Anyway, I think what I'm about to ask is a fairly loaded question (and may seem a bit stupid to some, but anyways)...

I've got a pile of HD videos, some in 1080i/p, some in 720p, and they're just about all .mkv files. I want to transcode every movie to WMV9 (VC-1?) to each fit on a DVD5 with 5.1 sound so I can play it back straight off the disc in an Xbox 360. Is there any (easy) way to do this?

What about videos that are a straight rip of the HDDVD/Blu-ray disc? Is that any different/easier to do?

I've been doing a fair bit of research into codecs and suitable transcoding programs but can't really find anything (that I understand, anyway), or anything that actually works.

Any help would be much appreciated.

jubilex
29th April 2007, 00:02
Every program I've tried has had no problems with mkvs (assuming your PC can play them).

Glorioso
29th April 2007, 16:16
Every program I've tried has had no problems with mkvs (assuming your PC can play them).


Can u give an example of one?

benro2
30th April 2007, 11:09
Every program I've tried has had no problems with mkvs (assuming your PC can play them).
Yes, I'd like to know which programs can convert from .mkv to .wmv because I need to play them back on the x360, not on my PC :)

jubilex
2nd May 2007, 18:03
wmcmd.vbs (what I use), tmpgenc, procoder

Any program that can't take mkv directly can probably take an Avisynth script that just has DirectShowSource('filename.mkv') in it.

jpasan
5th May 2007, 04:56
The best I could do so far was with Windows Movie Maker so far. But unfortunately it's not very configurable and I'm with Vista Business which limits me even more.

Also tried WMNicEnc, which was much more configurable, but only tried with an .avi with xvid (960x544) + ac3 but the resulting file, while playable and with decent image quality lost audio sync

Speediakal
6th May 2007, 03:22
try the xbox360 converter (http://www.videora.com/en-us/Converter/Xbox360/download.php)
or this one (http://www.redkawa.com/blog/post.php?t=798)

benro2
6th May 2007, 15:01
Thanks for the replies guys, but I'm still at a loss as to what do use, or what to do. I have Procoder 2.0 but AFAIK it won't take .mkv files. And I'm not entirely sure how to make an Avisynth script either. Ideally, I'd like to use Procoder 2.0, basically because I'm familiar with it and I like the quality it outputs, but really, I'd be happy with anything that's easy to use and that works properly first go! :)

I did download the xbox360 converter but it only encodes to mpeg2! I really need mpeg4 encoding though because I only want to use DVD5's and mpeg2's a bit inefficient for HD res on DVD5's.

wmv would be ideal because AFAIK ATM the x360 only plays .wmv files straight off the DVD. There's supposed to be a dashboard update soon which will enable it to decode more types of files but I'm unsure if this is only via streaming or if it really is straight off the disc. Even then, I don't know which file formats will be supported.

So are there any tutorials available that show what I want to do? I can't believe how hard it is to find info on this!

tchaikovsky
6th May 2007, 17:20
Every program I've tried has had no problems with mkvs (assuming your PC can play them).

agree with you :)

Speediakal
7th May 2007, 00:48
well, why don't you wait for the update where you can play mpeg4 files?

benro2
7th May 2007, 17:07
well, why don't you wait for the update where you can play mpeg4 files?
Because I'm not sure which file extensions it will play. I highly doubt it will play .mkv's which is what every HD movie I've got is in.

The other thing is, although some of my movies are small enough to fit on DVD5, some aren't and I really don't want to spend a lot of money on DVD9 discs (they are considerably more expensive here than DVD5's), so I'd like to transcode them back down to DVD5 size, and some of them are in 1080p which is a bit of a waste for me because I've only got a 720p TV.

Trust me, if I could avoid doing all this, I would! :)

Speediakal
8th May 2007, 04:10
why dont you put them on the 360 hard drive? or do you want them on DVDs to not take up space on the HDD and just for ease?

benro2
8th May 2007, 13:09
I wasn't aware that it was possible to put them on the 360HD? Even so, I've got over 130GB of HD movies right now so I don't think they'll fit :)

And yes, I'd prefer them on DVD's so I can archive them for later use.

bluesk1d
14th May 2007, 16:13
The new dashboard will not do you any good. While they support a few more codecs (H.264, MPEG-4), none of them will support 5.1 audio, only 2 channel AAC (LAME!). If you want to maintain the current 5.1 audio you HAVE to use WMV. Also, any format the 360 supports will play from any source (wireless streaming with Windows Media Connect, wired streaming, USB jump drive, CD, DVD5, DVD9, blah blah blah). Ive done a fair amount of mkv -> wmv vc-1 for playback on the 360 as well. One thing you need to be mentally prepared for is there is no "MKV -> WMA" process. There are several intermediate steps involved (I hope you have lots of free hard disk space!). Most of the threads on here about going from Blu-Ray/HD DVD -> WMV will also apply. The easiest way to do this is to demux the mkv audio and convert that (usually an ac3 stream) to 5.1 WMA 10 Pro using the following:

Use mkvextract from the mkvtoolnix downloadable package to extract the ac3 (there is an mkv extract GUI also available that turns this into a couple mouse clicks instead of messing with a long command line with a bunch of switches).

Use BeSweet (also a handy GUI available) to convert the ac3 to 6 mono WAVs. Windows Media Encoder (Available from microsoft.com) will allow you to combine each of the 6 WAVs into a single 5.1 channel wma file via the GUI.

The video portion can be left in the MKV container
You will need Avisynth as well as Graphedit. Youll be constructing a graph with the mkv file and using an avisynth file to call this graph and feed the frames to your video encoder. Youll be using the wmcmd.vbs command line tool that comes with Windows Media Encoder to do this. This wont make any sense to you now but when you see it, it will. When you save your graph, delete the "video renderer" box leaving just the decoder with an open "output" connecter. This is what AVI synth connects to behind the scenes.

This thread covers it in detail. I use Acrowleys command line and it works perfectly. He uses procoder 2 as well but I am unfamiliar with that product. Be aware that one of his posts has a typo and the buffer should read "60000" and NOT "600000". You can disregard the stuff about EVOdemux since you arent ripping a disc. You will need to determine the frame count though. Use mkvinfo that comes with mkvtoolnix (also a GUI available) to determine the exact length of the movie in seconds. The average movie is in the neighborhood of 6000 seconds. Multiply the number given by mkvinfo times the frame rate to determine the total number of frames. This value is important and goes in your .avs AVIsynth script file. An example would be 6372.398 seconds times 23.976fps = 152784.614448 frames. I always round up so the frame count would be 152785.
http://forum.doom9.org/showthread.php?t=124020

Once you have your wmv video portion and wma audio portion, use the Windows Media Stream Editor that comes with Windows Media Encoder to simply combine the 2 into your 360 playable masterpiece.

Also, you wont want to keep them at 1080 if you are only going to use DVD5 discs. You simply wont be able to use a high enough bitrate for them to look good when you are done. If you look around you can get DVD9 discs for around $1.40 each. I usually use Google's product search (formerly known as Froogle) for this. If youre set on DVD5, one of the examples in the above thread has an example of an Avisynth script doing a "spline36resize" down to 720. Use that to start with. Youll have to adust your pixel dimentions depending on the source.

cyberheater
14th May 2007, 20:32
One thing you need to be mentally prepared for is there is no "MKV -> WMA" process. There are several intermediate steps involved (I hope you have lots of free hard disk space!). Most of the threads on here about going from Blu-Ray/HD DVD -> WMV will also apply. The easiest way to do this is to demux the mkv audio and convert that (usually an ac3 stream) to 5.1 WMA 10 Pro using the following:

Actually. I encode MKV to WMV with AV1 + 5.1 WMA audio in one step.

I use WME assistant (not free but it is cheap). Install lastest Haali splitter. Install AC3 filter and set the output to 5.1. Load a MKV file into WME assistant, set the audio to 6 channel out (Windows Pro 9 format) and bobs your uncle.

bluesk1d
14th May 2007, 20:39
Actually. I encode MKV to WMV with AV1 + 5.1 WMA audio in one step.

I use WME assistant (not free but it is cheap). Install lastest Haali splitter. Install AC3 filter and set the output to 5.1. Load a MKV file into WME assistant, set the audio to 6 channel out (Windows Pro 9 format) and bobs your uncle.

How much is it? Does it offer all the flexibility as wmcmd.vbs? It actually maintains all 6 channels without choking? I know this was an issue with feeding WME 6 channels on-the-fly. Thats cool if it works well!

SCSI
15th May 2007, 05:21
I use encode360 to convert mkv to wmv. It even handles ac3 5.1 to wma 5.1 automatically. Somehow WMV 5.1 only works in CBR mode though.

benro2
30th May 2007, 16:24
I use encode360 to convert mkv to wmv. It even handles ac3 5.1 to wma 5.1 automatically. Somehow WMV 5.1 only works in CBR mode though.
I've just downloaded encode360 and all the associated progs that go with it, but when I go to add a file, .mkv files aren't under the supported file types! How did you get yours to work?

To everyone else, especially bluesk1d, hanks very much for your help. I'm going to try and get this encode360 thing working but if that fails I'll try bluesk1d's method (reluctantly :P )...

neuron2
30th May 2007, 16:26
Why not ditch the MKVs and start again from your original disks?

Numan123
12th June 2007, 00:03
Actually. I encode MKV to WMV with AV1 + 5.1 WMA audio in one step.

I use WME assistant (not free but it is cheap). Install lastest Haali splitter. Install AC3 filter and set the output to 5.1. Load a MKV file into WME assistant, set the audio to 6 channel out (Windows Pro 9 format) and bobs your uncle.

I'm trying it right now on a 100 meg MKV file with h264 and AC3. It just finished converting the 1 minute of video. It took 53m26s. Is this normal for an AMD X2 5600 with 2 gigs of ram in XP?!?

Oh yeah, the MKV file converted perfectly with WMV9 Advanced Profile and WMA 10 Pro VBR Quality 98, 48 kHz, 5.1 channel 24 bit 1-pass VBR

mindrunner
14th June 2007, 09:32
Hi,

I've got a pile of HD videos, some in 1080i/p, some in 720p, and they're just about all .mkv files. I want to transcode every movie to WMV9 (VC-1?) to each fit on a DVD5 with 5.1 sound so I can play it back straight off the disc in an Xbox 360. Is there any (easy) way to do this?



Just out of curiosity (Note i'm a noob trying to do the same thing here) the x360 supports h264 & aac audio in .mov / mp4 containers.

What codec is the video stream ?
If its h264, wouldn't you just want to re-encode the audio in stereo to maintain the video quality.

I have a 'similiar' .mkv file right now, with its video in H264 & Audio in AC3.

Theoretically, i should be just able to demux the existing video & audio streams, re-encode the AC3 to 2 channel AAC & remux it in a .mov / .mp4 container , and walla!! it should work.

I use linux so i'm limited currently to ffmpeg/mencoder due to my noobish compiling skills.

I used the following command to generate my .mp4 & .mov file:-

ffmpeg -i infile.mkv -vcodec copy -acodec libfaac -ar 48000 -ac 2 outfile.mp4

suprisingly, my 360 doesnt recognise my new file. After Reading the MPEG4 faq here, i realised they say ffmpeg's mp4 container output is buggy, so im busy trying to compile Avidemux for editing.

Any comments on this ?

tchaikovsky
14th June 2007, 16:25
I'm trying it right now on a 100 meg MKV file with h264 and AC3. It just finished converting the 1 minute of video. It took 53m26s. Is this normal for an AMD X2 5600 with 2 gigs of ram in XP?!?

Oh yeah, the MKV file converted perfectly with WMV9 Advanced Profile and WMA 10 Pro VBR Quality 98, 48 kHz, 5.1 channel 24 bit 1-pass VBR

Thank you for your trying :)

Trial version WMEA only outputs 3 minutes of your media file, but it prepares for whole file at first.

neuron2
14th June 2007, 17:45
I've got a pile of HD videos, some in 1080i/p, some in 720p, and they're just about all .mkv files. Where did you get these or how did you make them?

benro2
15th June 2007, 11:49
Just out of curiosity (Note i'm a noob trying to do the same thing here) the x360 supports h264 & aac audio in .mov / mp4 containers.

What codec is the video stream ?
If its h264, wouldn't you just want to re-encode the audio in stereo to maintain the video quality.

I have a 'similiar' .mkv file right now, with its video in H264 & Audio in AC3.

Theoretically, i should be just able to demux the existing video & audio streams, re-encode the AC3 to 2 channel AAC & remux it in a .mov / .mp4 container , and walla!! it should work.

I use linux so i'm limited currently to ffmpeg/mencoder due to my noobish compiling skills.

I used the following command to generate my .mp4 & .mov file:-

ffmpeg -i infile.mkv -vcodec copy -acodec libfaac -ar 48000 -ac 2 outfile.mp4

suprisingly, my 360 doesnt recognise my new file. After Reading the MPEG4 faq here, i realised they say ffmpeg's mp4 container output is buggy, so im busy trying to compile Avidemux for editing.

Any comments on this ?
Well, I'm not that advanced that I can actually tell what the video stream is - I don't even know how to demux it! Additionally, a lot of the copies I have are too big to fit on a DVD5 *and* they are 1080p, which is of no use to me since I've only got a 720p screen.

So ideally, I'd like them to all be 720p with 5.1 sound in WC-1 format, or anything that the x360 will play straight off the disc. And with the minimal number of steps possible (so a fully automatic prog that does everything would be ideal!).

Where did you get these or how did you make them?
Um, I'm not sure I'm allowed to answer that here - not familiar enough with the forum rules :P

mindrunner
15th June 2007, 12:54
Well, I'm not that advanced that I can actually tell what the video stream is - I don't even know how to demux it! Additionally, a lot of the copies I have are too big to fit on a DVD5 *and* they are 1080p, which is of no use to me since I've only got a 720p screen.


Well, for windows you can use Gspot, which identifies all the codecs.

Or you could use a version of ffmpeg compiled for windows. You can download them here (http://ffdshow.faireal.net/mirror/ffmpeg/).
You'll have to use 7-zip (http://www.7-zip.org/download.html) to uncompress it.

After that, just type ffmpeg -i filename, it will first identify the codec in the file before spitting out errors of missing parameters.

The Stream # tag tells you what codec it uses. The apple trailer works via 360 streaming BTW.
I'll give you 2 examples:-

1. With a .mkv file


[linux@fc7 src]$ ffmpeg -i infile.mkv
FFmpeg version SVN-r9303, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --extra-cflags=-I/opt/apps/ffmpeg/include --extra-ldflags=-L/opt/apps/ffmpeg/lib --enable-libx264 --enable-libfaac --prefix=/opt/apps/ffmpeg --enable-liba52 --enable-pthreads --enable-gpl
libavutil version: 49.4.0
libavcodec version: 51.40.4
libavformat version: 51.12.1
built on Jun 14 2007 23:40:09, gcc: 4.1.2 20070502 (Red Hat 4.1.2-12)
[matroska @ 0x83eec20]Ignoring seekhead entry for ID=0x1549a966
[matroska @ 0x83eec20]Ignoring seekhead entry for ID=0x1654ae6b
[matroska @ 0x83eec20]Ignoring seekhead entry for ID=0x114d9b74
[matroska @ 0x83eec20]Unknown entry 0x73a4 in info header
[matroska @ 0x83eec20]Unknown track header entry 0x55aa - ignoring
[matroska @ 0x83eec20]Unknown track header entry 0x23314f - ignoring
[matroska @ 0x83eec20]Unknown track header entry 0x55ee - ignoring
[matroska @ 0x83eec20]Unknown track header entry 0xaa - ignoring
[matroska @ 0x83eec20]Unknown track header entry 0x55aa - ignoring
[matroska @ 0x83eec20]Unknown track header entry 0x23314f - ignoring
[matroska @ 0x83eec20]Unknown track header entry 0x55ee - ignoring
[matroska @ 0x83eec20]Unknown track header entry 0xaa - ignoring
Input #0, matroska, from 'infile.mkv':
Duration: 02:34:11.4, start: 0.000000, bitrate: N/A
Stream #0.0: Video: h264, yuv420p, 1280x528, 24.39 fps(r)
Stream #0.1: Audio: liba52, 48000 Hz, 5:1
Must supply at least one output file

2. With an apple trailer

[linux@fc7 apple]$ ffmpeg -i ratatouille-clip_h720p.mov
FFmpeg version SVN-r9303, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --extra-cflags=-I/opt/apps/ffmpeg/include --extra-ldflags=-L/opt/apps/ffmpeg/lib --enable-libx264 --enable-libfaac --prefix=/opt/apps/ffmpeg --enable-liba52 --enable-pthreads --enable-gpl
libavutil version: 49.4.0
libavcodec version: 51.40.4
libavformat version: 51.12.1
built on Jun 14 2007 23:40:09, gcc: 4.1.2 20070502 (Red Hat 4.1.2-12)
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x83eec20]negative ctts, ignoring
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'ratatouille-clip_h720p.mov':
Duration: 00:10:37.6, start: 0.000000, bitrate: 5363 kb/s
Stream #0.0(eng): Video: h264, yuv420p, 1248x702, 23.98 fps(r)
Stream #0.1(eng): Audio: mp4a / 0x6134706D, 44100 Hz, stereo
Stream #0.2(eng): Data: tmcd / 0x64636D74
Must supply at least one output file

neuron2
15th June 2007, 14:49
Um, I'm not sure I'm allowed to answer that here - not familiar enough with the forum rules :P Then I close the thread presuming this is rule 6 material.

http://forum.doom9.org/forum-rules.htm