How to convert avi to mp4 for iPhone with VLC
I had some problems converting my avi (divx) torrents to a mp4 format for my iPhone. Googling for some answers I only came to crapy sites offering me paid software. Because I know it’s not that hard to convert a file I tried some things my self with the free VLC player. Here’s a guide how you convert your downloaded torrents to mp4 (suitable for iPod or iPhone):
1. Download VLC player.
2. Go to the streaming/exporting wizard.
3. Choose transcode/Save to file.
4. Choose your input stream.
5. Put the video codec on “MPEG-4 Video” and choose your bitrate (I recommend 512)
6. Put the audio codec on “MPEG-4 Audio” and choose your bitrate (I recommend 128)
7. Put the encapsulation format on MPEG 4 / MP4
8. Choose the name and location you want to save the file.
9. Click on finish, that’s all!
Now you can put your movies or series in iTunes and sync it with your iPhone. If you want to convert a DVD to your iPhone or any other device I suggest you use Handbrake.
November 11th, 2007 at 11:37 pm
Hi, this is a really good help, although I have encountered a problem while trying to import the movie (now an mp4 file) into iTunes to put it on my iPod. It simply won’t do it. I also attempt to open it in Quicktime, which it should do now in it’s current form, but a notice appears saying ‘the movie contains some invalid data’. Am I doing somthing wrong, or does it jsut now work?
November 15th, 2007 at 3:16 pm
What kind of input do you use? Is it an .avi file or something else? QuickTime should work without giving errors!
November 16th, 2007 at 2:35 am
Same here. Used an Avi file. The output is an mp4 which can be opened by vlc but not by quicktime.
November 16th, 2007 at 9:29 am
Are you using mac or windows? I’ve done several movies now and have no problems…. Maybe you can tell more about the movie file?
November 18th, 2007 at 12:26 am
Hi again. yes, i’m using a mac. The movie is a ‘.avi’ file and opens and can play in VCL. It managed to export correctly, but then if I try to play it, as it should do in Quicktime, an alert appears saying the movie contains invalid data. I’m not sure what this means, perhaps it should be exported differently??
November 24th, 2007 at 6:15 am
Interesting “how to”, I am trying to convert some home movies shot on my Canon digital camera in AVI format into MP4 to display on my iPod and, after having had VLC for years, looked forward to using this method.
But I ran into a snag.
I suspect you need VLC version 0.8.6c of the windows version to perform AVI to MP4 conversions. I attempted the procedure with my VLC 0.8.5 and found the (Step number 7) MP4 option unavailable. I will do a version update and retry and post a follow up comment.
November 24th, 2007 at 6:57 am
VLC 0.8.6c gave me choice of the MP4 option under step 7 but still ultimately failed. It seems you can’t easily nominate an output file name. And if you enter in an output file name it creates a 1 kb empty file.
Presumably this stuff works for other people!
November 26th, 2007 at 9:39 am
thanks. it was a great help. i followed your “how to” step by step and it worked perfectly.
December 3rd, 2007 at 8:10 pm
This seems to half way work. We’re using VLC 0.8.6c and the instructions are simple and it would seem hard to go wrong with these.
However, we don’t seem able to import the file into iTunes. It fails silently.
The other issue is that the transcoded file only seems to be audio dispite having selected the video for encoding also.
The source file we’re using is mp3 and XVID in an avi wrapper.
Anyone else experiencing this?
December 17th, 2007 at 6:06 am
I am converting video clips aka (.avi) and I am using a windows computer. I downloaded the VLC media player and followed all of your directions by clicking file and using the wizard, and using the settings you suggested. But then when I get finished, it just puts the converted file into the folder as a “file” and has no program that runs it and I can not import the file into itunes. Have you had this trouble before? Anything I could be doing wrong? Thanks for your help I really appreciate it.
-Anthony
December 17th, 2007 at 10:41 am
I’m using a mac and just drag-and-drop the files into iTunes. Try the same with windows… maybe it works.
For the file input I simply use the average xvid movies you can download using any torrent client. (tip: for movies search for axxo, always good quality).
I’m using the VLC 0.8.6a player so maybe this is a difference. I don’t know if these last letters are the same for mac and windows. I’ll try to convert a movie on a windows pc later this week.
December 19th, 2007 at 1:40 am
For the having the problem of not being able to open the new mp4 file created, it might be that in step 8 after you name the new file you must put ‘.mp4′ after the name.
example:
Wrong way: videoforiphone
Correct way: videoforiphone.mp4
If you forget to do this the Pc will not reconize the file, but you can simply rename the the file extention with a .mp4 extention. The right click and open with iTunes and you done!
The problem I’m having is sometimes all I get is audio with no picture, can anyone help?
December 19th, 2007 at 10:54 am
I don’t have MP4 for the encapsulation option (step 7) which one should I use then?
December 23rd, 2007 at 2:12 pm
Thanks for this Pieter,
I was having the same problem…I converted the avi file to mp4, then nothing when I tried to move it into itunes. A tweek at step 5 seemed to solve this problem, I selected video codec H 264 (bit rate 256) and then followed the rest as per Pieters way. And now I can import into itunes no problem! Im using PC
December 26th, 2007 at 6:57 am
Same error here! QuickTime says there is invalid data and when trying to import into iTunes nothing happens! I tried WinAVI video converter and also some Chinese conversion program, but those either did a poor job, or did not work at all. I finally found Xilisoft Video Converter on TorrentScan.com and selected the iPod Touch profile, and it worked like a charm! (I used the following bit rates, which resulted in just over a 400MB file for a 2 hour movie… 312 for video and 112 for audio)
December 26th, 2007 at 7:05 am
EDIT to my previous comment… For the 1 video i converted, the audio and video sync was off by 1 second by the end of the video…
December 30th, 2007 at 2:08 am
Great Help thanks so much
January 1st, 2008 at 7:30 pm
Hi, Happy new years people. Well i tried the same thing that was on the instructions and it wont import into itunes. Im using currently 0.8.6c i just up loaded to 0.8.6d and im going to download 0.8.6a to see if that is going to work. If it works ill get back to you. But currently it wont.
January 15th, 2008 at 10:48 pm
main: cannot add a new stream (unsupported while muxing to this format)
stream_out_transcode: cannot add this stream
using 0.8.6d… What is wrong with this?
February 11th, 2008 at 3:57 pm
Great! It has worked !
February 18th, 2008 at 10:59 pm
hey… i just did anything you said and it is working great just that
there is no sound !!! do you know why is it like that ?
hope to hear from u soon
February 18th, 2008 at 11:05 pm
hey
thanks it is working great, just one problem, i do it but i cant hear it, do you know why there is no sound ?
hope to hear from u soon
February 21st, 2008 at 3:11 am
Thanks for the post!
I believe I am having a similar issue as elad: I encoded a video following your instructions, the video will play fine in iTunes, quicktime, and VLC, but once it’s loaded onto my iPhone, the sound disappears. Any suggestions? Thanks again.
February 22nd, 2008 at 4:20 am
This program is working. I was able to convert so far 4 Episodes from a show for my iPhone. A couple showed “the movie contains invalid data” as I was trying to open it with QuickTime player. BUT! If you go VLC -> File -> Open File - and you would choose the file you’ve just created and couldn’t watched IT WILL OPEN and showed by VLC! Also, there would be another window explaining what kind of error a program encountered while converting AVI to MP4, thus proving that it works only with normal files without glitches.
Mine says:
“An error has occurred which probably prevented the proper execution of the program:
main: decoder is leaking pictures, resetting the heap
main: picture 0×2b6af70 refcount is -1
main: decoder is leaking pictures, resetting the heap
main: picture 0×2b6af70 refcount is -1
If you believe that this is a bug, please follow the instraction at
http://www.videolan.org/support/bug-reporting.html
”
So, there are really some king of a problem with a file… but not a program. Because, some players could temporary patch the file while viewing, therefore you think that your file is perfect.
February 22nd, 2008 at 4:29 am
BTW,
check out this site - you may find a lot of answers to your questions:
http://wiki.videolan.org/Common_Problems
February 24th, 2008 at 1:30 am
it worked and yet didnt work.
I followed the instructions step by step, and in the end I did manage to come with an mp4 file, but it only plays for a few seconds of the video instead of the whole movie. I wander if there was something I didnt do or did it wrong.
Am using: VLC 0.8.6d
and the input file is an avi file.
anyone encoutered the same problem? or could someone come up with a solution?
PS: I think this should work, and thx for this good idea, I hope it will work for everyone eventually.
February 28th, 2008 at 4:06 am
Trying this out to change video formats for Zune, i changed an .avi to .mpeg4 but still can’t open it with Zune and Zune is supposed to support .mpeg4. Anyone know anything about this?
March 3rd, 2008 at 7:26 am
yeah that way didnt work for me this is what worked for me
1) File, Open File
2)press browse after you put the movie you want to convert go to stream/save (bottom left) box check that then go to settings to the right of it
3)under Outputs check the file box then name the fold what ever you want with .mp4 after it (if you dont it wont work) ex dashboard.mp4
4) then click MP4 in under Encapsulation Method
5) then click Video codec and Audio codec
6)make the video codec a mp4v and the audio mp4a (the box for changing the type is to the left of them)
7)after that but the bitrate for the audio at 64 and the channel on 1 (other wise you wont get sound out of it)
8)after that press ok, this will take you back to the first window
9)press ok after this it will start to convert it
yeah some times the auto and video dont match up but ive had this problem with all the converting tools ive used so yeah soo i hope it works for you. if it doesnt work out dont give up just try out different junk and youll get it ^^ thats what i did :p
March 5th, 2008 at 3:42 pm
Would anyone be able to help me out, i’m following the guide but i seem to be only getting the audio and no pictures. Any help would be much appreciated
March 13th, 2008 at 10:42 am
One funny thing I got with Handbrake which might carry over here: the default mpeg-4 encoder writes to .m4v, which won’t import into iTunes. If you change Handbrake to default to .mp4 when exporting for iTunes, it works fine. You might see if something similar is happening? My files were playable by QuickTime, but couldn’t be imported by iTunes
March 15th, 2008 at 3:37 pm
Thanks Johs! Your guide worked great for me.
Except the step 7 - it’s working with higher bitrate as well
Great job
Thanks again
March 16th, 2008 at 6:04 pm
Cucusoft iphone video converter is great iphone video software, support converts avi, mpeg, vob, flv, mov, wmv, etc to iphone, doanload here
http://www.dvd-ipod.biz/iphoneconverter/avi_to_iphone.html
March 16th, 2008 at 6:44 pm
Maybe this could be a help (at least at MPG4 format): Make sure you have ‘Mosaic video sub filter’ checked in preferences->Stream output->Sout stream->Transcode. That worked for me… for MPG4. AVI and other formats won’t allow to create another stream whatever that might mean. No much use of such message, if reason is not displayed, right? In case of Mosaic video filter it was: I checked all filters on the list and message window reported that freetype encoder is missing. I unchecked it, and subtitle merging went through… Only problem is now code page of subtitles … You cannot set it manually, so It is again useless…
March 16th, 2008 at 6:45 pm
BTW: I use iMac and tiger. Input file was AVI, output MPG4.
March 17th, 2008 at 3:58 am
I have been using this method for a while and have the same problems as everyone else. When I first had the idea to do it, I tried it with a 30 minute tv show and it worked great, however every time I try to convert a movie it just will not work. Perhaps it is do with the file size?
March 23rd, 2008 at 6:29 pm
I was successfull at last. Well, nearly. Movie is created with subtitles, but can be only played in VLC, and nowhere else.
No what?
April 13th, 2008 at 12:11 am
i have same problem, i have managed to convert some movies (.avi) to mpeg4 with great success, others have the same issue of invalid data when opening in quicktime, and vlc errors as noted previously. has anyone cracked this problem yet.?
April 13th, 2008 at 4:44 am
Thanks for the recipe Pieter, but this didn’t work completely for me. I managed to create the m4p files, and import them into iTunes, but when syncing to the iPhone it balked, claiming that they could not be played on the phone. Same error for both mpeg 4 and the H.264 (256 bit rate) that another commenter suggested. Does anyone know specifically what the requirements for playback are on the iPhone? Does this potentially also perhaps depend on the source of your avi files? (Mine were exported from EyeTV 2.x as DivX format)
- D.
April 14th, 2008 at 3:23 pm
i have had similar issues as above, just found and tried isquint (isquint.org) - freeware, have tried with .avi and flash, and results have been excellent. although simple by default, there are advanced settings to optimise for TV out, for larger but better quality conversions.
May 8th, 2008 at 6:31 pm
that’s weird u guys r having issues it works flawlessly for me
May 11th, 2008 at 5:51 pm
For those of you having problems, give this a try:
1. Instead of using the wizard, do the regular open file and combo of stream/save.
2. Under settings, select the encapsulation method as MP4 and MP4V/MP4A for video/audio per this article.
3. Now, on the top of the dialog box, you’ll see a Target: (under Stream Output MRL).
4. Enter the following:
#transcode{width=320,canvas-height=240,vcodec=mp4v …}
The additional stuff you have to enter is the width= and canvas-height= values.
In my case, those videos that didn’t convert for me were super widescreen. Some weird ratios and those that worked were not so wide. When I did this, the videos that wouldn’t play back in QT or won’t transfer to iTunes now works. I tried it with 2 video files thus far. I can’t be 100% sure it’ll work with all my videos unfortunately.
Good luck.
May 26th, 2008 at 4:48 am
Thanks Jay for your effort,
You did e very good job by posting the details on how to convert.
But i want to add if anybody want’s to convert to i phone try this:
1_ follow Jay’s steps but on the 4th line just simply replace the #’s
before= #transcode{width=320,canvas-height=240,vcodec=mp4v …}
after= #transcode{width=720,canvas-height=406,vcodec=mp4v …}
this is a very easy change …… so i want to make sure that Jay from above coment should get the credit …..
Try this on your iphone it will work for sure…
God bless
May 26th, 2008 at 7:31 pm
I realized that vlc doesn’t work with some movies and i still enquire problems when i try to drag it to itunes.
So i came across this software camtasia, that i used to use on on my computer to edit movies.
I did some research on their website on i saw that they produce video for iphone…….
This is amazing and is working with every movie that i’m converthing no more problems.
The only thing is, this software cost money that’s the bummer.
But if you don’t care about money here is the link:
http://www.techsmith.com/camtasia/whatsnew.asp
This will work for sure no more issues garrantie.
God bless.
May 26th, 2008 at 11:18 pm
Thanks Pieter,
Worked like a charm!
Converted all my comedy shows for my iphone.
Thanks…
June 3rd, 2008 at 11:07 pm
hi, i tired many ways to convert my digital cams avi movie files to mpeg4 but nothing works…all i get is audio format..even when i use video format converstoin.. the video is gone an there is only audio..how can i fix that??
June 8th, 2008 at 1:53 pm
Now a free VLC Media Player itself for Apple iPhone and iPod Touch
http://thinkabdul.com/2008/06/07/zodplay-download-free-vlc-media-player-for-apple-iphone-ipod-touch/
June 17th, 2008 at 12:16 pm
isquint still works flawlessly for me everytime, two clicks and sorted! n one of the hassles with VLC variables, it has all the presets on board so you just need to select an output quality for ipod or TV.
June 27th, 2008 at 4:56 am
Ok, so it worked well, kind of… I had the same problem as someone above: it will only convert a few seconds of the movie. I use a mac and am converting .avi files. Has anyone figured out this little glitch yet?
June 27th, 2008 at 5:14 am
Ok, so I was able to convert it with Jay’s instructions but I can’t get it into iTunes. What now?
July 8th, 2008 at 7:21 am
Thanks for all the tips — the original directions didn’t work but by using H.264, the converted AVI file loaded like a champ into iTunes - drag and drop. However, when I tried to sync to my iPhone - no joy - everything was properly checked, but the file didn’t sync. Next, I right clicked on the file inside of iTunes and selected “Convert selection to iPhone/iPod”.
Boom - it works! Thanks for the tips and troubleshooting.
July 14th, 2008 at 10:24 pm
I’ve had differing results with this and I’m fairly sure it’s down to the source file.
I’ve had ones that work perfectly following the original instructions and I’ve had ones that needed encoding as H.264 then converting in iTunes (see above).
Not sure yet why it is different.
August 21st, 2008 at 4:01 pm
Do have VLC installed on my computer, how do I convert my MPEG4 format films to avi to play on my stand-alone dvd player.