Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
convert dvdsub subtitle from TS-file to vobsub
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
Haubentaucher
n00b
n00b


Joined: 28 Feb 2011
Posts: 60

PostPosted: Mon Sep 10, 2012 7:25 pm    Post subject: convert dvdsub subtitle from TS-file to vobsub Reply with quote

I have a recording as TS-file from VLC. There ist one video-track, a few audio-tracks and one subtitle-track in the DVD-subtitle format. The Problem is, that I don't find a program to convert the subtitle into vobsub.

Here is the input:
Code:
$ ffmpeg -i movie.ts
ffmpeg version 0.11.1 Copyright (c) 2000-2012 the FFmpeg developers
  built on Aug  4 2012 01:48:02 with gcc 4.6.2
  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --enable-shared --cc=x86_64-pc-linux-gnu-gcc --cxx=x86_64-pc-linux-gnu-g++ --ar=x86_64-pc-linux-gnu-ar --optflags='-O2 -pipe -march=native -fomit-frame-pointer' --extra-cflags='-O2 -pipe -march=native -fomit-frame-pointer' --extra-cxxflags='-O2 -pipe -march=native -fomit-frame-pointer' --disable-static --enable-gpl --enable-version3 --enable-postproc --enable-avfilter --disable-stripping --disable-debug --disable-doc --disable-network --disable-vdpau --enable-libmp3lame --enable-libvo-aacenc --enable-libtheora --enable-libx264 --enable-libxvid --enable-libaacplus --enable-nonfree --enable-libcdio --disable-indev=v4l --disable-indev=v4l2 --disable-indev=oss --enable-x11grab --disable-outdev=oss --enable-libfreetype --enable-pthreads --enable-libbluray --enable-libspeex --enable-libvorbis --enable-libvpx --disable-amd3dnow --disable-amd3dnowext --disable-altivec --disable-avx --disable-vis --disable-neon --cpu=host  libavutil      51. 54.100 / 51. 54.100
  libavcodec     54. 23.100 / 54. 23.100
  libavformat    54.  6.100 / 54.  6.100
  libavdevice    54.  0.100 / 54.  0.100
  libavfilter     2. 77.100 /  2. 77.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100
[mpeg2video @ 0x18a66e0] mpeg_decode_postinit() failure
    Last message repeated 5 times
[mpegts @ 0x1886030] max_analyze_duration 5000000 reached at 5024000
[mpegts @ 0x1886030] Could not find codec parameters (Unknown: none ([5][0][0][0] / 0x0005))
[NULL @ 0x18d5cb0] start time is not set in estimate_timings_from_pts
[NULL @ 0x18dbf40] start time is not set in estimate_timings_from_pts
[mpegts @ 0x1886030] PES packet size mismatch
    Last message repeated 4 times
Input #0, mpegts, from 'movie.ts':
  Duration: 02:15:08.86, start: 35055.933033, bitrate: 6669 kb/s
  Program 28006
    Metadata:
      service_name    : ?ZDF
      service_provider: ?ZDFvision
  Program 28007
    Metadata:
      service_name    : ?3sat
      service_provider: ?ZDFvision
    Stream #0:0[0xd2]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p, 720x576 [SAR 64:45 DAR 16:9], 15000 kb/s, 25.82 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0xdc](deu): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16, 256 kb/s
    Stream #0:2[0xdd](mis): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16, 192 kb/s
    Stream #0:3[0xde](mul): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16, 192 kb/s
    Stream #0:4[0xe1](deu): Audio: ac3 ([6][0][0][0] / 0x0006), 48000 Hz, stereo, s16, 448 kb/s
    Stream #0:5[0xe6](deu): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006)
    Stream #0:6[0xe7](deu): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) (hearing impaired)
    Stream #0:7[0x3b6]: Unknown: none ([5][0][0][0] / 0x0005)
  Program 28008
    Metadata:
      service_name    : ?KiKA
      service_provider: ?ZDFvision
  Program 28011
    Metadata:
      service_name    : ?ZDFinfo
      service_provider: ?ZDFvision
  Program 28012
    Metadata:
      service_name    : ?DKULTUR
      service_provider: ?ZDFvision
  Program 28013
    Metadata:
      service_name    : ?DLF
      service_provider: ?ZDFvision
  Program 28014
    Metadata:
      service_name    : ?zdf_neo
      service_provider: ?ZDFvision
  Program 28016
    Metadata:
      service_name    : ?zdf.kultur
      service_provider: ?ZDFvision
  Program 28017
    Metadata:
      service_name    : ?DRadio Wissen
      service_provider: ?ZDFvision
At least one output file must be specified
$


