Jump to content
breezytm

MB Direct Play & WMC Extenders

Recommended Posts

breezytm

Hello Guys, 

 

I didn't know where to place this so I placed it here. If it needs to be moved, please feel free to do so. Alright, Let me get to it. I just decided to get an XBOX as an extender to use with Windows Media Center and Media Browser Classic. As we all know XBOX does not play MKV files. All my files are MKVs. I would like to write a script or use an existing one with minor modification to mass convert all my movies and tv series from MKV to MP4. I am not sure what I do know about MKV to MP$ to be true so I am asking for some help. I have read several threads and everyone has their own take on this. 

 

This is what I know so far. Please feel free to correct me if I am wrong. 

 

MP4 must only contain AAC or AC3 tracks to be compatible with all devices. 

 

Converting MKV to MP4 is a resource hog and it is super slow. To speed the process MKV can just change the container to MP4 which is super fast. A lot of MKVs are encoded in H.264 which means the video part does not need to be re-encoded. It can just be copied to the new container. Also there will be no quality lost. 

 

Now if you have an MKV file with a DTS track,  you may want to change the video container but remux the audio to AC3 or AAC. But AC3 requires the user to have a receiver. Otherwise, it will be force to be transcoded. AAC is the most common track. It will playback in all devices. 

 

Someone suggest to add an AAC track as well as AC3 to all MP4s to ensure that the file does not require transcoding ever. 

 

Also if someone has already done that, by all means, share the info.

 

Edit: I would not have a chance to proof read so please ignore all grammar. I have to run to a meeting. 

 

Thanks, 

Edited by breezytm

Share this post


Link to post
Share on other sites
breezytm

Check out MKVtoMP4 (http://www.videohelp.com/tools/MkvToMp4), I use this daily to convert mkv to mp4 for my extender, works well.

 

Thanks. This is doing exactly what I had in mind bu in windows. I was hoping for a shell script. Something I can run on my nas on demand. 

Share this post


Link to post
Share on other sites
Macburp

The programme wraps together several command line processes into a gui. Suggest you had over to videohelp.com and check out the thread for this, the guy who wrote the software posts regularly last time I looked.

Share this post


Link to post
Share on other sites
breezytm

The programme wraps together several command line processes into a gui. Suggest you had over to videohelp.com and check out the thread for this, the guy who wrote the software posts regularly last time I looked.

 

Again thanks for sharing dude. I am actually on the site as we speak and I am also transcoding some files with the software right now. I am still a little confuse about certain things which I am doing some research on. 

 

The part I don't quite understand and perhaps you can clarify is: how do I copy the video without converting it? I am using two different tools (mkvtomp4, xmedia record) in the same workstation and mkvtomp4 takes twice as long to do the work. 

 

I simply want to take an mkv file 

1. copy the video

2. convert the dts track to aac stereo

3. convert the dts track to ac3 5.1

 

I guess my problem is understanding the video presets and how to copy the video without being re-encoding. 

Edited by breezytm

Share this post


Link to post
Share on other sites
Latchmor

Well if you want to get your hands really dirty you can do this using FFmpeg https://www.ffmpeg.org/download.html

 

If you haven't got time to get your hands dirty don't read the rest  :P

 

I've been converting all my DVD Rips to mkv using a vbscript with MakeMKV and then another vbscript with FFmpeg to strip out streams add metadata etc. For what you're after I just did a test.

 

Input File: 20gb (113 minutes) mkv with 1 x h264 video stream and 1 x DTS 5.1 audio stream.

FFmpeg Command: ffmpeg.exe -i "c:\input.mkv" -map 0:0 -map 0:1 -map 0:1 -c:v copy -c:a:0 libvo_aacenc -ac 2 -c:a:1 ac3 "c:\output.mp4"

 

This gave me an mp4 file with the Video copied and the Audio converted to 2 channel aac and also to 5.1 ac3 and converted in 10 minutes. If you're interested you'll have to read up online as it took me a long time experimenting to get to grips with the basics and I really can't offer much support as I'm still very new at it!

 

The programs you've already found are doing this but I just wanted a command line option so I could script it.

 

;)

Edited by Latchmor
  • Like 1

Share this post


Link to post
Share on other sites
breezytm

@@Latchmor. Nice. I am familiar with ffmpeg. Not too advance. Still basics  :D

But yeah the idea is to get my hand dirty. I want to create a script that I can pass a folder, look through it, find mkv file and transcode it to mp4. That way I can mass remux existing mkvs in my movie directories and also add it to SAB for post processing. 

 

I don't want to reinvent the wheel but it seems as if there are a few scripts out there doing it. 

There are a few scripts already doing it. I can't use them since I want to run it on my nas. Also I don't understand subtitles too well. I want to remove embedded subs if there are any and only leave the force and english subs. 

 

Here's a few examples 

http://pastebin.com/raw.php?i=9jD2M9Hw

http://pastebin.com/raw.php?i=KihLqG6z

http://pastebin.com/raw.php?i=3MmWs8Uk

 

These scripts are doing the job already but I can't use in my nas box without having to compile stuff. I don't really have the time to really get into doing all that. 

 

BTW, if you don't mind me asking of course, why are you converting to mkv?

Share this post


Link to post
Share on other sites
breezytm

 

Input File: 20gb (113 minutes) mkv with 1 x h264 video stream and 1 x DTS 5.1 audio stream.

FFmpeg Command: ffmpeg.exe -i "c:\input.mkv" -map 0:0 -map 0:1 -map 0:1 -c:v copy -c:a:0 libvo_aacenc -ac 2 -c:a:1 ac3 "c:\output.mp4"

 

 

I don't have libvo_aacenc in my qnap. I would have to compile that as well  :blink:

Share this post


Link to post
Share on other sites
Latchmor

Well, you'll see littered all over the forums here that VIDEO_TS folders for transcoding are experimental and even though I was direct playing everything in MBC and MBT, I knew that I wanted to move to another format.

 

MKV appeared to be the most versatile so I started doing conversions with MakeMKV which is really quick due to my DVDs already being ripped so it was around 90 seconds to create a MKV. After testing MBC with LAV filters it worked really well so I just stuck with it.

 

Command line MakeMKV is very basic (can't select streams) but I needed to script it to speed things up, this is why I started using FFmpeg in a second script so I could then remove unwanted audio and sub steams.

 

Since they're all codec copies I can swap containers again if needed for whatever reason.

 

As for using libvo-aacenc, some of the FFmpeg experts here may have other options as I think there are other encoders available. I just picked that quickly to test as I don't do much actual transcoding.

 

Cheers

Share this post


Link to post
Share on other sites
breezytm

I got you. I already have all my stuff in MKVs but want to do little to no transcoding if possible that's why I am trying to go with MP4s now. For example I added an Xbox as extender and of course nothing worked. To make my library more versatile and future proof I decided to start looking into MP4s.

 

I only asked because the way I see it is if you are already doing the work why not put it in a container that is compatible will all devices.

 

I also have MBC. Intel NUC celeron model to be specific and with LAV filters everything plays smoothly. But I would like the option to add any devices to my network and not worry about transcoding.

 

I do hope I find a way but as of right now things aren't looking to go for me :D

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...