Jump to content

MKV Files have no Chapter Markers


Painkiller8818
Go to solution Solved by rbjtech,

Recommended Posts

Painkiller8818

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 by Painkiller8818
Link to comment
Share on other sites

Painkiller8818
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

  • Thanks 1
Link to comment
Share on other sites

  • Solution
rbjtech

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 by rbjtech
Link to comment
Share on other sites

Painkiller8818
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...