Search Discussions:
Advanced Search...
Welcome to Nokia Support Discussions! Here you can share advice and tips with thousands of other Nokia users around the world in English. Many Nokia employees also follow and participate in the discussions, see our guidelines for more information. Everyone can search and read the discussions, but to post your own question or reply to others, simply sign in with your Nokia account. If this is your first time here, you can choose an alias to represent you. And if you don't have a Nokia account yet, please register.
Reply

Rotate video from N95 8G for phone use

Counsellor
Posts: 33

Rotate video from N95 8G for phone use

OK so sometimes I want to make a portrait video but unlike photos which you can control whether they're landscape or portrait by which way you slide the slider open (though accelerometer should really know anyway), with videos it insists on recording landscape!  grrr.

 

So on my PC (currently using win7rc1, was using xp before) I can play the video files fine.  I can run something like aviDemux and select an mp4 format and add a filter to rotate it 90' and I can watch the resulting file ok fine on my PC.  But if I copy it back to the phone it dosen't work  :smileysad:

 

I've tried using SUPER with directshow reencoding and selecting to 'turn right' but I get an error after about 1meg of converting saying "index out of bounds (115)" or something so that fails.

 

I found if I run PCsuite and run nokia video manager I could drag videos there and it would convert them for the phone but has no options to rotate or anything.

 

I also found slight differences in information from gSpot about formats :

 

Videos from the phone show as this :

videos the phone records as this
mp42: MP4 v2 [ISO 14496-14]
- 3gp4: 3GPP Media (.3GP) Release 4
- isom: MP4  Base Media v1 [IS0 14496-12:2003]
Recommended Display Size: 640 x 480


If I select "MPEG-4 ASP (lavc)" in aviDemux it shows this :

isom: MP4  Base Media v1 [IS0 14496-12:2003]
- iso2: MP4 Base Media v2 [ISO 14496-12:2005]
- avc1: MP4 Base w/ AVC ext [ISO 14496-12:2005]
- mp41: MP4 v1 [ISO 14496-1:ch13]
Recommended Display Size: 480 x 640
©nam:Copy of 03042009153 r2.mp4
©ART:Avidemux
©wrt:Avidemux
©too:Lavf51.12.1

 

And the wmv file I converted using nokia video manager shows this :

3gp6: 3GPP Media (.3GP) Release 6 Basic Profile
- isom: MP4  Base Media v1 [IS0 14496-12:2003]
Recommended Display Size: 320 x 240

