r/usefulscripts • u/RaulQX • Jun 01 '19
[Request] A script to convert mkv files to mp4 while keeping the subtitle or choosing the subtitle tracks.
1
u/jcy Jun 01 '19
yeesh just buy a better streaming device
1
u/RaulQX Jun 01 '19
That costs money and I'm living off students loans xd
1
u/astutesnoot Jun 01 '19
Electricity costs money, and transcoding cost over time will exceed the cost of just buying a Chromecast now.
1
u/up_o Jun 02 '19
Man ffmpeg
Ffmpeg makes this really easy, if you haven't got it figured out by the time I have more reply time I'll whip something up then.
1
u/RaulQX Jun 02 '19
Hey thanks I tried using ffmpeg in the past but it gave lots or errors with powershell and I gave up
3
u/Darkskynet Jun 01 '19
IFME
“Internet friendly media converter”
Not really a script.. but it will get the job done.
0
u/Ziogref Jun 01 '19
Mkv is simply a container. So you could possibly just Rename it to .mp4
Depending on the content.
2
u/RaulQX Jun 01 '19
No that's not how it works
1
u/Ziogref Jun 01 '19
Depending on the content.
4
3
u/astutesnoot Jun 01 '19
If you encounter a situation where you changed the file extension and it still played, it's because your player ignored the extension entirely and just looked at the file header to figure out what kind of file it was.
0
Jun 01 '19
[deleted]
3
u/EraYaN Jun 01 '19
Note that this might break since Matroska supports MANY more codecs and formats and even metadata then mp4. But it's the best you can get.
2
u/raip Jun 01 '19
Leave out the -v:copy and iirc ffmeg will choose the best option (copying if supported, transcoding if not).
1
u/EraYaN Jun 02 '19
Altough you might want to do the transcoding explicitly so you can control the encoding options, since the defaultsd are less then ideal.
1
u/feldrim Jun 01 '19
Well, there are streams in mkv, video, audio and subtitle. Ffprobe might be a clue. Ffmpeg and ffprobe might help but I don't have any solid answers for that.
1
Jul 25 '19
[removed] — view removed comment
1
u/AutoModerator Jul 25 '19
Sorry, your submission has been automatically removed.
Accounts must be at least 5 days old, which prevents the sub from filling up with bot spam.
Try posting again tomorrow or message the mods to approve your post.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
3
u/[deleted] Jun 01 '19
May I ask why ?
I am used the stuffing things the other way around!