FFmpeg Tips & Trick
FFmpeg is a complete, cross-platform solution to record, convert and stream audio and video. I personally use it for doing video conversion for my mobile phone and DVD player.
I made some bash scripts that can help us to work with those tasks.
cut-video.sh
How To Use:
Example:
The example told the script to cut video.mp4 starts from the beginning for five minutes. The result will be saved on the same directory with the “cut-“ prefix.
mp4-mobile.sh
How To Use:
Example:
The example told the script to convert video from whatever.flv (or any other FFmpeg supported format) to resultvideo.mp4 (MP4 Format).
I use this script to convert any video for my Samsung GALAXY Spica (Android) Video Player and may change the script parameter as you wish i.e. changing to higher resolution, aspect or video, and audio quality. But make sure your player is capable to play it!
As you notice, I use experimental (free) AAC audio encoder (considering that libfaac is not free anymore) so that’s why we have to use -strict experimental option.
mp4-dvd.sh
How To Use:
Example:
The example told the script to convert video from anyvideo.avi (or any other FFmpeg supported format) to dvdvideo.mp4 (MP4 DVD Format/DivX Compatible).
I use this script to convert any video for my LG DVD/MP4/DivX Player (should work with another DVD/MP4/DivX player too). Just burn all converted files in one DVD and play them on your player.
Again, you may change the script parameter as you wish i.e. changing to higher resolution, aspect or video, and audio quality. But don’t change the video and audio codec parameter, also make sure your player is capable to play it!
Don’t forget to make all of those script executable and available on system path and of course you should have fully functional FFmpeg on your system.