A few experiments:
Code:
$ ffmpeg -i movie.ts -map 0:0 -map 0:4 -map 0:6 -codec:0 copy -codec:1 copy -codec:2 copy test.mkv
ffmpeg version 0.11.1 Copyright (c) 2000-2012 the FFmpeg developers
  built on Aug  4 2012 01:48:02 with gcc 4.6.2
  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --enable-shared --cc=x86_64-pc-linux-gnu-gcc --cxx=x86_64-pc-linux-gnu-g++ --ar=x86_64-pc-linux-gnu-ar --optflags='-O2 -pipe -march=native -fomit-frame-pointer' --extra-cflags='-O2 -pipe -march=native -fomit-frame-pointer' --extra-cxxflags='-O2 -pipe -march=native -fomit-frame-pointer' --disable-static --enable-gpl --enable-version3 --enable-postproc --enable-avfilter --disable-stripping --disable-debug --disable-doc --disable-network --disable-vdpau --enable-libmp3lame --enable-libvo-aacenc --enable-libtheora --enable-libx264 --enable-libxvid --enable-libaacplus --enable-nonfree --enable-libcdio --disable-indev=v4l --disable-indev=v4l2 --disable-indev=oss --enable-x11grab --disable-outdev=oss --enable-libfreetype --enable-pthreads --enable-libbluray --enable-libspeex --enable-libvorbis --enable-libvpx --disable-amd3dnow --disable-amd3dnowext --disable-altivec --disable-avx --disable-vis --disable-neon --cpu=host  libavutil      51. 54.100 / 51. 54.100
  libavcodec     54. 23.100 / 54. 23.100
  libavformat    54.  6.100 / 54.  6.100
  libavdevice    54.  0.100 / 54.  0.100
  libavfilter     2. 77.100 /  2. 77.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100
[mpeg2video @ 0x1ea26e0] mpeg_decode_postinit() failure
    Last message repeated 5 times
[mpegts @ 0x1e82030] max_analyze_duration 5000000 reached at 5024000
[mpegts @ 0x1e82030] Could not find codec parameters (Unknown: none ([5][0][0][0] / 0x0005))
[NULL @ 0x1ed1cb0] start time is not set in estimate_timings_from_pts
[NULL @ 0x1ed7f40] start time is not set in estimate_timings_from_pts
[mpegts @ 0x1e82030] PES packet size mismatch
    Last message repeated 4 times
Input #0, mpegts, from 'movie.ts':
  Duration: 02:15:08.86, start: 35055.933033, bitrate: 6669 kb/s
  Program 28006
    Metadata:
      service_name    : ?ZDF
      service_provider: ?ZDFvision
  Program 28007
    Metadata:
      service_name    : ?3sat
      service_provider: ?ZDFvision
    Stream #0:0[0xd2]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p, 720x576 [SAR 64:45 DAR 16:9], 15000 kb/s, 25.82 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0xdc](deu): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16, 256 kb/s
    Stream #0:2[0xdd](mis): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16, 192 kb/s
    Stream #0:3[0xde](mul): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16, 192 kb/s
    Stream #0:4[0xe1](deu): Audio: ac3 ([6][0][0][0] / 0x0006), 48000 Hz, stereo, s16, 448 kb/s
    Stream #0:5[0xe6](deu): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006)
    Stream #0:6[0xe7](deu): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) (hearing impaired)
    Stream #0:7[0x3b6]: Unknown: none ([5][0][0][0] / 0x0005)
  Program 28008
    Metadata:
      service_name    : ?KiKA
      service_provider: ?ZDFvision
  Program 28011
    Metadata:
      service_name    : ?ZDFinfo
      service_provider: ?ZDFvision
  Program 28012
    Metadata:
      service_name    : ?DKULTUR
      service_provider: ?ZDFvision
  Program 28013
    Metadata:
      service_name    : ?DLF
      service_provider: ?ZDFvision
  Program 28014
    Metadata:
      service_name    : ?zdf_neo
      service_provider: ?ZDFvision
  Program 28016
    Metadata:
      service_name    : ?zdf.kultur
      service_provider: ?ZDFvision
  Program 28017
    Metadata:
      service_name    : ?DRadio Wissen
      service_provider: ?ZDFvision
File 'test.mkv' already exists. Overwrite ? [y/N] Subtitle codec 94209 is not supported.
Output #0, matroska, to 'test.mkv':
  Metadata:
    encoder         : Lavf54.6.100
    Stream #0:0: Video: mpeg2video ([2][0][0][0] / 0x0002), yuv420p, 720x576 [SAR 64:45 DAR 16:9], q=2-31, 15000 kb/s, 25.82 fps, 1k tbn, 90k tbc
    Stream #0:1(deu): Audio: ac3 ([6][0][0][0] / 0x0006), 48000 Hz, stereo, 448 kb/s
    Stream #0:2(deu): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) (hearing impaired)
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:4 -> #0:1 (copy)
  Stream #0:6 -> #0:2 (copy)
Could not write header for output file #0 (incorrect codec parameters ?)

