Page 1 of 3 123 LastLast
Results 1 to 10 of 22

Thread: Turn sideways video upright

  1. #1
    Join Date
    May 2008
    Location
    United Kingdom
    Beans
    4,270
    Distro
    Ubuntu 12.04 Precise Pangolin

    Question Turn sideways video upright

    I made a couple of videos in portrait mode, so they're on their side.

    I thought I'd find it easy to rotate them upright, but despite lots of Googling and experimenting, I still have problems.

    I'm using Avidemux. I've managed to turn the picture upright, but two problems happen:

    1. The picture is jerky, as though a number of frames have been cut out.
    2. Avidemux adds its own subtitle to the front; as the clip is only a few seconds long, it interferes with what's being shown.

    I wonder if someone can tell me how to simply turn the picture upright (90 degrees) without changing the frame rate or quality, and without adding any subtitles?

    My videos were recorded as MP4 (mpeg-4).

    I'd prefer to use a GUI, if possible, but I'll use a command line if necessary.

    My system: Hardy 8.04
    Avidemux version 2.4.1
    Last edited by Paddy Landau; March 2nd, 2010 at 12:20 PM.
    Problems with WINE?
    Full Circle Magazine :: Confused "allot"? :: Cheap Linux stickers
    In my day, we had outdoors in which to run, play, and socialise. Now we have computers to do those.

  2. #2
    Join Date
    Feb 2008
    Beans
    1,145
    Distro
    Xubuntu

    Re: Turn sideways video upright

    Unless you need to reencode, you can just simply play back with mplayer. Add the following option to your command line:

    -vf rotate=1

    Or use rotate=2 if you want counterclockwise.
    Help yourself: Ubuntu Docs - Ubuntu Packages

  3. #3
    Join Date
    May 2008
    Location
    United Kingdom
    Beans
    4,270
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Turn sideways video upright

    Thanks for the suggestion.

    I need to send the videos to a friend (they were from his wedding), so I need to turn them upright.

    I suspect that the defaults on Avidemux are causing the problem, but I'm no expert in video settings, so I don't even know what to look for.
    Problems with WINE?
    Full Circle Magazine :: Confused "allot"? :: Cheap Linux stickers
    In my day, we had outdoors in which to run, play, and socialise. Now we have computers to do those.

  4. #4
    Join Date
    Feb 2008
    Beans
    1,145
    Distro
    Xubuntu

    Re: Turn sideways video upright

    Avidemux has a lot of codecs built in, and because you're using an older version, there's really no telling if it has what you need.

    I think you may need to upgrade to Karmic if you want to try the latest version. The latest Avidemux with all its dependencies will not likely compile on Hardy.
    Help yourself: Ubuntu Docs - Ubuntu Packages

  5. #5
    Join Date
    Mar 2006
    Beans
    Hidden!

    Re: Turn sideways video upright

    Here is a command that will rotate but will also re-encode ( I don't think you are going to get rotation without encoding....
    Code:
    mencoder -vf rotate=1 -o OUTPUT.AVI -oac copy -ovc lavc INPUT.AVI
    That said you could play with quality setting (e.g. make a "bigger" output file to preserve quality)
    Last edited by Jose Catre-Vandis; March 2nd, 2010 at 10:29 PM.
    No longer participating......

  6. #6
    Join Date
    May 2008
    Location
    United Kingdom
    Beans
    4,270
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Turn sideways video upright

    Thanks for the idea. I used your command and got an error message:
    Audio format 0x6134706d is incompatible with '-oac copy', please try '-oac pcm' instead or use '-fafmttag' to override it.

    So I used -oac pcm and it worked...

    But the two files went form 553Kb and 1.8Mb to an astonishing 2.3Mb and 7.4Mb respectively!

    But at least the quality was kept, thank you.

    Why does the file grow more than four times as large just to rotate the picture? Surely it can figure it out better than that?
    Problems with WINE?
    Full Circle Magazine :: Confused "allot"? :: Cheap Linux stickers
    In my day, we had outdoors in which to run, play, and socialise. Now we have computers to do those.

  7. #7
    Join Date
    Feb 2008
    Beans
    1,145
    Distro
    Xubuntu

    Re: Turn sideways video upright

    The size increase is probably from switching audio from AAC to PCM (from around 100 to 200 kbit/s to 1411 kbit/s). PCM really isn't suitable for video. I would reencode into Vorbis, which would keep the quality reasonable and keep the bitrate low.
    Help yourself: Ubuntu Docs - Ubuntu Packages

  8. #8
    Join Date
    May 2008
    Location
    United Kingdom
    Beans
    4,270
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Turn sideways video upright

    Quote Originally Posted by gsmanners View Post
    The size increase is probably from switching audio from AAC to PCM (from around 100 to 200 kbit/s to 1411 kbit/s). PCM really isn't suitable for video. I would reencode into Vorbis, which would keep the quality reasonable and keep the bitrate low.
    Thank you for the explanation. Following on from your logic, I tried again with mp3lame, and this time it merely doubled the size.

    I don't know how to reencode into Vorbis (I know next-to-nothing about videos and codecs and stuff like that).

    Why isn't it possible to just copy the audio, not reencode it?
    Problems with WINE?
    Full Circle Magazine :: Confused "allot"? :: Cheap Linux stickers
    In my day, we had outdoors in which to run, play, and socialise. Now we have computers to do those.

  9. #9
    Join Date
    Feb 2008
    Beans
    1,145
    Distro
    Xubuntu

    Re: Turn sideways video upright

    I think the problem is that there is no "standard" way to copy (or encode for that matter) AAC into an AVI file. If you want that audio track in a proper reencode, it really should be mp4 (or mkv if you don't need to worry about hardware players).
    Help yourself: Ubuntu Docs - Ubuntu Packages

  10. #10
    Join Date
    May 2008
    Location
    United Kingdom
    Beans
    4,270
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Turn sideways video upright

    Quote Originally Posted by gsmanners View Post
    I think the problem is that there is no "standard" way to copy (or encode for that matter) AAC into an AVI file. If you want that audio track in a proper reencode, it really should be mp4 (or mkv if you don't need to worry about hardware players).
    The input file and the output file are both mp4. I didn't want to convert anything; I simply want to turn the video 90 degrees clockwise. I wish there were an easy way without significantly increasing the size!
    Problems with WINE?
    Full Circle Magazine :: Confused "allot"? :: Cheap Linux stickers
    In my day, we had outdoors in which to run, play, and socialise. Now we have computers to do those.

Page 1 of 3 123 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •