Rotating an MP4 - Any Ideas?
Page 1 of 1
headshot
VIP Member



Posts: 35338
Location: UK
PostPosted: Tue, 11th Aug 2009 16:12    Post subject: Rotating an MP4 - Any Ideas?
Ive taken some videos on my N95 mobile phone and they are in MP4 format which works fine when I play them on PS3. Unfortunately most of the videos are sideways on and need to be rotated. After scouring the internet, Ive tried several apps and the only one Ive had any success with was Avidemux. With this, I am able to load the MP4 and rotate it but in order for it save you have to set the video and audio settings. I set the video to MPEG-4 ASP (Xvid) and left the audio as 'Copy', applied the video filter to rotate the video and saved the result as MP4. It plays back fine on the PC but the PS3 wont play it.

Has anyone used this program or know anything about rotating video for playback on the PS3?

Im at a loss with this! Sad


May the NFOrce be with you always.
Back to top
LeoNatan
☢ NFOHump Despot ☢



Posts: 73194
Location: Ramat Gan, Israel 🇮🇱
PostPosted: Tue, 11th Aug 2009 20:22    Post subject:
I'd use an Avisynth script like:
Code:
DirectShowSource("...")
RotateLeft()


And then encode the video with MeGUI and finally (within MeGUI) mux the old audio and the new video. Avisynth is a very powerful tool, which I like to use a lot. Smile
Back to top
headshot
VIP Member



Posts: 35338
Location: UK
PostPosted: Wed, 12th Aug 2009 23:47    Post subject:
Any chance you could simplify that with step by steps?

I got Avisynth but double clicking the executable does nothing whatsoever! It doesnt even load anything, unless Ive downloaded a virus lol


May the NFOrce be with you always.
Back to top
bushwacka




Posts: 2990
Location: Vienna
PostPosted: Thu, 13th Aug 2009 00:04    Post subject:
headshot wrote:
I got Avisynth but double clicking the executable does nothing whatsoever! It doesnt even load anything, unless Ive downloaded a virus lol


avisynth doesn't have a frontend - double-clicking it does nothing, you either run it from the cmd line with parameters or get one the frontends like avisynth front, gknot, avstool (they do their job, but iirc none of them offer the full feature range)
Back to top
LeoNatan
☢ NFOHump Despot ☢



Posts: 73194
Location: Ramat Gan, Israel 🇮🇱
PostPosted: Thu, 13th Aug 2009 00:08    Post subject:
Haha, well I will try to do it as simple as possible. Smile

First, Avisynth is a frame server, not an editing/encoding/etc application. This means that you provide a script (in an .AVS file), and it will transform it online to audio and video (i.e. serve frames, ergo frame server). You tell it how to serve the frames by providing it with a script, in which you put function calls. For instance, in the example above, I opened a file using DirectShow and told Avisynth to rotate the video left (90 degrees). There are plethora of functions available built-in in Avisynth, as well as huge amounts of plug-ins for all aspects of video and audio manipulation (very few examples: sharpening, extracting data, audio manipulation, etc).

MeGUI is a GUI program that uses external tools for encoding (like Xvid, x264, Nero AAC, etc.). It also manages its external tools by itself, so it will download whatever you need. What is most important, is it is built to encode Avisynth scripts.

Lets first test if you have installed Avisynth properly. Smile Go to the directory of some media file (for instance, the files you are unhappy with), and make the following script (create a new text file and change its extension to AVS):

Code:
DirectShowSource("...")

