You are not logged in.

#1 2011-01-24 06:40:29

Mega-G33k
Member
From: Indiana, USA
Registered: 2009-09-14
Posts: 42

[SOLVED] Convert MKVs with subtitles to MP4s for Xbox360

I am trying to convert some anime of mine which is in MKV containers and uses x264 video codec and AAC audio codec to MP4s.  I followed the information in this topic https://bbs.archlinux.org/viewtopic.php?id=72627 and managed to convert the files successfully but there were no subtitles.  I've searched all over the internet and found all sorts of "solutions", but so far none have worked for me.  Basically what I want is to have the files as close to the same quality as possible, because the only reason I am bothering doing this is because my Xbox 360 is the only thing I have that can hook up to my HDTV through HDMI.  So any help would be much appreciated, and ask if you need me to clarify anything.  Thanks!

Last edited by Mega-G33k (2011-02-02 17:19:18)

Offline

#2 2011-01-24 13:26:03

seiichiro0185
Member
From: Leipzig/Germany
Registered: 2009-04-09
Posts: 226
Website

Re: [SOLVED] Convert MKVs with subtitles to MP4s for Xbox360

You could check my Script I wrote to convert animes (and other stuff) for My N900, it shows at least how to render SSA-Subtitles into the stream using mencoder: http://www.seiichiro0185.org/blog:n900- … mp4-videos. They key here is the combined use of mencoders ass and fixpts options (which is nearly nowhere documented unfortunately).

Another (probably easier) solution is to use the latest handbrake (version 0.9.5) from the repos, which also gained support for styled subtitles. But as this is the initial version with ssa/styled subtitle support there are still some things not working, like e.g. Karaoke effects. Also for me this version has a rather big memory leak when encoding a lot of episodes using the queue function.

Last edited by seiichiro0185 (2011-01-24 13:26:20)


My System: Dell XPS 13 | i7-7560U | 16GB RAM | 512GB SSD | FHD Screen | Arch Linux
My Workstation/Server: Supermicro X11SSZ-F | Xeon E3-1245 v6 | 64GB RAM | 1TB SSD Raid 1 + 6TB HDD ZFS Raid Z1 | Proxmox VE
My Stuff at Github: github
My Homepage: Seiichiros HP

Offline

#3 2011-01-24 18:47:20

Mega-G33k
Member
From: Indiana, USA
Registered: 2009-09-14
Posts: 42

Re: [SOLVED] Convert MKVs with subtitles to MP4s for Xbox360

Hi, I took a look at your script, but I couldn't figure it out.  The videos I have are already in the right codecs, I just need to change the container and bake in the subtitles.
It seems like this line might be it, but I'm not sure, and I don't know how I could change it for what I want to do.

mplayer -vf scale=${SCALE},unsharp=c4x4:0.3:l5x5:0.5 -ao pcm:file="$PWD/n800-encode.$$/audio.wav" -vo yuv4mpeg:file="$PWD/n800-encode.$$/video.y4m" -ass -embeddedfonts -noframedrop ${_MPOPTS} "${_INFILE}"

Thanks!

Offline

#4 2011-01-24 19:15:44

seiichiro0185
Member
From: Leipzig/Germany
Registered: 2009-04-09
Posts: 226
Website

Re: [SOLVED] Convert MKVs with subtitles to MP4s for Xbox360

you somehow used an old script of mine as reference (your code snipet is from n800-encode, the one I linked to was n900-encode).
But regardless you will have to re-encode at least the video stream to burn in the subtitles into the video. I don't know about the codec support of the 360 but I doubt that it can interpret ssa subtitle streams (aka "softsubs"). So you will have to encode them into the video (aka "Hardsubs") and that means you will have to re-encode the video stream.

The line you extracted from my script does that, but outputs to an uncompressed (aka reeeeally big) yuv4mpeg-file and wav-audio when used outside of the script. It's meant to feed its input into a video encoder like ffmpeg, mencoder or x264/faac in my scripts case.

If you have not worked with video encoding on the commandline I suggest you try out handbrake first since it has a nice gui.
You can also  try out my n900-encode.py script, which outputs to quite nice quality (IMHO) for the animes I tried, even when viewed on my TV.


My System: Dell XPS 13 | i7-7560U | 16GB RAM | 512GB SSD | FHD Screen | Arch Linux
My Workstation/Server: Supermicro X11SSZ-F | Xeon E3-1245 v6 | 64GB RAM | 1TB SSD Raid 1 + 6TB HDD ZFS Raid Z1 | Proxmox VE
My Stuff at Github: github
My Homepage: Seiichiros HP

Offline

#5 2011-01-28 23:44:58

ChoK
Member
From: France
Registered: 2008-10-01
Posts: 346

Re: [SOLVED] Convert MKVs with subtitles to MP4s for Xbox360

MP4 container supports a kind of softsub named tx3g. It's readable by iOS devices dunno about the XBOX360 though.


Ah, good taste! What a dreadful thing! Taste is the enemy of creativeness.
Picasso
Perfection is reached, not when there is no longer anything to add, but when there is no longer anything to take away.
Saint Exupéry

Offline

#6 2011-01-29 17:22:20

ajbader
Member
Registered: 2010-03-22
Posts: 23

Re: [SOLVED] Convert MKVs with subtitles to MP4s for Xbox360

Handbrake is excellent. I had the same question, and it looks like handbrake did the trick. It took the packaged .ass subs and hardcoded them on.

Offline

#7 2011-02-02 17:18:24

Mega-G33k
Member
From: Indiana, USA
Registered: 2009-09-14
Posts: 42

Re: [SOLVED] Convert MKVs with subtitles to MP4s for Xbox360

Hey, thanks everybody for your comments and suggestions.  I haven't been able to work on this for a while, but when I get back to it I'll be sure to take everybodys suggestions and hopefully come up with a solution.

Thanks!

Offline

Board footer

Powered by FluxBB