Rotate a video (AVI) with Linux
Geschrieben von skaldrom am 6. May 2009 / 
Today, every camera is, every mobile is and soon every stapler will be able to record videos. Depending if your friends are rather large than tall, the recordings may have the wrong orientation after download. Fortunately there is mencoder, and with its help, it is easily possible to straighten the movies.
Rotating videos
Unfortunately, recoding the video is mandatory because -ovc copy leaves the rotation untouched.
With lavc encoding, files are rather small:
x264 provides better image-quality, but the files are larger:
The Parameter rotate has the following meaning:
| 0 | Rotate by 90 degrees clockwise and flip (default). |
|---|---|
| 1 | Rotate by 90 degrees clockwise. |
| 2 | Rotate by 90 degrees counterclockwise. |
| 3 | Rotate by 90 degrees counterclockwise and flip. |
Some more tricks
Saving a (preview-) image:
- -vo
- Can also be jpeg.
- -ss 10
- Take the image after 10 seconds.
Animated GIFs (256 colors only):
- -ss 20
- Start at 20 Seconds (only if the video has an index).
- -endpos 5
- Record 5 seconds (only if the video has an index).
- fps=15
- 15 frames per second instead of the default 5.
For videos without index, mencoder can create one:
A better solution with color adaption is described in blog..
Removing audio (for the drunken party vids
):
Substitute audio:
Extract the sound as mp3:
Rip realmedia Stream:
Realmedia is a real PITA. If you want to save the stream as local file, you need to download the .rm file and search a link starting with rtsp:// inside.
And now you need some patience…
Kurz gelinkt - Klappe die Erste | Wil and me
[...] N97: Bald ist es soweit | Evolution der Cloud: Der Abschied von der Festplatte | Ein Video (AVI) unter linux rotieren | Zeitersparnis für Fotograf | Alles neu macht der Mai: Optimierung des Layouts | Blackberry [...]
Lassen Sie eine Antwort hier...