VideoHelp Forum

+ Reply to Thread
Results 1 to 17 of 17
Thread
  1. I'm currently in the process of converting all my Mkv's to mp4 because I use plex and I have audio and video sync issues with mkv's , but not with mp4's ,so as the title says I want to add subs and chapters to my new mp4 files..ive tried various things like drax for chapters and although it says completed the chapters don't actually work...so any help would be much appreciated...thnx
    Quote Quote  
  2. Do the original mkv files already have chapters and subtitles embed? Then I would recommend using VidCoder or HandBrake for conversion to mp4 because they will keep the chapters and can also copy the subtitles (burn-in all types, or ASS or srt as simple text).

    Do you know what causes your mkvs to stutter? Variable framerate? Too high bitrate? Maybe outputting as mkv (but coded differently than the source mkv) may also solve the problem.

    If you only want to add chapters and subtitles to already existing mp4 files, mp4box can do that.
    mp4box -add "subtitles.srt" -add "chapters.txt:chap" "video.mp4"
    (video.mp4 will be overwritten in-place. Make a backup first.)
    Quote Quote  
  3. My mkv files dont stutter on plex, they actually stream perfect however the audio is slightly out of sync and it drives me nuts..mp4 however works perfectly in sync hence why I'm converting.. I don't want to re encode an entire film just for subs or chapters id like a program like mkv merge where I can just add them to the container file..i use shana encoder to convert to mp4 and it takes about a minute to do but I can't find a way of adding the metadata from the original mob.. I've extracted it from the mkv but just can't find a program to re add to the mp4...ill try the software you suggested and report back later...thanks
    Quote Quote  
  4. You could also try ffmpeg:
    ffmpeg -i "input.mkv" -map 0:v -map 0:a -map 0:s -map_chapters 0 -c:v copy -c:a copy -c:s mov_text "output.mp4"
    Or with only audio re-encoding to stereo aac:
    ffmpeg -i "input.mkv" -map 0:v -map 0:a -map 0:s -map_chapters 0 -c:v copy -c:a aac -ac 2 -c:s mov_text "output.mp4"

    I think BOX4 is a GUI that basically does the same.
    Quote Quote  
  5. I've looked Into ffmpeg but to be totally honest I don't really understand all the command lines so looking for a small gui that can do it for me lol
    Quote Quote  
  6. just tried box4 and no option to add subs or chapters..
    Quote Quote  
  7. Chapters are automatic. For subtitles you can set a default in "settings". Or after adding an input file to the list click on "tracks".
    Quote Quote  
  8. box 4 doesnt work..i cant believe theres not a simple program to do this automatically like mkv merge
    Quote Quote  
  9. ffmpeg can do it. If you need a GUI there are many GUIs for ffmpeg - like BOX4. BOX4 works here so if you only say "box 4 doesnt work" it will be difficult to help you.
    Quote Quote  
  10. just trying ffmpeg now with the gui...fingers crossed
    Quote Quote  
  11. ok heres what ive got so far...installed ffmpeg and all required files, installed myffmpeg gui and box4..the outcome is the same with both programs..on myffmpeg the i set the video to passthrough, the audio to aac , i added subs and chapters from the source file..the outcome is the subtitles lose their size and go really small, the chapters work BUT it also adds them as an extra subtitle file which is weird..i then tried box4 and the outcome is exactly the same..im stumped
    Quote Quote  
  12. Does your playback device/software have a subtitle size setting?
    Quote Quote  
  13. ok after a few attempts box4 doesnt work 100%..it adds my chapters as a subtitle stream which is weird also there isnt enough control over audio properties etc..so im gonna scrap that one...so moving onto to command lines, this confuses the hell out of me even where to start...i basically want an mkv to mp4 with passthrough video, dts to aac audio but i also want the audio to be maximised as it loses volume under the conversion process..i also want to keep all available subs and chapters..if this is possible id like to know how...thanks
    Quote Quote  
  14. Originally Posted by rumblylwc View Post
    it adds my chapters as a subtitle stream which is weird
    There are different ways to store chapters in mp4. I think BOX4/ffmpeg use two ways to make sure they are compatible with every player.

    Originally Posted by rumblylwc View Post
    also there isnt enough control over audio properties etc..so im gonna scrap that one...so moving onto to command lines, this confuses the hell out of me even where to start...
    Start with the examples I gave?

    Originally Posted by rumblylwc View Post
    i basically want an mkv to mp4 with passthrough video, dts to aac audio but i also want the audio to be maximised as it loses volume under the conversion process..i also want to keep all available subs and chapters.
    BOX4 can do all of that.
    Quote Quote  
  15. just trying the command line to see how that works
    Last edited by rumblylwc; 22nd Apr 2017 at 19:46.
    Quote Quote  
  16. Member
    Join Date
    May 2003
    Location
    Oz
    Search Comp PM
    Ancient thread resurrection, but here's how I do it:

    Open mp4 in Avidemux. Edit video losslessly as necessary in there cutting off extraneous video pre+post, resave then reload in Avidemux. Use the time markers displayed in Avidemux to create a list of chapters at your chosen time points in MKVToolNix GUI (which has an excellent tool for doing this). You edit the names of the chapters too in here if you wish, or just leave blank or have generic names like Chapter 1, Chapter 2 etc. whatever you prefer. Leave MKVToolNix GUI open.

    Now insert the mp4 into the open session of MKVToolNix with the chapters you've created in it. You're going to create an MKV, but this is just a temporary step in order to get back to MP4+chapters again. Mux the mp4 into an mkv and save the chapters you created into the mkv after the muxxing has finished. Now you have an mkv version of the original mp4 with working chapters and no lossy re-encoding required. The cut editing by Avidemux is lossless and the remux conversion to mkv is also lossless.

    Now to get back to mp4 again with the mkv chapters intact, you need to losslessly remux again using XMedia Recode. There is a built-in preset called mp4 (stream copy). Use that as it involves no re-encoding at all. It just copies the video and audio streams as they are and remuxes back to mp4 container format. Importantly it also copies already present chapter markers as well and includes them in the resulting mp4.

    At the end you will have a working mp4 with chapter markers you created and no quality loss at all from the original mp4 without chapters you started with.

    Source mp4 -> edit in Avidemux -> first edited mp4 -> Avidemux again to get time stamps for new chapters -> Create chapters in MKVToolNix -> MKVToolNix to create MKV -> New mkv file with chapters -> XMedia Recode remux -> end result mp4 with chapters -> Celebrate, you're done!
    Quote Quote  
  17. Member
    Join Date
    May 2003
    Location
    Oz
    Search Comp PM
    Originally Posted by sneaker View Post
    BOX4 can do all of that.
    BOX4 appears to not deal with chapters at all. I can find no settings inside BOX4 to tell it how to deal with chapters. In testing, if you feed it an MP4 with chapters embedded, it will strip them out in the remux it does. I can't see that BOX4 will help in any way with adding chapters. It's pretty good for getting rid of chapters though if that's what you want to do.
    Quote Quote  



Similar Threads