maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Multimedia (https://talk.maemo.org/forumdisplay.php?f=32)
-   -   Rotate mp4 video (https://talk.maemo.org/showthread.php?t=56864)

orcocan 2010-06-22 21:55

Rotate mp4 video
 
Hi all,
I was wondering if there's any quick way to rotate videos taken with the N900?
thanks

goodparterbless 2014-10-11 05:29

Re: Rotate mp4 video
 
iDealshare VideoGo is definitely the best choice to rotate MP4 videos.

It can rotate MP4 without re encoding, which make the MP4 rotating progress much faster as well as keep the original video quality.

It also supports rotating MP4 as well as convert to another video format.

With this nice MP4 Rotator, it is just a piece of cake to rotate or flip all MP4 videos 90 degrees, 180 degrees, 270 degrees and more.

It also can rotate AVI, WMV, MOV, MKV, VOB, MPG and etc

juiceme 2014-10-11 11:35

Re: Rotate mp4 video
 
Quote:

Originally Posted by goodparterbless (Post 1442610)
iDealshare VideoGo is definitely the best choice to rotate MP4 videos.

Took a quick look and seems this is available for Mac & Windows only...
I understood that @orcocan wants to rotate the videos using the N900

Android_808 2014-10-11 12:30

Re: Rotate mp4 video
 
maybe using a ffmpeg option?

pichlo 2014-10-11 13:07

Re: Rotate mp4 video
 
Quote:

Originally Posted by juiceme (Post 1442630)
Took a quick look and seems this is available for Mac & Windows only...
I understood that @orcocan wants to rotate the videos using the N900

To be fair, the OP asked how to rotate videos taken with the N900. That could be interpreted in any way, including doing the operation with some online service.

Has no one paid any attention though that the OP asked this four years ago? ;)

endsormeans 2014-10-11 15:35

Re: Rotate mp4 video
 
aHa!
Yes pichlo is right...2010 is a ways back since it was posted.
Good point on implementation.
Also it is pointless if the Op wanted to utilize such a program on the n900 unless someone creates or does some hackery to get this prog to work on n900's it isn't quick and easy then.
A browser based app would prob be better than this.
Kudos and attention must be paid to the generous and selfless member who answered.
Oh....
wait a sec.
why did it take our brand, brand, brand new friend so long to post this answer? new software perhaps?
Um...and why does he post in such an advertising way...especially for his very 1st post?

I think we should give our fab new friend "goodparterbless" a nickname..

"Spammie" ....
oh yeah...Spammie-Spam-Spam-Spammity-Spam
Poorly targeted Spammie.
Spam-spam-spam-spam...

https://www.google.ca/search?q=spam+...HK7P8gfy7IDoCA

:D

nokiabot 2014-10-11 18:11

Re: Rotate mp4 video
 
You are crying like a baby :D

Android_808 2014-10-11 19:04

Re: Rotate mp4 video
 
I must confess, I didn't read the original post, just the title and whatever post was visible when loaded on n900 earlier. endsormeans may have a point, could have been used to advertise a product. I'm gonna have a guess that most of us have ffmpeg on our device from using other packages (cutetube for example).

ffmpeg -i input.mp4 -c copy -metadata:s:v:0 rotate=90 output.mp4

should be all that needed. No transcoding, just copy tracks into new file and add rotation via metadata. Whether it would be played back correctly on our device I can't be bothered to test at the moment. :)

endsormeans 2014-10-11 19:11

Re: Rotate mp4 video
 
Yeah it looks too much like the spam in the n800 and n810 subforums by "new members" that 1st post this kind of crap. Who...and what kind of person in their very 1st post in a forum is going to hit everyone with an ad? Even the sentence structure is way too similar.

You got it right Android...much better alternative.

@nokiabot one word to you buppo - "Waah!" :D

Schturman 2014-10-11 19:34

Re: Rotate mp4 video
 
Quote:

Originally Posted by Android_808 (Post 1442681)
I must confess, I didn't read the original post, just the title and whatever post was visible when loaded on n900 earlier. endsormeans may have a point, could have been used to advertise a product. I'm gonna have a guess that most of us have ffmpeg on our device from using other packages (cutetube for example).

ffmpeg -i input.mp4 -c copy -metadata:s:v:0 rotate=90 output.mp4

should be all that needed. No transcoding, just copy tracks into new file and add rotation via metadata. Whether it would be played back correctly on our device I can't be bothered to test at the moment. :)

Tested now on my Jolla and it not rotate video with this command... Here is output:
Code:

[nemo@Jolla Templates]$ ffmpeg_static -i /media/sdcard/3F0A-A187/VideoSD/test_rotation.mp4 -c copy -metadata:s:v:0 rotate=90 /media/sdcard/3F0A-A187/VideoSD/test_rotation2.mp4
ffmpeg version 2.1.4-static Copyright (c) 2000-2014 the FFmpeg developers
  built on May 29 2014 14:58:09 with gcc 4.6.4 (Linaro GCC 4.6-2013.05) 20130412 (Mer 4.6.4-1)
  configuration: --prefix=/home/mersdk/share/ffmpeg-static/target --extra-cflags='-I/home/mersdk/share/ffmpeg-static/target/include -static' --extra-ldflags='-L/home/mersdk/share/ffmpeg-static/target/lib -static' --extra-version=static --disable-debug --disable-shared --enable-static --extra-cflags=--static --disable-ffplay --disable-ffserver --disable-doc --enable-gpl --enable-pthreads --enable-postproc --enable-gray --enable-runtime-cpudetect --enable-libfaac --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-bzlib --enable-zlib --enable-nonfree --enable-version3 --enable-libvpx --disable-devices
  libavutil      52. 48.101 / 52. 48.101
  libavcodec    55. 39.101 / 55. 39.101
  libavformat    55. 19.104 / 55. 19.104
  libavdevice    55.  5.100 / 55.  5.100
  libavfilter    3. 90.100 /  3. 90.100
  libswscale      2.  5.101 /  2.  5.101
  libswresample  0. 17.104 /  0. 17.104
  libpostproc    52.  3.100 / 52.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/media/sdcard/3F0A-A187/VideoSD/test_rotation.mp4':
  Metadata:
    major_brand    : qt
    minor_version  : 537199360
    compatible_brands: qt
    creation_time  : 2014-07-24 18:10:30
  Duration: 00:00:34.77, start: 0.000000, bitrate: 7188 kb/s
    Stream #0:0(eng): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p, 1920x1088 [SAR 1:1 DAR 30:17], 7080 kb/s, 16.70 fps, 16.67 tbr, 3k tbn, 60 tbc (default)
    Metadata:
      rotate          : 90
      creation_time  : 2014-07-24 18:10:30
      handler_name    : VideoHandler
    Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 135 kb/s (default)
    Metadata:
      creation_time  : 2014-07-24 18:10:30
      handler_name    : SoundHandler
[mp4 @ 0x2550660] track 1: codec frame size is not set
Output #0, mp4, to '/media/sdcard/3F0A-A187/VideoSD/test_rotation2.mp4':
  Metadata:
    major_brand    : qt
    minor_version  : 537199360
    compatible_brands: qt
    encoder        : Lavf55.19.104
    Stream #0:0(eng): Video: mpeg4 ( [0][0][0] / 0x0020), yuv420p, 1920x1088 [SAR 1:1 DAR 30:17], q=2-31, 7080 kb/s, 16.70 fps, 12k tbn, 3k tbc (default)
    Metadata:
      handler_name    : VideoHandler
      creation_time  : 2014-07-24 18:10:30
      rotate          : 90
    Stream #0:1(eng): Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, stereo, 135 kb/s (default)
    Metadata:
      creation_time  : 2014-07-24 18:10:30
      handler_name    : SoundHandler
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=  578 fps=169 q=-1.0 Lsize=  30512kB time=00:00:34.75 bitrate=7192.5kbits/s
video:29914kB audio:577kB subtitle:0 global headers:0kB muxing overhead 0.069780%
[nemo@Jolla Templates]$

But new created file with a little different file size 30,512 KiB (orig: 30,514 KiB)

EDIT:
Found how to rotate.. But it need to reencode your video and it take too much time :mad:
For example rotate video of 35sec takes ~20min
Used this command:
Code:

ffmpeg_static -i /path/to/input.mp4 -vf "transpose=1" -c:a copy /path/to/output.mp4
For the transpose parameter you can pass:
Code:

0 = 90CounterCLockwise and Vertical Flip (default)
1 = 90Clockwise
2 = 90CounterClockwise
3 = 90Clockwise and Vertical Flip

To get ffmpeg_static, install this package: https://openrepos.net/content/darvari/ffmpegstatic


All times are GMT. The time now is 01:14.

vBulletin® Version 3.8.8