VideoHelp Forum
+ Reply to Thread
Page 2 of 2
FirstFirst 1 2
Results 31 to 60 of 60
Thread
  1. Originally Posted by Crunchedfire View Post
    Originally Posted by the_steve_randolph View Post
    Originally Posted by poisondeathray View Post
    So ... "If ffmpeg can't detect the subs, you can't "remove" or stream copy them with ffmpeg" - is it clear now ?
    Yes, and, THAT is the purpose of this thread. WHY is ffmpeg not finding these subtitles? Other apps are not seeing them either.
    Hi, since it seem like an weird issue, if using VLC Media Player, if you have for example an folder named "Subtitles" in the same directory as the video, and allso if the subtitle name have the same name as the video it will appear as an subtitle stream within vlc! If maybe you have many folders and videos in this directory that the video is inside maybe you used the same name as an subtitle without knowing and have an folder with many subtitles!

    For me it say:
    Stream 0
    Codec: Text subtitles with various Tags (subt)
    Language: \subtitles\subtitlename
    Type: Subtitle

    This is from vlc, the folder named "Subtitles" is in the same directory as the avi video and in this directory the subtitle have the same name as the video, VLC Media Player picked the subtitle up by itself! The subtitle allso show up as an subtitle track that can be disabled!
    Thanks, but, I have already eliminated that as to what is causing my issue.
    Quote Quote  
  2. Originally Posted by ProWo View Post
    -bsf:v filter_units=remove_types=6
    works with a h264 (avc) video (tested).
    For mpeg4 (divx, xvid) you seem to be out of luck.
    I would still experiment with other numbers.
    The error message I posted above said:
    Code:
    Codec 'mpeg4' (12) is not supported by the bitstream filter 'filter_units'.  Supported codecs
    are: av1 (226) h264 (2) hevc (173) mpeg2video (2) vp9 (167)
    That indicates to me that "mpeg4" and "filter_units" are not compatible at all - regardless of the types value. Then the issue would seem to be to figure out how to access EAI-608 data in a mpeg4 file, right?
    Quote Quote  
  3. I found this thread answer that provided a solution to removing the close captioning: https://forum.videohelp.com/threads/390217-Deleting-CEA-608-(EIA-608)-captions-from-a-...le#post2561602

    Is Selur still around? Maybe he can explain how to remove EIA-608 closed captioning in a mpeg4 video with ffmpeg.
    Quote Quote  
  4. closed caption subtitles are normal streams.
    To remove them with ffmpeg you can simply passthrough all the other streams,...
    Code:
    ffmpeg -i "Path to input file" -c:v copy -c:a copy "path to output file"
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  5. Originally Posted by Selur View Post
    closed caption subtitles are normal streams.
    To remove them with ffmpeg you can simply passthrough all the other streams,...
    Code:
    ffmpeg -i "Path to input file" -c:v copy -c:a copy "path to output file"
    Dang it - that was too easy! {muttering stuff under my breath} Thanks again Selur!
    Quote Quote  
  6. Originally Posted by the_steve_randolph View Post
    Originally Posted by Selur View Post
    closed caption subtitles are normal streams.
    To remove them with ffmpeg you can simply passthrough all the other streams,...
    Code:
    ffmpeg -i "Path to input file" -c:v copy -c:a copy "path to output file"
    Dang it - that was too easy! {muttering stuff under my breath} Thanks again Selur!
    Oops, I think that I spoke too soon. The ffmepg above does seemingly remove the EIA-608 subtitle data in the video stream. But, the resulting file still has a subtitle track visible in VLC. When I originally viewed the input file in VLC, there were two subtitles displayed at the same time - one apparently from the video stream and one from a subtitle track soft-coded into the file. Looking at the resulting output file, VLC still shows a subtitle track in the "Subtitles" dropdown and in the Tools > Codec information as "Stream 2" (that Codec information is the same as what I reported in a previous post). When I do a ffprobe on the output file, it does not show any information about any subtitles. But when I do this command:
    Code:
    d:ffmpeg -f lavfi -i movie=in.mp4[out0+subcc] -vn -an -codec:s subrip in.srt
    the resulting SRT output file is empty and the console display shows this:
    Code:
    Output #0, srt, to in.srt
      Metadata:
        encoder  :  Lavf60.5.100
      Stream #0:0:  Subtitle: subrip
        Metadata:
          encoder  :  Lavc60.10.100 subrip
    Stream mapping:
      Stream #0:1 -> #0:0 (eia_608 (cc_dec) -> subrip (native))
    So, it looks like the EIA-608 subtitles (aka closed captioning) is in two different streams. The typical "-sn" and "map 0 -0: s:0" {yes, space inserted to avoid emoji} don't remove the remaining track/stream
    Last edited by the_steve_randolph; 12th Feb 2024 at 22:21.
    Quote Quote  
  7. a. Share a sample of your source which includes subtitles. (not an empy subtitle stream)
    b. write down what you want to do (I thought you wanted to remove the subtitles, now wou wan to do some conversion?)
    side note: make sure you have no subtiles files lying next to your video file whenusing vlc otherwise it may show those external subtitles in its subtitle list.

    Cu Selur
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  8. Originally Posted by Selur View Post
    a. Share a sample of your source which includes subtitles. (not an empy subtitle stream)
    b. write down what you want to do (I thought you wanted to remove the subtitles, now wou wan to do some conversion?)
    side note: make sure you have no subtiles files lying next to your video file whenusing vlc otherwise it may show those external subtitles in its subtitle list.

    Cu Selur
    The code in the previous post were just to show that all of the subtitle streams in the file are EIA_608. The original file plays two exact same subtitles in VLC - one set from a track listed in the "Subtitles" dropdown. When I disable that track, there is still one set that remains. From the various things I have tried here, at one point I was able to play the file with no subtitles at all. As you may know me and my projects from the past, I am trying to learn more about ffmpeg - as opposed to just simply removing the subtitles. The basic switches shown in the previous post don't work, and, that is why I started this thread.

    I have never uploaded a file before, so, I will need to do a couple of things before uploading. And, looking at several copies I have left from this process, I am having a little bit of trouble nailing down exactly what seems to be happening at each step/try.
    Last edited by the_steve_randolph; 12th Feb 2024 at 23:16.
    Quote Quote  
  9. OK, I am close to losing my mind. It seems that VLC is automatically picking up and using a subtitles file called "IN-XXX.SRT" for a video called "IN.MP4". I will post again after consulting with my shrink.
    Quote Quote  
  10. *gig* autoloading subtitles,..
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  11. Originally Posted by Selur View Post
    closed caption subtitles are normal streams.
    To remove them with ffmpeg you can simply passthrough all the other streams,...
    Code:
    ffmpeg -i "Path to input file" -c:v copy -c:a copy "path to output file"
    Not true. The EIA608/708 captions are encoded into the SEI with the videostream and are invisible to ffmpeg.
    So a simple remux doesn't remove the captions.
    Quote Quote  
  12. @ the_steve_randolph

    As a last resort (for your mpeg4 video):
    Re-encode it with x264 and then use
    -bsf:v filter_units=remove_types=6
    with streamcopy.
    Quote Quote  
  13. if you reencode shouldn't you lose the sei unit info of the source anyways
    => like I wrote: " a. Share a sample of your source which includes subtitles. (not an empy subtitle stream)"
    Last edited by Selur; 14th Feb 2024 at 09:22.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  14. Originally Posted by Selur View Post
    if you reencode shouldn't you lose the sei unit info of the source anyways
    Tested, nope. They are still here.
    Quote Quote  
  15. Originally Posted by Selur View Post
    *gig* autoloading subtitles,..
    Yep. I just now went back at looked at all of the previous messages in this thread. Only one or two mentioned the subfolder issue, but, not what I ended up discovering. My original file was named something like MACHINE.AVI. Originally I had a file named something like MACHINE.SRT. Thinking that VLC was "autoloading" that SRT, I changed it to MACHINE-XXX.SRT - but it STILL "autoloaded" it (but I did not realize it at the time). And, during my processing/testing, to save a few keystrokes I shortened the name of the output file to M.MP4. That STILL found MACHINE-XXX.SRT! Of couse, that means that it would also "autoload" a file from a totally different video named MACHINE_SOUNDS.SRT. Yes, I am mad and embarrassed by it, but, what is probably the most annoying is that I don't know who I am mad at the most.

    I am in the process of going back and replicating what I found and I will make a post here to provide the "solution" and a recap of what was discovered. Again, thanks for your help.
    Quote Quote  
  16. Originally Posted by ProWo View Post
    @ the_steve_randolph

    As a last resort (for your mpeg4 video):
    Re-encode it with x264 and then use
    -bsf:v filter_units=remove_types=6
    with streamcopy.
    I am willing to try that, but, "re-encode it with x264" is again above my paygrade. I understand what a codec is and in general what it does, but, I have no knowledge of the features/problems with a specific codec or how to manipulate them. As stated before, the purpose of this thread/project is to learn more about ffmpeg. Over time, I have taken a lot of notes about things I don't quite understand with the hope of understanding at some point in the future. As stated in a post just a few minutes ago, I am in the process of replicating everything and I will be making a final post very soon. Again, thanks for your help.
    Quote Quote  
  17. Like I wrote: share a sample of your source which has subtitles in it, so others can test and suggest stuff.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  18. Originally Posted by the_steve_randolph View Post
    I am willing to try that, but, "re-encode it with x264" is again above my paygrade.
    A fast recode commandline:

    Code:
    ffmpeg.exe -i "your_mpeg4_with_path" -map 0:v:0 -c:v libx264 -crf 20 output.mp4
    This recodes the videostream only.
    Quote Quote  
  19. Originally Posted by Selur View Post
    Like I wrote: share a sample of your source which has subtitles in it, so others can test and suggest stuff.
    This is the first time I have tried to upload a file, so, hopefully it works.

    *************** Edited: this is NOT the correct file
    Image Attached Files
    Last edited by the_steve_randolph; 15th Feb 2024 at 16:24.
    Quote Quote  
  20. Originally Posted by the_steve_randolph View Post
    This is the first time I have tried to upload a file, so, hopefully it works.
    This isn't a mpeg4 video with EIA 608 captions, but a h264 video with hardcoded subtitles.
    This hardcoded subs cannot be removed.
    You should upload the original mpeg4 sample with captions..
    Quote Quote  
  21. Originally Posted by ProWo View Post
    Originally Posted by the_steve_randolph View Post
    This is the first time I have tried to upload a file, so, hopefully it works.
    This isn't a mpeg4 video with EIA 608 captions, but a h264 video with hardcoded subtitles.
    This hardcoded subs cannot be removed.
    You should upload the original mpeg4 sample with captions..
    Yes, I have uploaded the wrong file.
    Quote Quote  
  22. Originally Posted by Selur View Post
    Like I wrote: share a sample of your source which has subtitles in it, so others can test and suggest stuff.
    I am working on that. In the meantime, I have downloaded the most recent version of Hybrid (Windows ver. 2024.01.12.1) from the "software/Hybrid" folder on this site. But, when I tried to run it, it gave me this error message:
    Code:
    Found no activationattributeNameFilter for key (FieldMatch)! (let Selur know)
    Last edited by the_steve_randolph; 15th Feb 2024 at 19:49.
    Quote Quote  
  23. Originally Posted by ProWo View Post
    Originally Posted by the_steve_randolph View Post
    This is the first time I have tried to upload a file, so, hopefully it works.
    This isn't a mpeg4 video with EIA 608 captions, but a h264 video with hardcoded subtitles.
    This hardcoded subs cannot be removed.
    You should upload the original mpeg4 sample with captions..
    This appears to be the correct file:
    Image Attached Files
    Quote Quote  
  24. Originally Posted by the_steve_randolph View Post
    Originally Posted by ProWo View Post
    Originally Posted by the_steve_randolph View Post
    This is the first time I have tried to upload a file, so, hopefully it works.
    This isn't a mpeg4 video with EIA 608 captions, but a h264 video with hardcoded subtitles.
    This hardcoded subs cannot be removed.
    You should upload the original mpeg4 sample with captions..
    This appears to be the correct file:
    No this is the wrong file again.
    A h264 video with hardcoded subtitles, as above.
    Quote Quote  
  25. Originally Posted by ProWo View Post
    No this is the wrong file again.
    A h264 video with hardcoded subtitles, as above.
    OK, I have talked with my shrink and he said yes - I am losing my mind. He thinks we might have identified it early, but, it also might only last a few more days. So, now it is a race against time for me to locate, clip, and, upload the proper file. Wish me luck cats and dogs!
    Quote Quote  
  26. OK, I downloaded the file that I attached to post #53. Then, I execute this command:
    Code:
    ffmpeg -f lavfi -i movie=clip_of_orig_downloaded_again.avi[out0+subcc]
    and this is the output I get:
    Code:
    ffmpeg version N-101923-gc012f9b265 Copyright (c) 2000-2021 the FFmpeg developers
      built with gcc 9.3-win32 (GCC) 20200320
      configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --enable-libvmaf --enable-vulkan --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --enable-ffnvcodec --enable-cuda-llvm --enable-libglslang --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-libs=-lgomp
      libavutil      56. 72.100 / 56. 72.100
      libavcodec     58.136.100 / 58.136.100
      libavformat    58. 78.100 / 58. 78.100
      libavdevice    58. 14.100 / 58. 14.100
      libavfilter     7.111.100 /  7.111.100
      libswscale      5. 10.100 /  5. 10.100
      libswresample   3. 10.100 /  3. 10.100
      libpostproc    55. 10.100 / 55. 10.100
    [h264 @ 000002bb7a1c7bc0] Application has requested 29 threads. Using a thread count greater than 16 is not recommended.
    Input #0, lavfi, from 'movie=clip_of_orig_downloaded_again.avi[out0+subcc]':
      Duration: N/A, start: 0.080000, bitrate: N/A
      Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 512x384 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
      Stream #0:1: Subtitle: eia_608
    At least one output file must be specified
    That command is the only one I can seem to find that identifies the eia_608 stream. I am still getting conflicting views when I play my various copies on various players. Yes, ultimately I want to hardcode the subtitles into the video stream. When playing the videos, it seems that the smaller gray subtitles are the closed captioning and the more stark white subtitles are burned in.
    Quote Quote  
  27. Originally Posted by ProWo View Post
    No this is the wrong file again.
    A h264 video with hardcoded subtitles, as above.
    Clearly I am having issues with finding the right file. But, coming at it from another angle, is there a player out there that does identify EIA 608 closed captioning AND can turn it on or off?
    Quote Quote  
  28. Member
    Join Date
    Jul 2009
    Location
    United States
    Search Comp PM
    Originally Posted by the_steve_randolph View Post
    OK, I downloaded the file that I attached to post #53. Then, I execute this command:
    Code:
    ffmpeg -f lavfi -i movie=clip_of_orig_downloaded_again.avi[out0+subcc]
    .
    .
    .
    That command is the only one I can seem to find that identifies the eia_608 stream.
    I think that code is creating an empty cc stream. Using the same command against a file that I know does not have an eia_608 stream also shows a subtitle stream.
    Code:
    Input #0, lavfi, from 'movie=test.avi[out0+subcc]':
      Duration: N/A, start: 0.500000, bitrate: N/A
        Stream #0:0: Video: rawvideo (I420 / 0x30323449),
        Stream #0:1: Subtitle: eia_608
    Quote Quote  
  29. Originally Posted by the_steve_randolph View Post
    Clearly I am having issues with finding the right file. But, coming at it from another angle, is there a player out there that does identify EIA 608 closed captioning AND can turn it on or off?
    VLC player, Tools, Media information, Codec.

    Image
    [Attachment 77121 - Click to enlarge]
    Quote Quote  
  30. Originally Posted by ProWo View Post
    Originally Posted by the_steve_randolph View Post
    Clearly I am having issues with finding the right file. But, coming at it from another angle, is there a player out there that does identify EIA 608 closed captioning AND can turn it on or off?
    VLC player, Tools, Media information, Codec.
    OK, I seem to be unable to find my original file that had the EIA 608 closed captioning. Seeing this post, I have a few questions:
    1. can you upload a clip of that file with the EIA 608 closed captioning so that I have something to work with?
    2. where in VLC can I turn on or off those EIA 608 closed captions?
    3. what switch in ffmpeg would show me that the file contains EAI 608 closed captions?
    4. what ffmpeg command can be used to extract the closed captioning into a text-based subtitles file?
    5. what ffmpeg command can be used to eliminate the EIA 608 closed captions?
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!