Help: Batch convert from MKV & embed subtitles to MP4
I'm new with Linux commands, please help ...
I have folders that are full with (Mkv) files that got some subtitles inside it, srt or ass .. I need a command that can transfer all files inside this folder from mkv to mp4 (along with hard sub for embed subtitle) so the result will be mp4 in same quality .. same name .. with the subtitle please .. |
you can probably create a script using h264enc.
|
any help please .. ?
creating script using h264enc .. |
I have done similar things with ffmpeg. Often you do it as a one-line using find -exec or you can put it in a script.
|
Quote:
Code:
ffmpeg -i file.mkv -c:a copy -c:v copy file.mp4 Code:
for i in *.mkv; do Hard subs in the video itself? You'll need to specify the sub file and then overlay it onto the video. Example: Overlay dvd_subs onto video (1st vid stream, 2nd audio stream, 2nd sub stream) Code:
ffmpeg -probesize 1000000000 -analyzeduration 100000000 -i movie.vob -filter_complex "[0:0][0:4]overlay[0]" -map [0] -map 0:2 -c:a copy -c:v libx264 -b:v 2500k movie.avi If you will do a search for this on LQ there are lots of questions on this answered. |
All times are GMT -5. The time now is 01:01 PM. |