Opened 21 months ago

#5283 new enhancement

Add bitstream filter to remove Closed Captions from h264

Reported by: cehoyos Owned by:
Priority: wish Component: avcodec
Version: git-master Keywords: h264 cc
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

http://thread.gmane.org/gmane.comp.video.ffmpeg.user/61438/focus=61440
The sample from ticket #2885 contains Closed Captions, FFmpeg does not allow to remove them without reencoding.

$ ffmpeg -i transformers.ts -vcodec copy out.h264
ffmpeg version N-78869-gdd2ea5c Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl
  libavutil      55. 19.100 / 55. 19.100
  libavcodec     57. 27.101 / 57. 27.101
  libavformat    57. 27.102 / 57. 27.102
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 38.100 /  6. 38.100
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
Input #0, mpegts, from 'transformers.ts':
  Duration: 00:01:59.29, start: 0.578456, bitrate: 9015 kb/s
  Program 1
    Stream #0:0[0x1e1]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuvj420p(pc), 1920x1080 [SAR 1:1 DAR 16:9], Closed Captions, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:1[0x1e2]: Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, 5.1(side), fltp, 384 kb/s
Output #0, h264, to 'out.h264':
  Metadata:
    encoder         : Lavf57.27.102
    Stream #0:0: Video: h264 ([27][0][0][0] / 0x001B), yuvj420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 29.97 fps, 29.97 tbr, 29.97 tbn, 29.97 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
frame= 3575 fps=0.0 q=-1.0 Lsize=  118242kB time=00:01:59.25 bitrate=8122.6kbits/s speed= 580x
video:118291kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
$ ffmpeg -i out.h264
ffmpeg version N-78869-gdd2ea5c Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl
  libavutil      55. 19.100 / 55. 19.100
  libavcodec     57. 27.101 / 57. 27.101
  libavformat    57. 27.102 / 57. 27.102
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 38.100 /  6. 38.100
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
[h264 @ 0x3a8c280] Stream #0: not enough frames to estimate rate; consider increasing probesize
Input #0, h264, from 'out.h264':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: h264 (High), yuvj420p(pc), 1920x1080 [SAR 1:1 DAR 16:9], Closed Captions, 29.97 fps, 29.97 tbr, 1200k tbn, 59.94 tbc
At least one output file must be specified

Change History (0)

Note: See TracTickets for help on using tickets.