Find all video files and remove all subtitles

HandBrake for Windows support
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
Rottleve
Posts: 4
Joined: Sat Jun 10, 2017 1:08 pm

Find all video files and remove all subtitles

Post by Rottleve »

Hi,

I found this script for MKVToolnix (mkvmerge) and was wondering if you can do the same with HandBrake for mp4 files? :)

Code: Select all

@echo off
cls
set rootfolder=C:\
echo Enumerating all MKVs under %rootfolder%
echo.
for /r %rootfolder% %%a in (*.mkv) do (
    for /f %%b in ('mkvmerge -i "%%a" ^| find /c /i "subtitles"') do (
        if [%%b]==[0] (
            echo "%%a" has no subtitles
        ) else (
            echo.
            echo "%%a" has subtitles
            mkvmerge -q -o "%%~dpna (No Subs)%%~xa" -S "%%a"
            if errorlevel 1 (
                echo Warnings/errors generated during remuxing, original file not deleted
            ) else (
                del /f "%%a"
                echo Successfully remuxed to "%%~dpna (No Subs)%%~xa", original file deleted
            )
            echo.
        )
    )
)
User avatar
JohnAStebbins
HandBrake Team
Posts: 5726
Joined: Sat Feb 09, 2008 7:21 pm

Re: Find all video files and remove all subtitles

Post by JohnAStebbins »

No. HandBrake is a transcoder, not a muxer. mkvmerge is a muxer. Look up MP4Box. It is an mp4 muxer and may be able to do what you want.
Rottleve
Posts: 4
Joined: Sat Jun 10, 2017 1:08 pm

Re: Find all video files and remove all subtitles

Post by Rottleve »

Thank you for your fast answer but could you briefly explain the difference between those two? If I google "transcoder" and "muxer" I am getting flooded with technical terms and specifications... :?
mduell
Veteran User
Posts: 8204
Joined: Sat Apr 21, 2007 8:54 pm

Re: Find all video files and remove all subtitles

Post by mduell »

Rottleve
Posts: 4
Joined: Sat Jun 10, 2017 1:08 pm

Re: Find all video files and remove all subtitles

Post by Rottleve »

Thanks. Not really beginner friendly but I will learn with time...
Post Reply