Technical Forum

  Command Line Conversions      Mounting Formats & ISO Creation      Python & Programming Tricks  






         * Linux Command Line Conversions *


MKV to MP4 or MKV with aac support.

$ mkvextract tracks filename.mkv 0:filename.h264 1:filename.ogg

$ ffmpeg -i filename.ogg -vn -f wav filename.wav
$ faac --mpeg-vers 4 filename.wav
$ MP4Box -new filename.mp4 -fps nn.nnn -add filename.h264 -add filename.aac (*)
- or -
$ mkvmerge -o filename2.mkv filename.h264 filename.aac

WEBM to MP4 or MKV with aac support.

$ mkvextract tracks filename.webm 0:filename.ivf 1:filename.ogg

$ ffmpeg -i filename.ivf -an -vcodec libx264 -crf 23 filename.h264
$ ffmpeg -i filename.ogg -vn -f wav filename.wav
$ faac --mpeg-vers 4 filename.wav
$ MP4Box -new filename.mp4 -fps nn.nnn -add filename.h264 -add filename.aac
- or -
$ mkvmerge -o filename.mkv filename.h264 filename.aac

WMV to AVI

$ ffmpeg -i filename.wmv -ar nnnnn -b nnnnn -s nnnnxnnn -vcodec copy filename.avi

ExtractAudio

$ MP4Box -rap -raw 1 filename.mp4

Extract Video

$ MP4Box -rap -raw 2 filename.mp4

Convert OGG to WAV to MP3

$ ffmpeg -i filename.ogg -vn -f wav filename.wav

$ ffmpeg -i filename.wav -vn -acodec mp3 -ar nnnnn -ac 2 filename.mp3

(*) n represents a number discovered by using "ffmpeg -i filename".

             *** Forum ***

   Name: cmtstoolbox      <<>>      Date: 2019-04-28

   Converting wmv to avi or mpg
   $ ffmpeg -i (filename).wmv
   >> Duration: 00:40:09.80, start: 0.000000, bitrate: 1675 kb/s
   >> Stream #0.0: Audio: wmav2, 44100 Hz, 2 channels, s16, 128 kb/s
   >> Stream #0.1: Video: wmv3 (Main), yuv420p, 1280x720, 1500 kb/s, PAR 1:1 DAR 16:9, 29.97 tbr, 1k tbn, 1k tbc
   $ ffmpeg -i (filename).wmv -ar 44100 -b 29970 -s 1280x720 -vcodec copy (filename).avi
   -- or --
   $ ffmpeg -i (filename).wmv -target pal-vcd (filename).mpg

   Name: cmtstoolbox      <<>>      Date: 2019-05-05

   Converting from webm to mp4
   $ ffmpeg -i (filename).webm
   >> Stream #0:0: Video: vp8, yuv420p(tv, smpte170m/smpte170m/bt709, progressive), 474x360, SAR 1:1 DAR 79:60, 23.98 fps, 23.98 tbr, 1k tbn, 1k tbc (default)
   >> Stream #0:1: Audio: vorbis, 44100 Hz, stereo, fltp (default)
   $ mkvextract tracks (filename).webm 0:(filename).ivf 1:(filename).ogg
   $ ffmpeg -i (filename).ivf -an -vcodec libx264 -crf 23 (filename).h264
   $ ffmpeg -i (filename).ogg -vn -f wav (filename).wav
   $ faac --mpeg-vers 4 (filename).wav
   $ MP4Box -new (filename).mp4 -fps 23.980 -add (filename).h264 -add (filename).aac

   Name: cmtstoolbox      <<>>      Date: 2019-05-10

   Copy video and audio streams (-c:av copy) but trim the video. The -t option sets the cut duration to be 10 seconds
   and the -ss option the start position to one minute.
   $ ffmpeg -i input.mkv -c:av copy -ss 00:01:00 -t 10 output.mkv
   Trim the sound.
   $ ffmpeg -i input.wav -vn -f wav -ss 00:01:00 -t 10 output.wav


Back to Main


Back to Multimedia


Webmaster: cmaxtrindade@gmail.com

© cmtstoolbox.net, 2019