I have a H.264 type file (with .mkv as a container) that has some closed captions (CEA-608 aka EIA-608) and they're appearing in middle of the screen so i need to permanently remove them. I have tried various of options,but seems that most software are not detecting it,while VLC,MPC-HC does and plays them.
Here's a screen of VLC that shows that there are captions (streams 2-5):
I have tried CCextractor , Subtitle Edit , MKVToolinx even VideoRedo had option to remove NAL units,but none of them are able to pick those captions up or exported the file still having those captions.
For example,CCextractor kept returning
The closest i got was with FFMPEG.Code:No captions were found in input.
Apparently it has a bitstream filter called filter_units so you can either pass or reject NAL units by it's type.I found also this:
EIA-608 and similar closed captioning standards, the captions are embedded directly in the video bitstream as user data. H.264 bitstreams are stored as a sequence of NAL (network abstraction layer) units. Each unit has a type; user data is stored in a NAL unit of the supplemental enhancement information (SEI) type.
The latest H.264 spec table (table 7.1 page 86) says that SEI type is 6,so my code would be:
Code:ffmpeg -i input.mkv -codec copy -bsf:v 'filter_units=remove_types=6' output.mkv
But apparently it doesn't recognize filter_units at all,here's what FFMPEG returns (error in red color):
I hope i made it as clear as possible, i would appreciate any type of help.Code:C:\Users\Sviests\Desktop\ffmpeg\bin>ffmpeg -i input.mkv v -codec copy -bsf:v "filter_units=remove_types=6" output.mkv ffmpeg version N-90264-g80798e3857 Copyright (c) 2000-2018 the FFmpeg developers built with gcc 7.3.0 (GCC) configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --e nable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libblur ay --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable- libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enab le-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-li bvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --en able-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable- libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enabl e-libspeex --enable-libxvid --enable-libmfx --enable-amf --enable-ffnvcodec --en able-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth libavutil 56. 8.100 / 56. 8.100 libavcodec 58. 14.100 / 58. 14.100 libavformat 58. 10.100 / 58. 10.100 libavdevice 58. 2.100 / 58. 2.100 libavfilter 7. 12.100 / 7. 12.100 libswscale 5. 0.102 / 5. 0.102 libswresample 3. 0.101 / 3. 0.101 libpostproc 55. 0.100 / 55. 0.100 Input #0, matroska,webm, from 'input.mkv': Metadata: encoder : libebml v1.3.6 + libmatroska v1.4.9 creation_time : 2018-09-10T16:37:05.000000Z Duration: 01:39:15.03, start: 0.000000, bitrate: 14218 kb/s Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], Closed Captions, 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (de fault) Metadata: BPS-eng : 13576112 DURATION-eng : 01:39:15.033000000 NUMBER_OF_FRAMES-eng: 142778 NUMBER_OF_BYTES-eng: 10105774524 _STATISTICS_WRITING_APP-eng: mkvmerge v26.0.0 ('In The Game') 64-bit _STATISTICS_WRITING_DATE_UTC-eng: 2018-09-10 16:37:05 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES Stream #0:1(eng): Audio: eac3, 48000 Hz, 5.1(side), fltp, 640 kb/s Metadata: title : English Surround 5.1 - E-AC3 BPS-eng : 640000 DURATION-eng : 01:39:14.976000000 NUMBER_OF_FRAMES-eng: 186093 NUMBER_OF_BYTES-eng: 476398080 _STATISTICS_WRITING_APP-eng: mkvmerge v26.0.0 ('In The Game') 64-bit _STATISTICS_WRITING_DATE_UTC-eng: 2018-09-10 16:37:05 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES Stream #0:2: Video: mjpeg, yuvj440p(pc, bt470bg/unknown/unknown), 450x600 [S AR 72:72 DAR 3:4], 90k tbr, 90k tbn, 90k tbc Unknown bitstream filter filter_units
Our website is made possible by displaying online advertisements to our visitors. Consider supporting us by disable your adblocker or try DVDFab and copy, convert or make Blu-rays and DVDs! :)
+ Reply to Thread
Results 1 to 5 of 5
It seems to work ok here ; vlc, mediainfo, ffmpeg report the 608 streams gone , and ffmpeg no longer reports closed caption for the video stream
1) check if your ffmpeg binary has filter_units available as a bitstream filter; it might not have been compiled with it
2) is there a typo in you console copy/paste ? there seems to be an extra "v" after input.mkv . Maybe double check your actual command line
That extra v was just a typo while copy/pasting here.
ffmpeg -bsfs returned:
Bitstream filters: aac_adtstoasc chomp dump_extra dca_core extract_extradata h264_metadata h264_mp4toannexb h264_redundant_pps hevc_metadata hevc_mp4toannexb imxdump mjpeg2jpeg mjpegadump mp3decomp mpeg2_metadata mpeg4_unpack_bframes mov2textsub noise null remove_extra text2movsub trace_headers vp9_raw_reorder vp9_superframe vp9_superframe_split
Last edited by Sviests; 11th Sep 2018 at 01:44. Reason: update to avoid double posting
I don't see it in your list
Here is my list. I'm using a windows binary from zeraone
Bitstream filters: aac_adtstoasc chomp dump_extra dca_core eac3_core extract_extradata filter_units h264_metadata h264_mp4toannexb h264_redundant_pps hapqa_extract hevc_metadata hevc_mp4toannexb imxdump mjpeg2jpeg mjpegadump mp3decomp mpeg2_metadata mpeg4_unpack_bframes mov2textsub noise null remove_extra text2movsub trace_headers vp9_metadata vp9_raw_reorder vp9_superframe vp9_superframe_split
It's all good now. Worked like a charm. Just needed to update some binaries (apparently i thought i had the latest version,heh).
Anyway,this can be locked now, thanks!