Inside the function you provide the name of the media file you want to open. Now just open this AVS file with Media Player Classic, WMP, KMP or whatever media player you use. It should play the file. What is happening behind the scenes is, Avisynth is opening the media file with directshow (Windows' codecs) and serving the frames to the media player. If all works well, it means you have Avisynth installed and working.

Now, you said you wanted to rotate the videos. Avisynth provides you with functions to rotate your videos left and right by 90 degrees.

After installing MeGUI and updating its tools (it should do all that automatically on first run), you will see place to input the video AVS and audio AVS (in our case, the single AVS will provide both audio and video, so input the same script in both fields), as well as what preset to use for encoding both audio and video. The PS3 has support for h264, so you could use x264 for encoding, or of course, you can use Xvid. For audio, you can use AAC or MP3, but AAC is more efficient. Then, you can click "Auto Encode" to bring up settings on how large you want your file to be. You should decide that based on the resolution and length of your videos. You can also select which container you want (for the PS3 you want MP4). Then when you click "Schedule", it will create for jobs in the batch tab. Click start, and it will do its magic and create your fixed videos. Smile
Back to top
headshot
VIP Member



Posts: 35338
Location: UK
PostPosted: Thu, 13th Aug 2009 07:54    Post subject:
lol you call that simple?

I appreciate the explanation of the two apps and it is making more sense but I wouldnt say it was any simpler!

Ok this is what I did.

I created a new text document and renamed the extension to .avs as you instructed. Then I opened it in VLC player and it did nothing which Im pretty sure is normal. I mean playing an empty text file in a media player isnt going to much really, is it? What Im failing to grasp is the bit between creating the text file and playing the avs in the media player. I dont understand the directshowsource code or how to apply it.

Does it sound like I might not have Avisynth installed properly then?

Confused


May the NFOrce be with you always.
Back to top
ToCS




Posts: 433
Location: -USA-
PostPosted: Thu, 13th Aug 2009 08:41    Post subject:
figure out if it needs to go left or right and put this inside your .avs

Quote:
DirectShowSource("C:\your video directory\your.video.mp4")
TurnLeft

or
Quote:
DirectShowSource("C:\your video directory\your.video.mp4")
TurnRight


now feed the .avs to your media player and it should work.
Back to top
LeoNatan
☢ NFOHump Despot ☢



Posts: 73194
Location: Ramat Gan, Israel 🇮🇱
PostPosted: Thu, 13th Aug 2009 13:21    Post subject:
headshot wrote:
I created a new text document and renamed the extension to .avs as you instructed. Then I opened it in VLC player and it did nothing which Im pretty sure is normal. I mean playing an empty text file in a media player isnt going to much really, is it? What Im failing to grasp is the bit between creating the text file and playing the avs in the media player. I dont understand the directshowsource code or how to apply it.

Does it sound like I might not have Avisynth installed properly then?

Confused

Empty AVS file will not work, of course. Razz Like I said above, you need to put "DirectShowSource("<<<path to video file here>>>")" in it.
Back to top
headshot
VIP Member



Posts: 35338
Location: UK
PostPosted: Fri, 14th Aug 2009 22:59    Post subject:
Ok this is slowly making sense to me lol.

However ...

Its still not working.

Here is what I have. This is my folder structure.

New Text Document.avs
07052009021.mp4
07052009022.mp4
09042009014.mp4
20032009013.mp4
20052009024.mp4
20052009025.mp4
20052009026.mp4
20052009027.mp4
21072009030.mp4
21072009032.mp4
21122008007.mp4
26052009028.mp4
27022009011.mp4
27042009020.mp4

In the text file which has been renamed to .avs I have this ...

DirectShowSource("C:\Users\Danny\Desktop\Phone Videos\Yes\07052009021.mp4")
TurnRight

Opening the avs with my VLC media player does nothing.

All the above mp4 files I would like to rotate to the right by 90 degrees, so ideally it needs to be a batch process if possible.


May the NFOrce be with you always.
Back to top
LeoNatan
☢ NFOHump Despot ☢



Posts: 73194
Location: Ramat Gan, Israel 🇮🇱
PostPosted: Fri, 14th Aug 2009 23:26    Post subject:
I'm not sure VLC can parse AVS documents. Try using MPC. Also, I think it should be
Code:
TurnRight()
as it is a function. Smile
Back to top
Horrordee
Soderator



Posts: 8866
Location: England
PostPosted: Sat, 15th Aug 2009 00:06    Post subject:
Im shocked there is no video editing sw that can do this for you mega easy...!


Space for rent. Contact me for rates!
Back to top
LeoNatan
☢ NFOHump Despot ☢



Posts: 73194
Location: Ramat Gan, Israel 🇮🇱
PostPosted: Sat, 15th Aug 2009 00:11    Post subject:
Confused It is mega easy once you know how to do it.
Back to top
Spiderman
Banned



Posts: 5877

PostPosted: Sat, 15th Aug 2009 00:30    Post subject:
http://www.mplayerhq.hu/design7/news.html

the #1 PLAYER OUT THERE ... right click>video>turn 90 left
Back to top
LeoNatan
☢ NFOHump Despot ☢



Posts: 73194
Location: Ramat Gan, Israel 🇮🇱
PostPosted: Sat, 15th Aug 2009 00:39    Post subject:
now read the first post Facepalm Laughing
Back to top
Spiderman
Banned



Posts: 5877

PostPosted: Sat, 15th Aug 2009 01:24    Post subject:
ps3 sucks ass SO ... if he really wants it then he should install Linux OS on PS3 and Mplayer or a Snes/Nes/amiga emu and have better fun like i have ... on this failed platform

everybody knows that the default crap that PS3 has to output movies is shiat


Last edited by Spiderman on Sat, 15th Aug 2009 01:28; edited 1 time in total
Back to top
LeoNatan
☢ NFOHump Despot ☢



Posts: 73194
Location: Ramat Gan, Israel 🇮🇱
PostPosted: Sat, 15th Aug 2009 01:27    Post subject:
yes, much less complicated Laughing
Back to top
Spiderman
Banned



Posts: 5877

PostPosted: Sat, 15th Aug 2009 01:30    Post subject:


and part2


installing linux explained HOW in 10 min (part 2 link)
there are even links to install winxp on PS3

PS. and i have the same boot screen here


same NAME so yeah well finally so use for this dust catcher.... to bad the PS3 Linux HDD limitation is only 10 gig Sad
Back to top
headshot
VIP Member



Posts: 35338
Location: UK
PostPosted: Sat, 15th Aug 2009 08:12    Post subject:
iNatan wrote:
I'm not sure VLC can parse AVS documents. Try using MPC. Also, I think it should be
Code:
TurnRight()
as it is a function. Smile


I added the correct function but still nothing. I also tried opening the avs with Windows Media Player but it causes an error and WMP crashes lol. What is MPC?


May the NFOrce be with you always.
Back to top
LeoNatan
☢ NFOHump Despot ☢



Posts: 73194
Location: Ramat Gan, Israel 🇮🇱
PostPosted: Sat, 15th Aug 2009 14:15    Post subject:
Media Player Classic

It can usually be installed from within the Avisynth installation (this is what they recommend). Smile
Back to top
nightmark




Posts: 4

PostPosted: Mon, 17th Aug 2009 15:49    Post subject:
iNatan wrote:
I'd use an Avisynth script like:
Code:
DirectShowSource("...")
RotateLeft()


And then encode the video with MeGUI and finally (within MeGUI) mux the old audio and the new video. Avisynth is a very powerful tool, which I like to use a lot. Smile


The only success I have had doing the same thing myself from mobile phone videos is using Xilisoft 3gp converter to convert the mp4 to WMV the load the new WMV file into windows movie maker, you can the use the video otions to rotate the screen and save the finished result as mpeg. Hope this helps. Not particularly split second process but should only take a few minutes.
Back to top
LeoNatan
☢ NFOHump Despot ☢



Posts: 73194
Location: Ramat Gan, Israel 🇮🇱
PostPosted: Mon, 17th Aug 2009 20:53    Post subject:
Reencoding worsens quality each time you do it, so no point in going from MP4 (guessing it's MPEG4 ASP) to WMV to MPEG4. Just a waste of time and quality. Smile

Also, one-click tools are usually not recommended because you never have as much control over the encoding process and they use crappy encoders. Smile
Back to top
headshot
VIP Member



Posts: 35338
Location: UK
PostPosted: Fri, 21st Aug 2009 08:57    Post subject:
iNatan wrote:
Media Player Classic

It can usually be installed from within the Avisynth installation (this is what they recommend). Smile


How do I go about installing Windows Media Classic from within the Avisynth installation? I couldnt even find Windows Media Classic on Vista. Im pretty sure I used to have it on XP though.

Someone else recommend Windows Movie Maker but I cannot even run that as I have sucky on board video. My video card died a while back and I get an error when I try to start Windows Movie Maker, due to the lack of hardware acceleration. Sad


May the NFOrce be with you always.
Back to top
LeoNatan
☢ NFOHump Despot ☢



Posts: 73194
Location: Ramat Gan, Israel 🇮🇱
PostPosted: Fri, 21st Aug 2009 10:48    Post subject:
Nah, forget about WM Maker, that one will create WMV files which are good for 360 but the PS3 can't read them natively.

Install Avisynth from here:
http://sourceforge.net/projects/avisynth2/files/AviSynth%202.5/AviSynth%202.5.8/Avisynth_258.exe/download

Media Player Classic from here:
http://www.free-codecs.com/download/Media_Player_Classic.htm

I just installed Avisynth, made an the AVS file:

Code:
DirectShowSource("The.Dark.Knight.2008.1080p.BluRay.DTS.x264-ESiR.mkv")


Extracted MPC, dragged the AVS file in it, and it works. Smile

Of course, for the DirectShowSource function to work properly, you need codecs for your videos, like ffdshow, but you probably have that already. Smile
Back to top
Page 1 of 1 All times are GMT + 1 Hour
NFOHump.com Forum Index - Encoders Heaven
Signature/Avatar nuking: none (can be changed in your profile)  


Display posts from previous:   

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2.0.8 © 2001, 2002 phpBB Group