Code:
$ ffmpeg -i movie.ts -map 0:0 -map 0:4 -map 0:6 -codec:0 copy -codec:1 copy -codec:2 dvdsub test.mkv
ffmpeg version 0.11.1 Copyright (c) 2000-2012 the FFmpeg developers
  built on Aug  4 2012 01:48:02 with gcc 4.6.2
  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --enable-shared --cc=x86_64-pc-linux-gnu-gcc --cxx=x86_64-pc-linux-gnu-g++ --ar=x86_64-pc-linux-gnu-ar --optflags='-O2 -pipe -march=native -fomit-frame-pointer' --extra-cflags='-O2 -pipe -march=native -fomit-frame-pointer' --extra-cxxflags='-O2 -pipe -march=native -fomit-frame-pointer' --disable-static --enable-gpl --enable-version3 --enable-postproc --enable-avfilter --disable-stripping --disable-debug --disable-doc --disable-network --disable-vdpau --enable-libmp3lame --enable-libvo-aacenc --enable-libtheora --enable-libx264 --enable-libxvid --enable-libaacplus --enable-nonfree --enable-libcdio --disable-indev=v4l --disable-indev=v4l2 --disable-indev=oss --enable-x11grab --disable-outdev=oss --enable-libfreetype --enable-pthreads --enable-libbluray --enable-libspeex --enable-libvorbis --enable-libvpx --disable-amd3dnow --disable-amd3dnowext --disable-altivec --disable-avx --disable-vis --disable-neon --cpu=host  libavutil      51. 54.100 / 51. 54.100
  libavcodec     54. 23.100 / 54. 23.100
  libavformat    54.  6.100 / 54.  6.100
  libavdevice    54.  0.100 / 54.  0.100
  libavfilter     2. 77.100 /  2. 77.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100
[mpeg2video @ 0x250f6e0] mpeg_decode_postinit() failure
    Last message repeated 5 times
[mpegts @ 0x24ef030] max_analyze_duration 5000000 reached at 5024000
[mpegts @ 0x24ef030] Could not find codec parameters (Unknown: none ([5][0][0][0] / 0x0005))
[NULL @ 0x253ecb0] start time is not set in estimate_timings_from_pts
[NULL @ 0x2544f40] start time is not set in estimate_timings_from_pts
[mpegts @ 0x24ef030] PES packet size mismatch
    Last message repeated 4 times
Input #0, mpegts, from 'movie.ts':
  Duration: 02:15:08.86, start: 35055.933033, bitrate: 6669 kb/s
  Program 28006
    Metadata:
      service_name    : ?ZDF
      service_provider: ?ZDFvision
  Program 28007
    Metadata:
      service_name    : ?3sat
      service_provider: ?ZDFvision
    Stream #0:0[0xd2]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p, 720x576 [SAR 64:45 DAR 16:9], 15000 kb/s, 25.82 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0xdc](deu): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16, 256 kb/s
    Stream #0:2[0xdd](mis): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16, 192 kb/s
    Stream #0:3[0xde](mul): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16, 192 kb/s
    Stream #0:4[0xe1](deu): Audio: ac3 ([6][0][0][0] / 0x0006), 48000 Hz, stereo, s16, 448 kb/s
    Stream #0:5[0xe6](deu): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006)
    Stream #0:6[0xe7](deu): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) (hearing impaired)
    Stream #0:7[0x3b6]: Unknown: none ([5][0][0][0] / 0x0005)
  Program 28008
    Metadata:
      service_name    : ?KiKA
      service_provider: ?ZDFvision
  Program 28011
    Metadata:
      service_name    : ?ZDFinfo
      service_provider: ?ZDFvision
  Program 28012
    Metadata:
      service_name    : ?DKULTUR
      service_provider: ?ZDFvision
  Program 28013
    Metadata:
      service_name    : ?DLF
      service_provider: ?ZDFvision
  Program 28014
    Metadata:
      service_name    : ?zdf_neo
      service_provider: ?ZDFvision
  Program 28016
    Metadata:
      service_name    : ?zdf.kultur
      service_provider: ?ZDFvision
  Program 28017
    Metadata:
      service_name    : ?DRadio Wissen
      service_provider: ?ZDFvision
File 'test.mkv' already exists. Overwrite ? [y/N] Output #0, matroska, to 'test.mkv':
  Metadata:
    encoder         : Lavf54.6.100
    Stream #0:0: Video: mpeg2video ([2][0][0][0] / 0x0002), yuv420p, 720x576 [SAR 64:45 DAR 16:9], q=2-31, 15000 kb/s, 25.82 fps, 1k tbn, 90k tbc
    Stream #0:1(deu): Audio: ac3 ([6][0][0][0] / 0x0006), 48000 Hz, stereo, 448 kb/s
    Stream #0:2(deu): Subtitle: dvd_subtitle (hearing impaired)
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:4 -> #0:1 (copy)
  Stream #0:6 -> #0:2 (dvbsub -> dvdsub)
Press [q] to stop, [?] for help
Subtitle encoding failed

Code:
$ mencoder movie.ts -vobsubout test -o /dev/null -nosound -ovc copy

This produces an empty test.idx and test.sub.

Then I tried with projectX (without gui)
Code:
$ projectX movie.ts

This produces streams for video and audio and 2 subtitlefiles movie.sup and movie.sup.IFO. Now I tried
Code:
$ subtitle2vobsub -p movie.sup -i movie.sup.IFO

This produces an empty movie_subtitle.sub and movie_subtitle.idx file.

Do you know a way to extract the subtitle in the vobsub format or could it be that the subtitle is empty (I don't watch the movie, yet)? However projectX says that it extract 777 (subtitle-)images out of the TS-file.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum