Author Topic: How to (quick and dirty) convert 100+ mkvs to mp4s  (Read 1186 times)

dizzie

  • DEFCON 1
  • Posts: 729
  • Bastard Operator From Hell
    • View Profile
How to (quick and dirty) convert 100+ mkvs to mp4s
« on: October 08, 2013, 12:11:51 AM »
I for one dislike the mkv format very much (the fact that neither my tv or xbox can read/play mvks, made me google)


Code: [Select]
$ sudo apt-get install libav-tools

When done, cd to whereever your mkvs are. Fx.


Code: [Select]
$ cd /stuff/movies

then


Code: [Select]
$ avconv -i input.mkv -codec copy output.mp4

But this is going to take ages if you have many mkv's so...


I asked for help on IRC, and a friend came up with this neat bash magic :


Code: [Select]
$ for file in `ls | grep "\.mkv$"`; do avconv -i "$file" -codec copy "${file%.*}.mp4"; done

When done, do :


Code: [Select]
$ rm *.mkv

You are welcome  8)







Reclaim your culture, it's within your reach!

My Blog | Facebook | Twitter | G+ | VSIDO |


statmonkey

  • Posts: 330
    • View Profile
Re: How to (quick and dirty) convert 100+ mkvs to mp4s
« Reply #1 on: October 08, 2013, 06:15:10 AM »
That is wonderful dizzie.  Thanks for posting. I made some mods and got read of a ton of ape files that I have been meaning to dispose of/convert.  Then I modded again and turned a bunch of worthless pdf's into mobi files. Next ... I can't stop .............

dizzie

  • DEFCON 1
  • Posts: 729
  • Bastard Operator From Hell
    • View Profile
Re: How to (quick and dirty) convert 100+ mkvs to mp4s
« Reply #2 on: October 08, 2013, 06:47:58 AM »
I'm sure you can adapt it to fit any massconvert you need, this isnt just for mkv to mp4, but as an example.... Glad you can pick it up... pdf's are evil :) I prefer .mobi or .epub hehe
Reclaim your culture, it's within your reach!

My Blog | Facebook | Twitter | G+ | VSIDO |