Feature Request: Save as MKV

Discussion in 'AnyStream' started by muffintastic, Feb 15, 2021.

  1. muffintastic

    muffintastic Member

    What are the chances of having an option to save as an MKV without using 3rd party conversion tools, and keeping the same quality as the source downloaded.
     
    DannyBoi likes this.
  2. Ch3vr0n

    Ch3vr0n Translator NL

  3. 0x0x0x0x0

    0x0x0x0x0 Well-Known Member

    mkvtoolnix doesn't change the quality at all, what's the problem with using that?
     
  4. DannyBoi

    DannyBoi Well-Known Member

    Better to use mkvtoolnix anyways
     
  5. SystemIdleProcess

    SystemIdleProcess Active Member

    If subtitles embedded:
    ffmpeg -i <input.mp4> -c:v copy -map 0:v -c:a copy -map 0:a -c:s copy -map 0:s -f matroska <output.mkv>
    If no subtitles or subtitles not embedded:
    ffmpeg -i <input.mp4> -c:v copy -map 0:v -c:a copy -map 0:a -f matroska <output.mkv>
     
  6. 0x0x0x0x0

    0x0x0x0x0 Well-Known Member


    You shouldn't need to be that verbose

    Code:
    ... -c copy -map 0 ...
    
    should suffice, and -f ... should be guessed from the output filename ;)
     
  7. SystemIdleProcess

    SystemIdleProcess Active Member

    Nice, I'm still pretty new to using ffmpeg.
     
    whatever_gong82 likes this.
  8. 0x0x0x0x0

    0x0x0x0x0 Well-Known Member

    You're doing better than most: tons of people who've been using ffmpeg for ages don't know that they could pick out video/audio/subs streams with :v :a :s respectively, here's another trick for you: if you want to select specific audio or subtitle stream you can suffix its index after the :a or :s, like 0:a:0 will pick the first audio stream and 0:a:1 will pick the second, and so on...
     
    whatever_gong82 likes this.
  9. SAF

    SAF Well-Known Member

    This might be a little off topic.. Sorry.. Can MKVToolNix be also used to cut a pre-defined beginning or ending off a video/ audio and subtitles while batch converting files to MKV? If so, where can I find the settings/ variables within MKVToolNix? Sorry..Still learning. Thanks
     
    whatever_gong82 likes this.
  10. 0x0x0x0x0

    0x0x0x0x0 Well-Known Member

    yes, output->splitting ;)
     
  11. walstib

    walstib Well-Known Member

    Main issue with MkvToolNix is the lack of subtitle support when converting MP4->MKV container. Other than that it’s an excellent tool, and frequently updated (if someone knows how to retain the subs without having to extract/add them back in, please share). And of course cmdline ffmpeg always for the win!

    I’m good with MP4 as it’s more ubiquitous than even MKV. But in general, I always rip to MKV when I want a container format.
     
  12. SAF

    SAF Well-Known Member

    Got it, 0x0x0x0x0! Thanks :bowdown:
     
  13. DrXenos

    DrXenos Well-Known Member

    There is no other way than to extract them first. Boris doesn't want to support MP4 Timed Text.
     
  14. Ch3vr0n

    Ch3vr0n Translator NL

    You can always do what i do. Tell anystream you want your subs in .srt, combined with the seperate .mp4 file its a piece of cake combining that into an mkv with a selectable subtitle track if you want an mkv.
     
    Carboniferous likes this.
  15. DrXenos

    DrXenos Well-Known Member

    I just script it.
     
  16. 0x0x0x0x0

    0x0x0x0x0 Well-Known Member

    I find that mp4 is way more portable