AnimeSuki Forums

Register Forum Rules FAQ Members List Social Groups Search Today's Posts Mark Forums Read

Go Back   AnimeSuki Forum > AnimeSuki & Technology > Playback Help

Notices

Reply
 
Thread Tools
Old 2010-04-22, 00:08   Link #1
Soconfused
Old God Member
 
 
Join Date: Dec 2003
Location: you....don't wanna know
Age: 27
Send a message via AIM to Soconfused
Playing mkv on ps3 with subtitles from a FD

I did search and didn't quite get what I was looking for. I know you can convert nkv files to play on a ps3, but how would I go about getting it to show the subtitles? I have some stuff on a flash drive that I try to show on my friends ps3, and it plays the converted file fine but the subtitles do not show up.
__________________
What exactly is the point of becoming powerful if one cannot indulge the hedonistic opportunities that come with it?
Soconfused is offline   Reply With Quote
Old 2010-04-22, 08:23   Link #2
SeijiSensei
AS Oji-kun
 
 
Join Date: Nov 2006
Location: Mucking about
Age: 64
You have to use software that will convert the softsubs into hardsubs and encode them into the video stream. mencoder can do this, but it's a command-line program that may seem quite daunting if you're only used to programs with a graphical user interface.

A good discussion of the PS3's limitations as a video playback device recently appeared on AVS Forum.
__________________
SeijiSensei is offline   Reply With Quote
Old 2010-04-22, 09:56   Link #3
Revenger1589
otaku against own will
 
 
Join Date: Jan 2007
Location: Argentina
Age: 27
mkv2vob will transcode the mkv to a vob file playable on the PS3, it was originally made for remuxing but it will transcode the file if it finds subs. If your computer is good enough and your PS3 is connected to your network you can try PS3 media server, it will do the transcoding in real time.
Revenger1589 is offline   Reply With Quote
Old 2010-04-22, 10:59   Link #4
JEEB
Bishoujo fanatic
*Fansubber
 
 
Join Date: May 2007
Location: Finland / Japan
Quote:
Originally Posted by SeijiSensei View Post
You have to use software that will convert the softsubs into hardsubs and encode them into the video stream. mencoder can do this, but it's a command-line program that may seem quite daunting if you're only used to programs with a graphical user interface.

A good discussion of the PS3's limitations as a video playback device recently appeared on AVS Forum.

from the official mplayer multimedia.cx wiki article:

Code:
the video filters (-vf) can be used with mplayer and mencoder.
    currently -vf ass/-ass does not work with mencoder.
