Hi all, my first post so please be kind..
I've posted in here as I'm not sure what category this falls into.
Does anyone know of a piece of software which will show which videos within a folder have chapter markers and which dont?
I've got a lot of files on a Plex Server, but the chapter markers interefere with subtitles (which are needed due to my wife being deaf). I therefore need to go through all the video files on the server and find which ones have chapter markers, so I can remove them and get subtitles working. I'm aware that you can open a file in a player such as Zoom, and the markers appear as little dots along the time bar, but I've got approximately 6GB of film and TV on the server and it'd take forever and a day to do it one file at a time.
+ Reply to Thread
Results 1 to 4 of 4
It should be do-able with ffmpeg, even if you have to process every file rather than only the MP4s with chapters. You might want to use it in combination with AnotherGUI to make it a bit easier. A command line for AnotherGUI/ffmpeg to do what you're wanting would look something like this:
-i "<FullSourceFileName>" -y -threads 1 -codec copy -dn -map_chapters -1 -map_metadata -1 -metadata title="<PureSourceFileNameWOExtension>" -movflags faststart -movflags disable_chpl "<OutputPath><OutputFileName>.mp4"
That should strip out unnecessary metadata, set the title in metadata to match the file name and optimise the MP4 layout.
To do only what you asked about and nothing more:
-i "<FullSourceFileName>" -y -threads 1 -codec copy -map_chapters -1 -movflags disable_chpl "<OutputPath><OutputFileName>.mp4"
Creating a preset for AnotherGUI is pretty easy. Once you have it working you can drag and drop files onto the GUI and click "Go".
If you only want to re-mux the MP4s with chapters and leave the rest alone.... I'm not sure how you'd about it using ffmpeg off the top of my head, assuming it's possible. Someone else may have a clever way to do it, otherwise....
Even though it's an audio player, foobar2000 will open MP4s containing video. If they have chapters, when the MP4s are loaded into a playlist, fb2k will display them as individual "tracks". There's a right click option "Utilities/Strip MP4 Chapters". It only applies to MP4/M4A, and the menu item won't appear unless all the selected items in the playlist are MP4/M4A, but you can load multiple MP4s into a playlist, highlight them all, use the right click option and fb2k will strip out any chapters. It might not be super fast for large files, as I think fb2k automatically re-writes the MP4s to optimise their layout, although I'd have to check so don't quote me on that. It should leave MP4s without chapters untouched.
Last edited by hello_hello; 27th Dec 2018 at 07:18.
FFmpeg.exe is overkill for this task. Use ffprobe.exe. This batch file will make a list of all MP4s that have chapters.
@echo off setlocal enabledelayedexpansion for %%F in (*.mp4) do ( set done=0 for /f "tokens=1" %%G in ('ffprobe.exe -hide_banner -show_chapters "%%F"') do ( if !done!==0 ( echo %%F>> has_chapters.txt set done=1 ) ) )
Last edited by JVRaines; 27th Dec 2018 at 20:24. Reason: "set done=0" in wrong place in loop