[FFmpeg-user] Extract EIA_608 closed caption to srt.

Victor Accarini victor.accarini at gmail.com
Tue Jan 24 21:26:42 EET 2017


Hi,

I have a *.ts file and if I play it on VLC I can see 4 tracks for closed
caption and if I select track 1 I can see the closed captions on the
screen. I'm trying to extract those to an srt file but I didn't find a way.

I tried the following command:

ffmpeg -f lavfi -i "movie=output.ts[out+subcc]" -map s output.srt
>
> ffmpeg version 3.2.2 Copyright (c) 2000-2016 the FFmpeg developers
>   built with gcc 5.4.0 (GCC)
>   configuration: --enable-gpl --enable-libx264 --prefix=/usr
>   libavutil      55. 34.100 / 55. 34.100
>   libavcodec     57. 64.101 / 57. 64.101
>   libavformat    57. 56.100 / 57. 56.100
>   libavdevice    57.  1.100 / 57.  1.100
>   libavfilter     6. 65.100 /  6. 65.100
>   libswscale      4.  2.100 /  4.  2.100
>   libswresample   2.  3.100 /  2.  3.100
>   libpostproc    54.  1.100 / 54.  1.100
> Input #0, lavfi, from 'movie=output.ts[out+subcc]':
>   Duration: N/A, start: 1.767033, bitrate: N/A
>     Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 720x480
> [SAR 1:1 DAR 3:2], 29.97 fps, 29.97 tbr, 90k tbn, 90k tbc
>     Stream #0:1: Subtitle: eia_608
> Output #0, srt, to 'output.srt':
>   Metadata:
>     encoder         : Lavf57.56.100
>     Stream #0:0: Subtitle: subrip (srt)
>     Metadata:
>       encoder         : Lavc57.64.101 srt
> Stream mapping:
>   Stream #0:1 -> #0:0 (eia_608 (cc_dec) -> subrip (srt))
> Press [q] to stop, [?] for help
> [mpeg2video @ 0x27d88c0] ac-tex damaged at 3 6peed=   0x
> [mpeg2video @ 0x27d88c0] Warning MVs not available
> [mpeg2video @ 0x27d88c0] concealing 1080 DC, 1080 AC, 1080 MV errors in P
> frame
> size=       0kB time=00:00:00.00 bitrate=N/A speed=   0x
> video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
> muxing overhead: unknown
> Output file is empty, nothing was encoded (check -ss / -t / -frames
> parameters if used)
>


ffmpeg says there is no closed caption (empty file) but it has, I can play
it with VLC.

The TS file can be found in here:
https://1drv.ms/v/s!AkX8xxpecPkAhXPJjV1OgAHX2vTE

Thanks,
Victor


More information about the ffmpeg-user mailing list