Painkiller8818 203 Posted November 8, 2023 Share Posted November 8, 2023 (edited) HI, Does anyone know how to enable chapter markers in mkv files using ffmpeg? i had a lot of AVI files, which i converted to MKV using ffmpeg. I used the following command (a powershell script for batch editing i wrote) to convert them: C:\ffmpeg\ffmpeg.exe -fflags +genpts -i $file -c:v copy -c:a copy -metadata:s:a:0 language=ger $fullname I thought using the +genpts would create/enable chapters, but now the MKV files seems to have no chapters and IntroSkip is not able to add Chapters: Warn Intro Skip-Chapters: CHAPTER: Rans erster Fall has no chapters available for sequence insertion Is there a way using ffmpeg to enable chapters, i don't wanna insert chapters from a file, i just wanna make emby able to insert chapters on its own, which actually seems not possible for these files. thanks Edited November 8, 2023 by Painkiller8818 Link to comment Share on other sites More sharing options...
Luke 37151 Posted November 8, 2023 Share Posted November 8, 2023 Hi, you may find mkvtoolnix helpful. Link to comment Share on other sites More sharing options...
Painkiller8818 203 Posted November 8, 2023 Author Share Posted November 8, 2023 4 hours ago, Luke said: Hi, you may find mkvtoolnix helpful. yeah i know this tool but i need to bulk insert it, thats why i made a script, i don't wanna reencode over 400 files manually. thanks 1 Link to comment Share on other sites More sharing options...
Solution rbjtech 4301 Posted November 8, 2023 Solution Share Posted November 8, 2023 (edited) Use mkvmerge (part of mkvtoolnix) in the script - it will import everything it can - including existing chapters if they previously existed in the AVI. ie - using your cli above - mkvmerge -o $fullname $file for the full syntax options - look here - https://mkvtoolnix.download/doc/mkvmerge.html If chapters don't exist in the MKV - then emby will create them internally anyway - every 5 minutes. Note, if there is even just 1 chapter in the MKV however, emby will not create any additional ones (lets say you just have an 'Intro' chapter and nothing else), so either import good chapters or delete all the chapters and let emby recreate them for you. (use the chapter options in mkvmerge to do this). Emby will then insert the Intro hidden chapters once detected. Edited November 8, 2023 by rbjtech Link to comment Share on other sites More sharing options...
Painkiller8818 203 Posted November 8, 2023 Author Share Posted November 8, 2023 23 minutes ago, rbjtech said: Use mkvmerge (part of mkvtoolnix) in the script - it will import everything it can - including existing chapters if they previously existed in the AVI. ie - using your cli above - mkvmerge -o $fullname $file for the full syntax options - look here - https://mkvtoolnix.download/doc/mkvmerge.html If chapters don't exist in the MKV - then emby will create them internally anyway - every 5 minutes. Note, if there is even just 1 chapter in the MKV however, emby will not create any additional ones (lets say you just have an 'Intro' chapter and nothing else), so either import good chapters or delete all the chapters and let emby recreate them for you. (use the chapter options in mkvmerge to do this). Emby will then insert the Intro hidden chapters once detected. ok perfekt, thanks for the reply Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now