...although yes, there are patches such as these, although these are godawful old (not to mention that lately mencoder with libx264 has gone out of control completely, giving out garbage timestamps etc. to libx264 -- in other words, it's not really kept "working"). Not to mention that pretty much the only output it can do fine except for non-bframe'd mp4 and avi is raw output :3

Also, just keeping to level 4.1 should be alright with the PS3, no?

See step 1c here on how to do basic hardsubbing that should most probably even work with ordered chapters if you're using mplayer-uau. Not to mention that the page has the basic settings for the PS3 at the end of it, since PS3 does actually support Level 4.1 pretty nicely :3

(Too bad things aren't that easy for us Windows users since mplayer's stdout output still seems to work sub-optimally. Thus leaving us alone with Avisynth + VSFilter fed to x264 as long as people don't start installing cygwin and using cygwin mplayer builds to make the piping easier... s/easier/possible/)

Edit: Another thing that could be thought about would be making Blu-ray subtitles out of the ASS subtitles and then muxing that to a transport stream and trying to play that back. Might work, could actually be the reason some people on #x264 made an app to render ASS to the PNGs needed to make Blu-ray subtitles. See Doom9 for more information on the matter.
__________________
I'm human, no debug | Unofficial x264 builds
JEEB is offline   Reply With Quote
Old 2010-04-22, 11:25   Link #5
SeijiSensei
AS Oji-kun
 
 
Join Date: Nov 2006
Location: Mucking about
Age: 64
Quote:
Originally Posted by JEEB View Post
Code:
the video filters (-vf) can be used with mplayer and mencoder.
    currently -vf ass/-ass does not work with mencoder.
I hadn't done this stuff for quite a while, and now that you mention it, I remember this limitation of mencoder's. This article that you linked to looked very helpful, and it reminded me why I don't do re-encoding any more!

In my case I was often creating XviD versions in the AVI container for use on portable or set-top devices, a task which mencoder generally handles quite well. XviDs still work fine on the PS3, by the way.
__________________
SeijiSensei is offline   Reply With Quote
Old 2010-04-22, 11:57   Link #6
Soconfused
Old God Member
 
 
Join Date: Dec 2003
Location: you....don't wanna know
Age: 27
Send a message via AIM to Soconfused
Hmmm, this seems a bit over my head and alot of work. I know absolutely nothing about this kind of stuff, so maybe he's out of luck. We tried using the ps3 media server but he has a horribly old laptop with 512 ram and it just wasn't happening. I'll give this mencoder stuff a try though.
__________________
What exactly is the point of becoming powerful if one cannot indulge the hedonistic opportunities that come with it?
Soconfused is offline   Reply With Quote
Old 2010-04-22, 14:02   Link #7
JEEB
Bishoujo fanatic
*Fansubber
 
 
Join Date: May 2007
Location: Finland / Japan
Quote:
Originally Posted by SeijiSensei View Post
In my case I was often creating XviD versions in the AVI container for use on portable or set-top devices, a task which mencoder generally handles quite well. XviDs still work fine on the PS3, by the way.
MPEG-4 ASP re-encoding is even worse, no levels or profiles that can be easily checked and used to make "compliant" ASP streams for a given player. Not to mention that ASP generally compresses much worse and is much easier to get compression artifacts with (plus the common ASP encoders IIRC didn't even have a "constant quality" setting such as CRF (constant ratefactor), only constant QPs -- which leads to much worse results).

Not to mention that you'd still have to care about VFR and ass subtitles in this case :P

Quote:
Originally Posted by Soconfused View Post
...I'll give this mencoder stuff a try though.
If you're on Windows, in case of no segment linking (separate OP/ED) you could just use Avisynth with ffms2, x264 and some extra tools (if you don't care about the linked segments, you can handle the video similarly too):
  • Install Avisynth and grab the newest possible ffms2 build (currently the newest's at this post). Install ffms2 into avisynth's <avisynth folder>/plugins folder.
  • Grab AvsPmod, mkvtoolnix, mp4box, the newest vsfilter (this if you have no CCCP etc. installed) and the newest 32bit x264 from either jarod or me.
  • Extract mkvtoolnix, mp4box and x264 into a folder from which they can be easily ran from any folder (hint: Add the folder into path) and make a shortcut to AvsPmod somewhere to easily check the output of your avs scripts. You can also copy the vsfilter dll into <avisynth folder>/plugins as well.
  • Extract fonts and the .ass file from the Matroska file with the mkvextract tool of the mkvtoolnix package (currently I couldn't find any better way to utilize Haali's splitter's etc. without using lolDirectShow), put the fonts into a place from which VSFilter would load them (installing them into the system is one way). If the audio in the Matroska file is AAC or something else the PS3 can play as-is, extract as well.
  • Open up AvsPmod and write an avisynth script like this and save in the same folder as the hurf.mkv fansub you're trying to re-encode:
    Code:
    ffvideosource("hurf.mkv", timecodes="timecodes.txt")
  • Press either f5 or the bottom-left triangle to bring up the preview of AvsP. With ffms2 it should take some time before it appears, but it should appear after the file gets indexed (the timecodes file should get made as well).
  • If you get the preview fine, you can move to
    Code:
    ffvideosource("hurf.mkv")
    TextSub("your_extracted_subs.ass", vfr="timecodes.txt")
    (removing the timecodes output from ffms2 is just a precaution, not sure if it tries to overwrite the file every time, therefore leading to a probability of some other app getting a not-full or empty timecodes file)
  • Update your preview with pressing f5 on the keyboard. If everything went fine, you should have subs on your video now, ready to be output to x264 \o/.
  • Encode your video with the subs with
    Code:
    x264 your_avisynth_script.avs --crf 20 --tune animation --tcfile-in timecodes.txt --level 4.1 --vbv-bufsize 62500 --vbv-maxrate 62500 -o video.mp4
    (on quality: you can edit the resulting quality with the crf switch, bigger number means less filesize and less quality, smaller number is more filesize and more quality. Just use the highest one that still brings you acceptable quality (and no, you can't use "crf 0" because that'd be lossless, which hardware decoders usually don't support ); You can also edit the quality/size ratio by adding a --preset , f.ex. --preset slower or --preset fast to make the encoding faster or slower (which also modifies the end result of a given crf as well, slightly or less slightly) -- list of presets)
  • If your source is anamorphic, you might want to edit the SAR (also called PAR at some places) in the x264 command line, adapt it to your needs. The link to "list of presets" actually is a link towards a long article on x264's settings, reading it might help understand some things. The PSP actually lets you specify mostly used aspect ratios while playing, so I'd guess something similar is possible on the PS3 as well, so even if you didn't set the SAR/PAR, you should be mostly fine.
  • Mux the extracted audio with the video with the video into a single mp4 file
    Code:
    mp4box -add video.mp4 -add audio.aac/mp3 muxed_video.mp4
  • You should be done. In the case of audio that you can't play on the PS3, you can use most of the commonly used apps to work this out, since the audio track will always just be an audio track, without subtitles or VFR or other problematic parts, try ffmpeg with libfaac for an example, or ffmpeg piped into neroaacenc
  • In the case of the resolution just being bad for the PS3 (doesn't happen often, but I guess it's possible), you can just add "Spline36Resize(desired_width, desired_height)" into a yet another line after the TextSub() line. This would then resize the video to the desired size. Spline36Resize is an internal function in Avisynth.

Whew, this surely took time to write out, and I did get a bit lazy on the "unsupported audio re-encoding" part, but it should be otherwise mighty fine. If you spot any mistakes or happen to know any better way to do this on Windows, please do mention (Cygwin really isn't an option, but I guess if you can package it nicely you get extra points ).
__________________
I'm human, no debug | Unofficial x264 builds

Last edited by JEEB; 2010-04-23 at 05:11. Reason: Added things here and there; Typos fixed.
JEEB is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 14:12.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
We use Silk.