Opened 9 years ago

Last modified 8 years ago

#1277 closed defect

Subtitle conversion fails — at Initial Version

Reported by: bakhshian Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords: dvdsub
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

I need to convert the format of the subtitle stream of a movie so my device can play it.
Here is the list of all existing streams :

Stream #0:0(eng): Video: h264 (High), yuv420p, 1920x816 [SAR 1:1 DAR 40:17], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
Stream #0:1(eng): Audio: dts (DTS), 48000 Hz, 5.1(side), s16, 1536 kb/s (default)
Metadata:

title : 3/2+1

Stream #0:2(eng): Subtitle: hdmv_pgs_subtitle (default)
Stream #0:3(ger): Subtitle: hdmv_pgs_subtitle
Stream #0:4(ger): Subtitle: hdmv_pgs_subtitle
Stream #0:5(ger): Subtitle: hdmv_pgs_subtitle
Stream #0:6(ger): Subtitle: hdmv_pgs_subtitle

I want to keep only the English subtitle and convert it too. The available codecs are :

ffmpeg -codecs | grep sub

DES ass Advanced SubStation? Alpha subtitle
DES dvbsub DVB subtitles
DES dvdsub DVD subtitles
D S pgssub HDMV Presentation Graphic Stream subtitles
DES srt SubRip? subtitle
DES xsub DivX subtitles (XSUB)

I choose dvdsub as the new format and try to run ffmpeg command with the following arguments :

ffmpeg -i in.mkv -scodec dvdsub -vcodec copy -acodec copy out.mkv

It starts running, but after a while ( I think when it reaches the first frame with subtitle ) crashes. Here you can see the messages :

Stream mapping:

Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Stream #0:2 -> #0:2 (pgssub -> dvdsub)

Press [q] to stop, ? for help
Subtitle encoding failed1.0 size= 182919kB time=00:00:00.00 bitrate= 0.0kbits/s

The interesting point is that ffplay and mplayer both can play the input file and they show the subtitle properly.

Here is the output of ffmpeg -version command :

ffmpeg version 0.10.2-4:0.10.2-0ubuntu0jon1~oneiric1
built on Mar 18 2012 11:07:55 with gcc 4.6.1
configuration: --extra-version='4:0.10.2-0ubuntu0jon1~oneiric1' --arch=amd64 --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu --disable-stripping --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --enable-runtime-cpudetect --enable-libfreetype --enable-vaapi --enable-frei0r --enable-gpl --enable-postproc --enable-x11grab --enable-librtmp --enable-libvo-aacenc --enable-version3 --enable-libvo-amrwbenc --enable-version3 --enable-libdc1394 --shlibdir=/usr/lib/x86_64-linux-gnu --enable-shared --disable-static
libavutil 51. 35.100 / 51. 35.100
libavcodec 53. 61.100 / 53. 61.100
libavformat 53. 32.100 / 53. 32.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 61.100 / 2. 61.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 6.100 / 0. 6.100
libpostproc 52. 0.100 / 52. 0.100

Change History (0)

Note: See TracTickets for help on using tickets.