Hi,everyone.
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
Thanks beforehand.
+ Reply to Thread
Results 1 to 30 of 32
-
-
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
Code:ffmpeg -bsfs
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:
Code: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 00: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
https://ffmpeg.zeranoe.com/builds/
Code: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! -
use mkvtoolnix
users currently on my ignore list: deadrats, Stears555, marcorocchini -
Then a simple remux with mkvtoolnix should remove them,... doesn't it?
users currently on my ignore list: deadrats, Stears555, marcorocchini -
what's the difference between mkvtoolnix and simple mkvtoolnix
? as I said mkv doesn't work.
-
You wrote that mvktoolnix doesn't see the captions, in which case it won't passthrough the captions on remuxing and thus removing the captions which is what you wanted.
...so i need to permanently remove them.what's the difference between mkvtoolnix and simple mkvtoolnix?users currently on my ignore list: deadrats, Stears555, marcorocchini -
To be more clear: I want to remove closed captions on white collar tv show see pic 1. But when add the mkv to mkvtoolnix they can not seen see pic 2. Not the question is: how to remove them?
-
But when add the mkv to mkvtoolnix they can not seen see pic 2.
1. open file in mvktoolnix
2. set 'Destination file' to a file with a different name
3. press 'Start muxing'
-> new file shouldn't contain the captions (mkvtoolnix doesn't detect the captions thus it won't remux them)users currently on my ignore list: deadrats, Stears555, marcorocchini -
did exactly what you've said. the result is negative see pic.
[Attachment 50356 - Click to enlarge] -
can you share a !small! sample of such a file so I can look into it?
(you can cut/split the file using mkvtoolnix)users currently on my ignore list: deadrats, Stears555, marcorocchini -
I dont have suitable software to split the video. I searched on google but coudn't find it. But I downloaded the movie from this link: http://links.snahp.it/8fEsK5HrAVZEL0zs7cguIMr5YKrukX3Ahiz. the main page is https://snahp.it/?p=45676
-
Like I wrote:
you can cut/split the file using mkvtoolnixusers currently on my ignore list: deadrats, Stears555, marcorocchini -
thank you. I didn't know that I can do it with mkvtool. here's a sample, you can check the subtitles: https://www.dropbox.com/s/6ech65kq282nv0n/white%20collar-001.mkv?dl=0
-
or you can download from here: https://mega.nz/#!ik1SVAjJ!WhDfwH3NlDO8mqjltZ02-16g88865a4S7P50MxAn_Wo
-
got the file
users currently on my ignore list: deadrats, Stears555, marcorocchini -
some first impressions:
a. extracing the streams with mkvtoolnix and remuxing the raw streams does kind of remove the captions (vlc still shows them in the subtitle list, but shows nothing if they are selected)
b. same happens when using:
Code:ffmpeg.exe -i "PATH TO INPUT" -c copy -bsf:v h264_mp4toannexb "PATH TO OUTPUT"
users currently on my ignore list: deadrats, Stears555, marcorocchini -
Code:
ffmpeg -i "PATH TO INPUT" -bsf:v "filter_units=remove_types=6" -c copy "PATH TO OUTPUT"
Cu SelurLast edited by Selur; 30th Sep 2019 at 03:12.
users currently on my ignore list: deadrats, Stears555, marcorocchini -
ffmpeg-i "PATH TO INPUT" -bsf:v "filter_units=remove_types=6" -c copy "PATH TO OUTPUT"
I don't know anything about these codes. I only know using softwares like mkvtoolnix -
ffmpeg is a command line took you can download from for example: https://ffmpeg.zeranoe.com/builds/
extracting ffmpeg.exe into a folder of your choice, for example: "E:\ffmpeg.exe" you could call:
Code:"E:\ffmpeg.exe" -i "E:\Input\input.mkv" -bsf:v "filter_units=remove_types=6" -c copy "E:\Output\output.mkv"
users currently on my ignore list: deadrats, Stears555, marcorocchini -
looks little bit confusing. will try it in my free time. thank you a lot. I'll write later.
-
Modified Hybrid and released a new version (2019.09.30.1) you can download over at http://selur.de/downloads
After downloading and installing Hybrid, do the following:- Start Hybrid
- set default output and temp paths (under Config->Path->Default XXX path)
- save those settings as defaults, press 'Config->Save->All->Save selected' (right lower corner)
- enable "Config->Automation->Passthrough streams->Subtitle" in case you want to keep the normal subtitles (if you don't want to keep any subtitles don't do this)
- enable "Base->Subtitle" and "Subtitle->Import->Delete subtitle after muxing" for Hybrid to delete extracted and muxed subtitles.
- enable "Congig->Input->Extraction->Stream extraction with ffmpeg"
- Set "Base->Processing->Video" to "passthrough"
- Set "Base->Processing->Audio" to "passthrough all"
- Set "Base->Default container" to 'mkv'
- In case you set a default output folder which isn't the input folder enable 'Base->Generate' otherwise set the output file ('Base->Output File')
- Load your file ("Base->Open File"; upper right corner)
- Create a job for Hybrid by pressing "Base->Add to queue" (lower right corner)
- Start the processing ("Jobs->Queue->Play"; upper left corner)
Note that you can do multiple files at once by selecting them and then drag&dropping them onto the input line in the Base-tab.
Cu Selurusers currently on my ignore list: deadrats, Stears555, marcorocchini
Similar Threads
-
How to extract CEA-608 CC within an mp4/m4v file into an SRT file on a Mac?
By Emm_W in forum SubtitleReplies: 2Last Post: 13th Sep 2016, 12:03 -
closed captions preservation in H.264 to Mpeg-2 IP streams?
By marks47 in forum Video ConversionReplies: 3Last Post: 14th Dec 2015, 12:52 -
is there a way to rip closed captions from an avi file?
By ginahoy in forum SubtitleReplies: 2Last Post: 11th May 2014, 03:36 -
Convert 608 to 708 SCC captions
By video2me in forum SubtitleReplies: 0Last Post: 9th May 2014, 13:38 -
Video file generated by h.264 cannot open.
By codec in forum Software PlayingReplies: 7Last Post: 1st Apr 2014, 14:19