Search This Blog

2016/05/08

Debian---Mkv to mp4/avi video conversion

    Today I come across a .mkv file which if played on some video player only video was working but no audio but  in others  only audio was working but not video.
    I decided to see if I can convert between .mkv to .mp4 or some other video format which can play both audio & video simultaneously.

With by debian 8 machine console & Internet  quest started

First conversion from mkv to avi

apt-get install libav-tools
avconv -i myfile.mkv -codec copy myfile.mp4

.mp4 file generated was still had problem

Conversion from mkv to avi

ffmpeg -i myfile.mkv -c:v copy -c:a copy myfile.avi

.avi file generated was still had problem

after some failed attempt finally I managed to get a avi file in which i can play both audio video simultaneously.

here is the command

ffmpeg -i video.mkv -bsf:v h264_mp4toannexb -c:v copy  -c:a libmp3lame -b:a 128k video.avi

No comments:

Post a Comment