For working with videos, it is advisable to use mencoder o ffmeg, but ... what are these?
mencoder is a free video encoder released under the GPL license that is included in the MPlayer media player while Ffmpeg is a collection of software that allows you to record and convert videos and audio.
what we can do with them?
To answer this second question, I bring you some "tricks" and I leave it up to you to judge whether or not you deserve a place on our computer.
1- Extract the audio track from a video:
mplayer -vo null -hardframedrop -ao pcm:file=audio.wav video.avi
Data:
video.avi: video to which we want to extract the audio.
audio.wav: name of the file generated with the audio.
2- Rotate a video:
mencoder -vop rotate=2 -oac pcm -ovc lavc ./normal.avi -o ./rotada.avi
Data:
rotate = <0-7>: Rotate and flip (optional) the image +/- 90 degrees. For parameters between 4-7 the rotation is done only if the geometry of the film is vertical and not horizontal.
normal.avi: video to which we want to rotate.
rotated.avi: name of the generated video with the specified rotation.
3- See a video from JPG images:
mplayer "mf://*.jpg" -mf fps=15
Create the video:
mencoder "mf://*.jpg" -mf fps=15 -ovc lavc -o ./dest.avi
Data:
mf: //*.jpg: take all images with this extension, we can also use it with PNG: mf: //*.png
fps: Sets the transition speed between images.
dest.avi: name of the generated video.
4- Mix a video and an audio:
ffmpeg -i sonido.wav -i video.avi videoconaudio.avi
Data:
sound.wav: sound file.
video.avi: video file.
videoconaudio.avi: name of the video file with the specified audio.
5- Convert an avi to gif.
ffmpeg -i video.avi -pix_fmt rgb24 gif_generado.gif
Data:
video.avi: video that we want to transform into a GIF.
gif_generated.gif: name of the file obtained from the video.
rgb24: we specify the colors.
Here it would be interesting to know how to change the framerate of an audio (DTS or AC3) from 25 fps to 23.976 fps and vice versa. For videos / audios together you know… .. but… what if we only have the audio? And we avoid recoding the entire video. In Windows there are tools such as ac3to or besweet specialized in that… that in Linux you have to try to run on wine…. a tin.
Greetings.
I'll look to see if I can find something, but I don't know ... I don't think it's that difficult, right? Anyway, if I find something, I'll leave it here 😀
Very good! I knew about some of them, but not putting together the jpg files. I'll get to try it! Thank you
And don't you think it's easier to use programs with a graphical interface like Handbrake?