Skip to content

Instantly share code, notes, and snippets.

@lemenkov
Last active July 19, 2021 14:05
Show Gist options
  • Save lemenkov/2947110 to your computer and use it in GitHub Desktop.
Save lemenkov/2947110 to your computer and use it in GitHub Desktop.
How to convert from any video format to mkv with ffmpeg/libav w/o recompressing
# "-fflags +genpts" - add this to regenerate packet timestamps (in case of error "Can't write packet with unknown timestamp")
./ffmpeg -fflags +genpts -i "/media/nfs/Nostromo/video/Japan Sinks (Nihon Chinbotsu) 1973 - WMV/NihonChinbotsu_1973.wmv" -acodec copy -vcodec copy ~/Desktop/NihonChinbotsu_1973.mkv
@sinekonata
Copy link

Yes that flag saved me while I was trying to convert from an .avi to a .mkv
Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment