FFmpeg and subtitles

Discuss issues related to PS3 Media Server development (only for programmers)

FFmpeg and subtitles

Postby Raptor399 » Fri Nov 23, 2012 9:53 pm

I am trying to see what FFmpeg can do with subtitles. The howto is concise:
Code: Select all
ffmpeg -i test.mkv -vf "ass=test.ass" out.mp4

However, when I open the resulting movie with VLC, I see no subtitles.

Googling mentions some other options, but none of them seems to be able to burn the subtitles on top of an mp4 video. Some old articles mention the "-newsubtitle" flag, but that no longer exists according to the FFmpeg documentation.

I am using our homebrew FFmpeg on Mac OSX, which should be able to understand quite a lot of flavors of subs:

Code: Select all
> ./ffmpeg -codecs
ffmpeg version 1.0 (PMS2) for PS3 Media Server Copyright (c) 2000-2012 the FFmpeg developers
  built on Nov 11 2012 09:59:47 with llvm-gcc 4.2.1 (LLVM build 2336.11.00)
  configuration: http://git.io/ZHdseg
Codecs:
 D..... = Decoding supported
 .E.... = Encoding supported
 ..V... = Video codec
 ..A... = Audio codec
 ..S... = Subtitle codec
 ...I.. = Intra frame-only codec
 ....L. = Lossy compression
 .....S = Lossless compression
[...]
 DES... dvb_subtitle         DVB subtitles (decoders: dvbsub ) (encoders: dvbsub )
 ..S... dvb_teletext         DVB teletext
 DES... dvd_subtitle         DVD subtitles (decoders: dvdsub ) (encoders: dvdsub )
 ..S... eia_608              EIA-608 closed captions
 D.S... hdmv_pgs_subtitle    HDMV Presentation Graphic Stream subtitles (decoders: pgssub )
 D.S... jacosub              JACOsub subtitle
 D.S... microdvd             MicroDVD subtitle
 DES... mov_text             MOV text
 D.S... realtext             RealText subtitle
 D.S... sami                 SAMI subtitle
 DES... srt                  SubRip subtitle with embedded timing
 DES... ssa                  SSA (SubStation Alpha) / ASS (Advanced SSA) subtitle (decoders: ass ) (encoders: ass )
 DES... subrip               SubRip subtitle
 D.S... subviewer            SubViewer subtitle
 ..S... text                 raw UTF-8 text
 D.S... webvtt               WebVTT subtitle
 DES... xsub                 XSUB


Has anyone been successful in burning subs into an mp4 using FFmpeg?
Raptor399
Project Member
 
Posts: 1916
Joined: Thu Mar 10, 2011 12:06 am

Re: FFmpeg and subtitles

Postby shagrath » Mon Feb 25, 2013 12:56 am

working fine here but stumbling on this ffmpeg bug: https://ffmpeg.org/trac/ffmpeg/ticket/2067
(no seeking = no dice :p)
shagrath
Project Lead
 
Posts: 2664
Joined: Wed Jan 14, 2009 1:39 pm

Re: FFmpeg and subtitles

Postby shagrath » Mon Feb 25, 2013 1:25 am

and while I'm thinking about this, this other bug https://ffmpeg.org/trac/ffmpeg/ticket/1398
should unfortunately prevent the dts muxing, whenever mencoder is deprecated for ffmpeg
shagrath
Project Lead
 
Posts: 2664
Joined: Wed Jan 14, 2009 1:39 pm

Re: FFmpeg and subtitles

Postby SubJunk » Mon Feb 25, 2013 1:45 am

shagrath wrote:and while I'm thinking about this, this other bug https://ffmpeg.org/trac/ffmpeg/ticket/1398
should unfortunately prevent the dts muxing, whenever mencoder is deprecated for ffmpeg
FFmpeg DTS works when using tsMuxeR (which we already always use for DTS)
P.S. Welcome back to the forum!
SubJunk
 
Posts: 1208
Joined: Fri Mar 27, 2009 5:25 am

Re: FFmpeg and subtitles

Postby shagrath » Mon Feb 25, 2013 2:01 am

hey :)
well now ffmpeg has (somewhat) working subtitles rendering, I was thinking about ditching tsmuxer, but those bugs are hard to workaround
shagrath
Project Lead
 
Posts: 2664
Joined: Wed Jan 14, 2009 1:39 pm

Re: FFmpeg and subtitles

Postby ExSport » Mon Feb 25, 2013 7:53 pm

Wow shagrath!
Welcome back, hope you will stay longer 8-)
ExSport
 
Posts: 2161
Joined: Mon Jan 19, 2009 5:40 pm

Re: FFmpeg and subtitles

Postby mazey » Wed Feb 27, 2013 5:14 am

i just wish TranscodeFastStart=true worked with ffmpeg it takes 12 or so seconds to start the video instead of 3 secs with the option enabled and mencoder. is this fixable maybe a flag isnt being set for ffmpeg or doesnt the option exist for ffmpeg.
PMS 1.90.2 SNAPSHOT - HP Proliant Microserver N54L 2.2Ghz - Windows Home Server 2011 (64bit) 8GB - Bravia KDL55HX750
mazey
 
Posts: 767
Joined: Sat Oct 24, 2009 9:07 am

Re: FFmpeg and subtitles

Postby SubJunk » Wed Feb 27, 2013 5:37 am

mazey wrote:i just wish TranscodeFastStart=true worked with ffmpeg it takes 12 or so seconds to start the video instead of 3 secs with the option enabled and mencoder. is this fixable maybe a flag isnt being set for ffmpeg or doesnt the option exist for ffmpeg.
TranscodeFastStart does work with all engines, but FFmpeg just takes a little while to start. It's the same with all media servers that use FFmpeg (which is most of them)
SubJunk
 
Posts: 1208
Joined: Fri Mar 27, 2009 5:25 am

Re: FFmpeg and subtitles

Postby mazey » Fri Mar 01, 2013 11:13 am

it takes about the same time as mencoder without it thats why i assumed it never worked, its a very long time and a kinda a deal breaker for me.

EDIT: this has been fixed and will be available in 1.90.0, ffmpeg starts very fast now 4 seconds regardless if transcodefaststart is set to true or false so everyone can enjoy super quick starts with ffmpeg :D ive stopped using mencoder now and use ffmpeg.
PMS 1.90.2 SNAPSHOT - HP Proliant Microserver N54L 2.2Ghz - Windows Home Server 2011 (64bit) 8GB - Bravia KDL55HX750
mazey
 
Posts: 767
Joined: Sat Oct 24, 2009 9:07 am


Return to Developers

Who is online

Users browsing this forum: No registered users and 1 guest