Opened 21 months ago

Last modified 6 months ago

#5893 new enhancement

Support for ARIB subtitles

Reported by: nicol Owned by:
Priority: wish Component: avcodec
Version: git-master Keywords: ARIB sub
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Change History (3)

comment:1 Changed 21 months ago by cehoyos

  • Keywords sub added; subtitles removed

Please provide a sample.

comment:2 Changed 21 months ago by nicol

I want to demux arib subtitles form TS(.ts or .m2ts) file, such as Caption2Ass_PCR(.ts only), using ffmpeg.
https://github.com/maki-rxrz/Caption2Ass_PCR

Upload sample file. https://www.datafilehost.com/d/bc19159f
Stream #0:2 is arib subtitles data, but this data is binary data. I want to text subtitles data.

ffmpeg -i input.ts -map 0:2 -c copy -f data output.bin
ffmpeg version N-82036-g0ad71ed Copyright (c) 2000-2016 the FFmpeg developers

built with gcc 5.4.0 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls--enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
libavutil 55. 32.100 / 55. 32.100
libavcodec 57. 61.103 / 57. 61.103
libavformat 57. 52.100 / 57. 52.100
libavdevice 57. 0.102 / 57. 0.102
libavfilter 6. 64.100 / 6. 64.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 2.100 / 2. 2.100
libpostproc 54. 0.100 / 54. 0.100

[mpeg2video @ 000000000048f600] Invalid frame dimensions 0x0.

Last message repeated 13 times

[mpegts @ 000000000046a9e0] start time for stream 3 is not set in estimate_timings_from_pts
[mpegts @ 000000000046a9e0] Could not find codec parameters for stream 4 (Unknown: none ([13][0][0][0] / 0x000D)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 000000000046a9e0] Could not find codec parameters for stream 5 (Unknown: none ([13][0][0][0] / 0x000D)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 000000000046a9e0] Could not find codec parameters for stream 6 (Unknown: none ([13][0][0][0] / 0x000D)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 000000000046a9e0] Could not find codec parameters for stream 7 (Unknown: none ([13][0][0][0] / 0x000D)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 000000000046a9e0] Could not find codec parameters for stream 8 (Unknown: none ([13][0][0][0] / 0x000D)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 000000000046a9e0] Could not find codec parameters for stream 9 (Unknown: none ([13][0][0][0] / 0x000D)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 000000000046a9e0] Could not find codec parameters for stream 10 (Unknown: none ([13][0][0][0] / 0x000D)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mpegts, from 'input.ts':

Duration: 00:00:16.40, start: 61847.565433, bitrate: 9888 kb/s
Program 47104

Metadata:

service_name : ?NHK?Am9g?1?9-Eg
service_provider:

Stream #0:0[0x100]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, bt709), 1440x1080 [SAR 4:3 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
Stream #0:1[0x110]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 158 kb/s
Stream #0:2[0x130]: Data: bin_data ([6][0][0][0] / 0x0006)
Stream #0:3[0x138]: Data: bin_data ([6][0][0][0] / 0x0006)
Stream #0:4[0x140]: Unknown: none ([13][0][0][0] / 0x000D)
Stream #0:5[0x160]: Unknown: none ([13][0][0][0] / 0x000D)
Stream #0:6[0x161]: Unknown: none ([13][0][0][0] / 0x000D)
Stream #0:7[0x162]: Unknown: none ([13][0][0][0] / 0x000D)
Stream #0:8[0x170]: Unknown: none ([13][0][0][0] / 0x000D)
Stream #0:9[0x171]: Unknown: none ([13][0][0][0] / 0x000D)
Stream #0:10[0x172]: Unknown: none ([13][0][0][0] / 0x000D)
Stream #0:11[0x111]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo,fltp, 158 kb/sfltp, 158 kb/s

Program 47105

Metadata:

service_name : ?NHK?Am9g?2?9-Eg
service_provider:

Program 47488

Metadata:

service_name : ?NHK?7HBS?G?9-Eg
service_provider:

Output #0, data, to 'output.bin':

Metadata:

encoder : Lavf57.52.100
Stream #0:0: Data: bin_data ([6][0][0][0] / 0x0006)

Stream mapping:

Stream #0:2 -> #0:0 (copy)

Press [q] to stop, ? for help
size= 1kB time=00:00:15.68 bitrate= 0.5kbits/s speed= 789x
video:0kB audio:0kB subtitle:0kB other streams:1kB global headers:0kB muxing overhead: unknown

comment:3 Changed 6 months ago by nicol

I found supported ffmpeg with customized libass.
https://github.com/0p1pp1/ffmpeg
https://github.com/0p1pp1/libass

Note: See TracTickets for help on using tickets.