Jump to content


Photo

How To Encode Videos For Proper Subtitle Support Playpack On 360?


  • Please log in to reply
4 replies to this topic

#1 Randolph

Randolph

    X-S Enthusiast

  • Members
  • 2 posts

Posted 27 December 2011 - 08:33 PM

Hi,

a bit of a preamble:
I've been using my XBOX 360 for a few months mainly for playing videos. My desktop PC is Windows 7 Pro 64bit and at first I tried using Windows Media Center and then playback on the XBOX. I installed Shark007 video codec ( http://shark007.net/win7codecs.html ) so there was no need to pre-transcode the videos (which mainly consisted of MKVs) because it was done on the fly. No problem for me i7-980X EE.

However, the service just didn't work 100%; sometimes loading the Dashboard with all the videos hung; sometimes playing back of videos itself hung and sometimes playback didn't work at all.

I then learned about another technique, which worked without the Windows Media Center by just providing all videos from my users "Video Library" (I'm on a German system and thus don't know how the proper term in English is); I only had to ensure the videos where properly encoded.

Since I was familiar with ffmpeg from Linux, I used a Windows precompiled binary to do the work, which looks like this:

CODE
ffmpeg.exe -i input.mkv -vcodec wmv2 -acodec wmav2 -ac 2 -sameq output.wmv


As long as ffmpeg was able to convert the video, I never had any playback issues (except that it sometimes took "ages" that a video from the Library showed up on the XBOX, but that's another topic).

I realize that this is not optimal, that the wmv2 codec produces larger files then the typical h264, but for me it gets the work done well.

When I use this method to playback the videos, subtitles are never included. In fact, when I read the output of ffmpeg and understand this right, they are just ignored (thrown away) during the conversion process.

I.e.: I am not able to produce a WMV with subtitles included.

When I start my search, I get thousands of hits, but nothing which really helped me solve the problem. Typical things I found:
  • XBOX 360 does not support subtitles (at all or in WMV? Nothing specific here)
  • hardcode subtitles into the video ( I want to avoid this, I want to retain the option to turn off the subtitles)
  • Other people asking the same question with no solution (most dating back to 2006-2008; i.e. even after the great update from M$ regarding video support).

The first point gets very often recited, however there's one thing which makes me somehow not believe it: when I'm play back the video of the XBOX, I have an option to choose a subtitle. To me this tells me it must be possible.

So I'm wondering: how to do it?
  • Does the XBOX support real subtitles in general?
  • Is it a problem with the WMV container format? Do I need another one?
    The reason I choose WMV container was pragmatic: after trying around, it was the first set of options which produces a working video for me.
  • Is ffmpeg the right tool to include them?
    I know I can use the option "-scodec copy" but it doesn't work, giving me "Could not write header for output file #0 (incorrect codec parameters ?)".
  • Do they need to be part of the container or are external files supported?

Hopefully this attempt for finding a solution will be successful ...

thanks in advance,

R.

#2 Aldanga

Aldanga

    X-S Hacker

  • Head Moderators
  • PipPipPipPipPipPip
  • 2,721 posts
  • Gender:Male
  • Interests:Hardware,software,coding,algorithms, troubleshooting, tinkering with anything I can get my hands on.
  • Xbox Version:none
  • 360 version:v5.0 (360S - trinity)

Posted 27 December 2011 - 09:35 PM

I haven't used my 360 for DVDs in a really long time (I've switched mostly to Blu-Ray), but I'm sure it supports subtitles with them. The player for all video files, including DVDs, is the same, which is why the subtitle option still appears. I haven't tested other subtitles with the 360, but it would be easy to test with a simple .avi encode. Testing for support for external subtitles would also be very simple.

I'm not sure that WMV supports subtitles. I cannot find anything online to suggest it does, but only people having problems adding subtitles to the container.

#3 Randolph

Randolph

    X-S Enthusiast

  • Members
  • 2 posts

Posted 27 December 2011 - 10:34 PM

QUOTE(Aldanga @ Dec 27 2011, 09:35 PM) View Post

The player for all video files, including DVDs, is the same, which is why the subtitle option still appears.

Kudos, I never thought about that ...
QUOTE(Aldanga @ Dec 27 2011, 09:35 PM) View Post

I haven't tested other subtitles with the 360, but it would be easy to test with a simple .avi encode. Testing for support for external subtitles would also be very simple.

Good idea, I'll try that for AVI.

Currently I seem to be limited by either my knowledge of ffmpeg or ffmpeg itself, as I'm not able to convert from MKV to anything else (tried .wmv and .avi) and copy/include the subtitles which are part of the mkv. Need to figure that one out, because I thought I was limited by the WMV container format, doesn't seem so ...

Where can I find the info what video/audio codec should I use for the AVI container? Or should I just go with wmv2/wmav2?

thanks

Edited by Randolph, 27 December 2011 - 10:36 PM.


#4 Aldanga

Aldanga

    X-S Hacker

  • Head Moderators
  • PipPipPipPipPipPip
  • 2,721 posts
  • Gender:Male
  • Interests:Hardware,software,coding,algorithms, troubleshooting, tinkering with anything I can get my hands on.
  • Xbox Version:none
  • 360 version:v5.0 (360S - trinity)

Posted 27 December 2011 - 10:53 PM

A quick Google search will return lots of results on codecs the 360 supports. I would just try DivX/Xvid or MPEG as they're supported with the media update.

I'm not sure about moving the subtitles with the other streams. You might want to ask some ffmpeg experts about that. Your problems could also stem from the type of subtitle, presuming containers are not compatible with every version.

#5 appliedcolors

appliedcolors

    X-S Enthusiast

  • Members
  • 1 posts

Posted 12 January 2012 - 08:54 PM

I think, you pc is not supporting your xbox. Upgrade your system and check it again.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users