Extract and Convert wmv Files to mp3 Files in Linux

Extract and Convert wmv Files to mp3 Files in Linux


Input at command line:

$ ffmpeg -i file.wmv -vn new.mp3


Notes:
- It actually works for many types of video files as well
- You can remove the -vn option and use it on different kinds of audio files to convert to mp3 files

Merge mp4 Files in Linux

Merge mp4 Files in Linux

One of the best ways to prevent losing quality from concatenating files is to transcode them to mpeg transport streams, using  H.264 video and AAC audio -

$ ffmpeg -i input1.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts new1.ts

$ ffmpeg -i input2.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts new2.ts

then

$ ffmpeg -i "concat:new1.ts|new2.ts" -c copy -bsf:a aac_adtstoasc output.mp4


Notes:
- In this example I use only 2 mp4 files converted to streams and then concatenating them, but you can
put as much as you like that your system can handle