So now I'm at a total loss!  Why isn't there just a way to take each frame from the MP4 format or whatever's in the N95-recorded MP4 file, rotate it 90/180/270, and then save it all back again?  I guess that does still require reencoding sadly so can't be lossless but it should be near enough lossless, and it should all be made simple to do since so many people have this problem and post stuff about it (and yes I've wasted hours today reading stuff online and trying aviDemux/SUPER etc etc  :smileysad:

Please use plain text.
Mobile Guru
el_loco
Posts: 3,936

Re: Rotate video from N95 8G for phone use

I know it's frustrating. I've wasted more than enough days trying to figure out some of these oddities. Still at a loss with the N97 and H264.

 

Anyways. About the issue here.

 

SUPER with Directshow will not work if MP4 is not visible or playable with Windows Media Player. I know this doesn't help a lot but Directshow implies that you installed a codec into the windows system and the decoding is not done in the applications themselves.

 

To get around this first you would need to convert the MP4 file into a DirectShow codec like WMV or DIVX (.avi) file, then run SUPER again (with Directshow) and apply the watermark, rotate or whatever.  I've used this method, and although it takes a long time and you need to convert the files twice, it works. 

 

I tried installing an MPEG-4 codec and even modifying the registry so that WMP11 is able to find and play MP4  files but still SUPER will not do Directshow encoding with MPEG-4. So I don't know.

 

About other things.

 

You can autorotate movies with the N95 8GB. I don't have the phone but with Firmware 30.xx or later I swear you could set the display to autorotate.

 

As far as I know, even more sophisticated videocameras will  record the video based on how you hold the camera so if you rotate the camera 90 degrees, the image will also be rotated. 


640K Should be enough for everybody
El_Loco Nokia Video Blog
Please use plain text.
Sage
jim64
Posts: 205

Re: Rotate video from N95 8G for phone use

Funnily enough I had a wee play at this earlier, didn't get round to posting. Got out the N95 8GB, captured vid landscape mode, sent to PC, turned right with SUPER/DirectShow, then cropped 32 pixels top and bottom with SUPER to fix stretch (inevitably losing some image). Plays on phone as other vids, ie. correct orientation in portrait, full screen in landscape. Somehow SUPER accepted file OK, dunno if due to K-Lite Codecs Pack on system. N95 8GB is back at rest in it's drawer now.
Please use plain text.
Counsellor
Posts: 33

Re: Rotate video from N95 8G for phone use

Thanks for the thoughts guys  :smileyhappy:

 

Firstly, I'm using win7 rc1, and it has no problems playing the videos from my phone straight off the bat - no codecs to install or anything - no problem.  The gSpot info on the files from the camera suggest they're mp4 containers with 3gpp video streams inside.  So surely SUPER should let me work with directshow using rotate then?  I could install ffdshow or something I guess.

 

As for rotating the phone etc - I don't have autorotate on because I don't want it - I control which way it is with the slider by which way it's slid - and when I take photos the way it's slide (screen orientation) determines which way the picture is taken.  But for videos - it ignores the portrait screen and shoots them landscape anyway - gaaaaaaaah!

 

Blah why isn't there an app that doesn't need to reencode a video to just rotate the images for each frame and change the video output resolution?

 

As far as cropping pixels off the squashed rotated videos - surely if I spin a 640*480 video so it's now 480*640 it should just show fullscreen when it portrait mode and in a portrait shaped box when in landscape mode?  Just like pictures?  :/  This is depressing

Please use plain text.
Mobile Guru
el_loco
Posts: 3,936

Re: Rotate video from N95 8G for phone use

I may be too dumb, but I fail to see what's the use of making a video that's 480x640 (portrait), or why would you want to hold the camera in portrait for video.

 

I mean in still mode the point is to get that extra horizontal resolution in the vertical axis to capture more of the vertical, but in video mode this is not commonly used as then you will have those black bars on the sides (since the screen has a different aspect ration like 4x3 or 16x9.

 

 

But like I said I may be not getting it.


640K Should be enough for everybody
El_Loco Nokia Video Blog
Please use plain text.
Sage
jim64
Posts: 205

Re: Rotate video from N95 8G for phone use

leozack,

Don't think I'm getting it either, I think I understand what you want, but not really sure why. Some info that may or not help regarding previous:

My MP4 source file was captured on phone at usual TV high quality setting, 640x480 MPEG-4, AAC audio. If you double-click on file in SUPER it'll show details. I cropped pic as I thought you'd want to view image fullscreen landscape, as opposed to with black bars. Reason for horizontal stretch in output file when image is turned is to accomodate 4:3 aspect ratio. I suppose you can take the black bar route by using pad function both sides. I've got apps that'll make a directstream copy of files but I'd need to convert source file to AVI first as they don't support MP4 input, not worth it for this.

Hope you find a satisfactory solution.
Please use plain text.
Counsellor
Posts: 33

Re: Rotate video from N95 8G for phone use

OK well there's nothing really to "get".  If you take a picture portrait, it stays portrait - and you view it portrait - usually with borders on each side if you're viewing on a 4:3/16:9 monitor like your PC one or infact the phone when it's in landscape.  But when the phone is in portrait it's 480*640, and that's the resolution you take some photos in, and that's the resolution you RARELY want to take videos in.  It's only when you're videoing something going on that's more vertical than horizontal, like 1 person dancing, or someone stood in front of something tall.

 

Yes it's not common, but it's not more confusing to understand than a portrait picture so I don't get why it's a stumbling block for you guys.

 

Anyways - my confusing regarding spinning is yes you want to rotate it - you might want to rotate a photo too sometimes if it took it the wrong way - but you wouldn't stretch that or pad/clip the edges - so why with video?  Essentially I just want to rote each image for each frame of the video and save it back in the exact same format so I have an (unusual) tall video that plays back on PC but also phone, which is what I can't currently do - get it to play on phone.  I'm still trying stuff but it beggers beleif that there are no tools that are obvious for such a purpose.

Please use plain text.
Ex-employee (retired)
oviwan
Posts: 38

Re: Rotate video from N95 8G for phone use

Yes it's not common, but it's not more confusing to understand than a portrait picture so I don't get why it's a stumbling block for you guys.

 

I guess it's because I never seen video used in that way. TV or movies usually will just tilt the camera 45 degrees or something like that to capture a different perspective and a little bit more of the subject, because it's quite tiresome IMHO to watch something with large black bars on the side for a given time.

 

Maybe I'm just too used to a certain way to watch videos, while portraits have been around for a long while for still images (and paintings ;-). Also I also hate watching portrait pictures in the TV because they are too small compared to landscape pictures.

 

Anyway, I guess it's a feature that is missing, don't know how desireable it is though for the general population...

...who's more foolish?, the fool or the one who follows him?... ovi-wan
Please use plain text.
Counsellor
Posts: 33

Re: Rotate video from N95 8G for phone use

Ok well I didn't want to spark a debate on tv viewing habits or anything  :smileywink:  And I didn't say I was trying to record something going on for "a long time" that was portrait to be watched on landscape with big balck borders.  Remember if it worked right I would be able to hold the phone portrait and watch the video fullscreen portrait with no borders at all.  But in reality most videos on your phone are short.

 

1 example was someone dancing on a DDR game  :smileytongue:  Sure you could video it landscape, and get 25% each side of the screen as pointless stuff with only the middle 50% containing content.  Or you can video ti portrait and get all 100% of someone standing/dancing, which is a portrait size (people are infact portrait not landscape lol).

 

Anyways - all that aside - I'd be happy if anyone just knew how to get video back into the format that plays on the phone cos with aviDemux and SUPER I haven't managed to  :/  Not the same format the phone saves in anyway.  If I have to convert outside of mp4 to reotate it then sobeit but that'd be 1 reencode for that, another to spin it and possibly another to put it back to mp4 unless I can combine the spin with 1 of those 2 format reencodes.  Regardless it's gonna be lossy which sucks  :smileysad:

Please use plain text.
Mobile Guru
el_loco
Posts: 3,936

Re: Rotate video from N95 8G for phone use

Now I'm more confused :smileyvery-happy:

 

Before I get to that. Jim suggested that SUPER works for him, have you tried his method? 

 

I've also rotated video from N95 using SUPER but doing two passes. First I use Mp4cam2avi program which is a shareware that batch converts the container of an Mp4 to AVI great for doing home movies check my post

 

Now I have AVI files of the MP4 files. Now use SUPER (using directshow see step by step) and convert back to MP4 (Mpeg4, AAC audio) and rotating the screen. You may want to truncate (crop) some pixels or add to create a better aspect ratio.

 

 Now...

 

I still don't get it. If you are watching the video in the phone why do you want to rotate it?, can't it be played correctly?  or do you want to rotate it so you can play it in a PC or TV?


640K Should be enough for everybody
El_Loco Nokia Video Blog
Please use plain text.
Sage
jim64
Posts: 205

Re: Rotate video from N95 8G for phone use

I know how to view vids in portrait orientation as requested (if I understand correctly), without any 3rd party processes required. Buy a Nokia N97 :smileytongue:. Both vids below captured with phones in portrait orientation, as you can see the N97 plays back as recorded which will be due to S60 v5  touchscreen interface and software. Just trying to show it's N95's S60 v3 software/interface that does not allow full screen playback in this manner. Your only options are those mentioned by el loco and myself.

 

Here's screenshot of vid on N95, ScreenSnap on N97 won't capture video still, so had to take pic. Also a screenshot of SUPER settings for N95 since you asked Anyways - all that aside - I'd be happy if anyone just knew how to get video back into the format that plays on the phone cos with aviDemux and SUPER I haven't managed to  :/ 

Please use plain text.
Counsellor
Posts: 33

Re: Rotate video from N95 8G for phone use

Thanks for the info.  On my phone yes - I can just hold the phone portrait while the landscape video is playing.  I guess I only need to spin it for playing off the phone - which does change things.  But it'd be nice if the spun video (correct way up) was also on the phone just so I dno't hae multiple versions  ;P

 

The N97 looks nice etc but I'm really not into touchscreen phones, and typing with them etc, and slideout keypads seem to flimsy since the N95  :/  I just love the n95, and it's "slide this way for portrait, this way for landscape" functionality.

 

As for the SUPER settings - the settings on the video the phone took were 640*480 not 320*240, and they were about 29-30fps not 25fps, and had mono channel audio not stereo.  Are you sure I should be converting them to 320*480/25fps/stereo?  O_o

Please use plain text.
Sage
jim64
Posts: 205

Re: Rotate video from N95 8G for phone use

[ Edited ]

:smileyvery-happy: I wasn't trying to **bleep** (see P.S. below) the N97, just using as example. My last phone was N95 8GB and I still think it's fantastic.

The SUPER settings I posted were general settings for conversion of input files to compatible format for playback with N95 8GB.

Container: MP4
Codec: MPEG-4
Audio Codec: AAC LC
Video Resolution: 320x240
Aspect ratio: 4:3
Frame Rate: 25 fps
Video Bitrate: 1200 kbps
Options: high quality, 48k audio & stretch
Audio: 48000 Hz sample
Channels: 2
Audio Bitrate: 96 Kbps

This is general guide with safe parameters, can be tweaked to suit.

The screen res is 320x240, so any higher res up to 640x480 will only play at screen res anyway. The larger file size takes up more space in mass mem, and you'd be pushed to notice any difference in quality. The higher the res/bitrate/framerate the larger the file, and for phone use (for me anyway) it's a compromise between best quality and reasonable file size.

If you also want to use the converted file for playback on other devices, eg. PC/TV-out, then use the original 640x480. 25fps is reasonable setting for phone, use 30fps if you wish. 2 channel was general setting as mentioned, most source files such as TV/movies use this. So, yep, change to 1 channel if required for your vid, think even set as 2 channels it just plays as 1 anyway.

If you want to quickly find details of vids (codecs, bitrates, etc) there's a small app called MediaInfo. Once installed just right-click file and select MediaInfo option. http://mediainfo.sourceforge.net/en

 

P.S. I've just noticed previewing this that the over-zealous site censor software has stomped on my first line above.The offending word bleeped is "pimple" minus the last 2 letters. :smileywink:

Message Edited by jim64 on 14-Aug-2009 05:16 PM
Please use plain text.