• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

How To Put Videos on Droid

Linux users are not left out! The Droid is great for Linux, because you don't have to run iTunes to make full use of your device (like you would with the iPhone).

Install ffmpeg and use the following code. It will take SourceVideo.avi and transcode to DroidVideo.mp4. I've used it with several different sources and works great.

ffmpeg -i SourceVideo.avi -y -threads 0 -subq 6 -deinterlace -level 30 -f mp4 -acodec libfaac -ab 160k -ar 48000 -ac 2 -vcodec libx264 -b 2000k -maxrate 2000k -bufsize 2000kb -rc_eq 'blurCplx^(1-qComp)' -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -coder 0 -refs 2 -flags +loop -vol 256 -trellis 1 -me_method umh -async 1 DroidVideo.mp4
If it complains that "deinterlace failed" then simply remove "-deinterlace".
Also, some VOB files have a black border running across the top and the bottom that you will want to crop (ffmpeg doesn't have autocrop). In this case, find out the size of the original video (through either gxine, VLC under "tools" section, or "mplayer FILE.VOB" on command line) and compare to output from "mplayer FILE.VOB -vf cropdetect". In most cases, cropping about 60 lines off top and bottom will work, can add "-croptop 60 -cropbottom 60".

You can get a smaller file with almost as good quality by lowering the bitrate from 2000 to something lower, such as 1000 by changing to "-b 1000k -maxrate 1000k"

The only time this gets complicated is when you are using a high definition file where the width is greater than 852 (standard DVD's are 720 and work fine with the above method). In this case, you need to do some manual work (ffmpeg cannot automatically downsize like handbrake can). You will have to insert a size value with the "-s" parameter (and must use even numbers!). Here are the guidelines:
Find out the size of the original video (through either gxine, VLC under "tools" section, or "mplayer FILE.VOB" on command line).
If file SMALLER than 852 x 480: Don't use -s
If file LARGER than 852 x 480:
Find aspect ratio of original video (width / height)
If <1.775 then:
Height 480
Width is 480 x original aspect ratio
If = 1.775 then "-s wvga" (example, 1920 x 1080)
If >1.775 then
Width is 852
Height is 852 / aspect ratio (example, 1920 x 800 is "-s 852x354)

ffmpeg is also available on Windows and MAC and should work fine there too, although most people were prefer a GUI method such as Handbrake.
 
Upvote 0
Wow, this thread is growing at lightspeed. I can't even keep up with it. But an idea for why sound is not syncing properly with video. A video producer friend of mine said that they are on seperate tracks in the file. and that the sound is made to work with 30 fps. (that is the one they use to get a "film" quality look" higher gives a digital look) When you process the video at a higher or lower frame rate, he said that it messes up the sync. According to him the sound is locked at 30 fps. maybe as a test, try to choose the option closest to 30 for the video. I'm converting my first attempt right now, and thought of this after starting.
Also as a side note, I have used Pocket-DVD Studio in the past for my sons PSP and my Omnia. and it also had a garbley sound for the first 10 - 15 minutes. So there has to be a universal problem with that sound.
(Now I have to go back and read the last five pages of posts)lol
 
Upvote 0
Install ffmpeg and use the following code. It will take SourceVideo.avi and transcode to DroidVideo.mp4. I've used it with several different sources and works great.

Any chance you could make a shell script to do all that? I suck at making scripts. I could make one for the basic command line, but nothing that could handle the variables if you wanted to crop, etc.
 
Upvote 0
Just tried this:

ffmpeg -i SourceVideo.avi -y -threads 0 -subq 6 -deinterlace -level 30 -f mp4 -acodec libfaac -ab 160k -ar 48000 -ac 2 -vcodec libx264 -b 2000k -maxrate 2000k -bufsize 2000kb -rc_eq 'blurCplx^(1-qComp)' -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -coder 0 -refs 2 -flags +loop -vol 256 -trellis 1 -me_method umh -async 1 DroidVideo.mp4
Turns out that libfaac isn't enabled for Encode in 9.10. This sucks. Any ideas on what audio I can use? Mp3 isn't enabled for encode either in ffmpeg.

I am too lazy to go and compile ffmpeg & libs and any programs I want to use it properly.
 
Upvote 0
i used handbrake and the settings above and works great, audio is snyced and the picture is beautiful. thanks for the help.

ps - double twist is a great program also, just like itunes for the droid, a little glitchy once in a wile but for the most part works very well and very easy app for transfering programs back and forth and best of all, its free
 
Upvote 0
Ok, so I compiled ffmpg & the x264 codec. But EVERYTHING I've tried to convert so far has come out choppy. :((

Any thoughts? I don't want to have to wait for handbrake.

On the Left is a file I created, on the right is Fab's sample. Only thing I see is the Frame Rate.
 

Attachments

  • WhatIsWrong.jpg
    WhatIsWrong.jpg
    23.6 KB · Views: 144
Upvote 0
I updated my ffmpeg script on my Linux box that served me well during my e71 days...love the new resolution :)

source file info:
$ file TEST.HDTV.XviD.avi
TEST.HDTV.XviD.avi: RIFF (little-endian) data, AVI, 624 x 352, 23.98 fps, video: XviD, audio: MPEG-1 Layer 3 (stereo, 48000 Hz)


encode script example:
$ cat testscript.sh
#!/bin/sh
ffmpeg -y -i $1 -acodec libfaac -ab 160k -s 720x480 -aspect 16:9 -vcodec libx264 -b 500k \
-qcomp 0.6 -qmin 16 -qmax 51 -qdiff 4 -flags +loop -cmp +chroma -subq 7 -refs 6 -g 300 \
-keyint_min 25 -rc_eq 'blurCplx^(1-qComp)' -sc_threshold 40 -me_range 12 -i_qfactor 0.71 \
-directpred 3 outputTEST.mp4
exit

syntax:
./testscript.sh TEST.HDTV.XviD.avi

720x480 works like a charm...wish I could say the same for 848x480 :(

Tried a few variations, unfortunately I'm experiencing some pretty bad pixelation during playback of higher res. output mp4 files...

seems ffmpeg is also available for windows...your mileage may vary :p

manny
 
Upvote 0
Ok, so I compiled ffmpg & the x264 codec. But EVERYTHING I've tried to convert so far has come out choppy. :((

Any thoughts? I don't want to have to wait for handbrake.

On the Left is a file I created, on the right is Fab's sample. Only thing I see is the Frame Rate.

Tymanthius - not sure what went wrong. I converted the "Red Cliff" Trailer from apple.com/trailers. It runs perfectly without any problems. The frame rate is 23.97 - I'm not sure if that matters. You can force a frame rate with the script by "-r 23.97" or "-r 25".

Another thing to try would be to lower the bit rate: "-b 1000k -maxrate 1000k" or even "-b 500k -maxrate 500k" if needed.

Experiment with a small file first. If you want to use a large file, use "-t 60" to have it just do the first 60 seconds for testing purposes.
 
Upvote 0
I updated my ffmpeg script on my Linux box that served me well during my e71 days...love the new resolution :)

source file info:
$ file TEST.HDTV.XviD.avi
TEST.HDTV.XviD.avi: RIFF (little-endian) data, AVI, 624 x 352, 23.98 fps, video: XviD, audio: MPEG-1 Layer 3 (stereo, 48000 Hz)


encode script example:
$ cat testscript.sh
#!/bin/sh
ffmpeg -y -i $1 -acodec libfaac -ab 160k -s 720x480 -aspect 16:9 -vcodec libx264 -b 500k \
-qcomp 0.6 -qmin 16 -qmax 51 -qdiff 4 -flags +loop -cmp +chroma -subq 7 -refs 6 -g 300 \
-keyint_min 25 -rc_eq 'blurCplx^(1-qComp)' -sc_threshold 40 -me_range 12 -i_qfactor 0.71 \
-directpred 3 outputTEST.mp4
exit

syntax:
./testscript.sh TEST.HDTV.XviD.avi

720x480 works like a charm...wish I could say the same for 848x480 :(

Tried a few variations, unfortunately I'm experiencing some pretty bad pixelation during playback of higher res. output mp4 files...

seems ffmpeg is also available for windows...your mileage may vary :p

manny

mr_manny - I previously did a transcode of a video from apple/trailers, so this time I went to YouTube, downloaded a High Def Vid in mp4 format and ran the script - it worked fine.

Both the vids I did were 1280 x 720 which is an aspect ratio of 1.777. So on the script I added "-s wvga" to set the width and height. Runs with occasional slight choppiness, but no pixelation.

Also, I did try converting an FLV video, but couldn't get that one to end up looking very good - must need a different parameter, but I haven't had time to experiment.
 
Upvote 0
Tymanthius - not sure what went wrong. I converted the "Red Cliff" Trailer from apple.com/trailers. It runs perfectly without any problems. The frame rate is 23.97 - I'm not sure if that matters. You can force a frame rate with the script by "-r 23.97" or "-r 25".

Another thing to try would be to lower the bit rate: "-b 1000k -maxrate 1000k" or even "-b 500k -maxrate 500k" if needed.

Experiment with a small file first. If you want to use a large file, use "-t 60" to have it just do the first 60 seconds for testing purposes.


Could you maybe post a direct dwnload link to that trailer, and your exact command so I can try to replicate it? At least then it would let me know if it's me, or maybe my pc just refueses. It's a bit old (not even multicore :( ) But that should just make it take longer, not make it screw up.
 
Upvote 0
So far it looks like there's two clear solutions.

1) Use handbrake with settings set forth in this thread for more quality and control of your output file. You then manually sync it to your device.

2) Use doubleTwist which converts *and* syncs to device in one without any setup for each video file.

Number 1 gives best output and quality for those with high quality originals. Number 2 gives ok output with extreme simplicity albiet sometimes flaky.

Any more word on the Motorola sync tool and how it works?
 
Upvote 0
Linux users are not left out! The Droid is great for Linux, because you don't have to run iTunes to make full use of your device (like you would with the iPhone).

Install ffmpeg and use the following code. It will take SourceVideo.avi and transcode to DroidVideo.mp4. I've used it with several different sources and works great.

The only time this gets complicated is when you are using a high definition file where the width is greater than 852 (standard DVD's are 720 and work fine with the above method). In this case, you need to do some manual work (ffmpeg cannot automatically downsize like handbrake can). You will have to insert a size value with the "-s" parameter (and must use even numbers!). Here are the guidelines:
Find out the size of the original video (through either gxine, VLC under "tools" section, or "mplayer FILE.VOB" on command line).
If file SMALLER than 852 x 480: Don't use -s
If file LARGER than 852 x 480:
Find aspect ratio of original video (width / height)
If <1.775 then:
Height 480
Width is 480 x original aspect ratio
If = 1.775 then "-s wvga" (example, 1920 x 1080)
If >1.775 then
Width is 852
Height is 852 / aspect ratio (example, 1920 x 800 is "-s 852x354)

ffmpeg is also available on Windows and MAC and should work fine there too, although most people were prefer a GUI method such as Handbrake.

I tried several different way of converting my .avi file (640x272) to convert to MPEG-4 to no avail. Well, what I mean to say that nothing I've done has successfully played on my Motorola Droid altough they've all compiled fine and played fine on the PC.

This method:
ffmpeg -i SourceVideo.avi -y -threads 0 -subq 6 -deinterlace -level 30 -f mp4 -acodec libfaac -ab 160k -ar 48000 -ac 2 -vcodec libx264 -b 2000k -maxrate 2000k -bufsize 2000kb -rc_eq 'blurCplx^(1-qComp)' -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -coder 0 -refs 2 -flags +loop -vol 256 -trellis 1 -me_method umh -async 1 DroidVideo.mp4
provided by NobodySpecial, is the only thing that half-worked for me so far. All the other version I'll just hear the audio, this one I could hear it, but it was displaying at about 1 FPS.

I've tried hadbrake on my Windows partition also to no avail. I have all the latest libraries and other dependencies for FFMpeg as per this helpful Ubuntu Forum thread. Still, nothing has worked well.

Please, any help would be greatly appreciated. Also, the .avi file is 1.4GB.
 
Upvote 0
to Fabo (mostly). Just curious why the 848 and not 854 which is apparently the width of Android screen??

And based on info below, how about 854 and a bitrate of 300?? I may try that next:

This from dev of Act1 video app (great interface!)
The tricky part here is converting the videos so that Android understands them. Fortunately, there's a lot of desktop software out there that will do the trick. Since Android phones play the same video format as iPod (mp4/h264), you could just use anything that converts for iPod. But the iPod screen is much smaller than most Android devices, so the quality won't be as great. What you really want is something that will convert for your screen size. Most Android devices right now have a 320x480 screen. The new Droid has a 480x854 screen. Whatever your screen size, it's good to convert your video to be within the bounds of your screen, and optimally exactly matching one of the dimensions to prevent Android from having to scale the video.

Remember one important thing: converting videos with a lower bitrate makes for smaller files, smoother playback, and less battery consumption during playback. If you want to optimize your video playing experience, try tuning the video conversion to the lowest tolerable bitrate. I usually end up with videos using ~300kbps. Some applications like Videoa default to twice that rate, which I think is excessive. I mean, it's a small screen, and how much quality do you think you can expect from it? :)
 
Upvote 0
Hey everyone, I think I found some great settings to convert with (for Handbrake):

I'm not sure about ripping straight from a DVD, but when you have a file (mine are 720/1080p .MKVs in 16:9), you can use these following settings:

Easy way: Select iPod legacy, change width to 848 (should turn box green automatically)

Exact Settings:

848x480 resolution, H.264 codec, 1500kbps avg bitrate, AAC 48KHz 160Kbps


Here's a sample I made yesterday, watch it on your Droid and your eyes will be pleased!

MEGAUPLOAD - The leading online storage and file delivery service

No copyright infringement intended.

It takes me ~45min to convert a full length movie with these settings. This is with a Ph. II X4 940 quad core at 3.7GHz. My guess is that if you have a quad core it will take roughly an hour, dual core, perhaps 2.

Let me know if these settings work for you!


Worked for me, FINALLY... thank god.

I'm going to re-try with the same audio bitrate as the original file, as well as the same video bitrate, and going to try to match the FPS, as well as having it do a dual pass, 1st pass Turbo.

I'm now having an issue where the Audio is out of Synch with the Video. Audio is leading by about 1/3 a second or so.
 
Upvote 0
to Fabo (mostly). Just curious why the 848 and not 854 which is apparently the width of Android screen??

For some strange reason, Handbrake won't let me put in 854, but when I input 848, it works.

So basically, using Handbrake's GUI, the highest working resolution I can get is 848x480.

Which is OK with me. I'd rather sacrifice 6 lines of resolution to use a simple program to make very good looking videos for my Droid :D

But if you're going to use a different encoding program with more flexibility in customizing the resolution, then by all means use the native resolution of the Droid. It may even help, as the Droid won't need to upscale at all. Could it save CPU cycles?
 
Upvote 0
For some strange reason, Handbrake won't let me put in 854, but when I input 848, it works.

You may have to set the anamorphic to "loose".

I compared two files encoded at the two different widths (848, 854) and was not able tell the difference, I think the screen is so dense that 6 pixels difference is not perceivable. The source was a 180p mkv. The only difference was a few bytes of the output file.
 
Upvote 0
You may have to set the anamorphic to "loose".

I compared two files encoded at the two different widths (848, 854) and was not able tell the difference, I think the screen is so dense that 6 pixels difference is not perceivable. The source was a 180p mkv. The only difference was a few bytes of the output file.

Yeah, I have to redo it now because it stretched out my movie vertically. Thanks for pointing out the fix!

So it seems 848 is the easy solution, as it will detect the aspect ratio for you.

Still, if you really want those extra 6 lines, it can be done, but you'll need to be more careful about the aspect ratio.

Ahh, trade offs. Lol.
 
Upvote 0
Turns out the AVI file I was fighting with was problematic. D/L'd a different version and just ran through HB with 854 width and 500 frame rate (yes 500 not a typo) and got a much smaller file that fills the screen with ZOOM OFF and sync seems fine (just checked in about middle of movie). Going to run another time with width 640 and 300 bit rate.
 
Upvote 0
Turns out the AVI file I was fighting with was problematic. D/L'd a different version and just ran through HB with 854 width and 500 frame rate (yes 500 not a typo) and got a much smaller file that fills the screen with ZOOM OFF and sync seems fine (just checked in about middle of movie). Going to run another time with width 640 and 300 bit rate.

How large did the file end up being? I'm seeing about 1GB for a 1 hour 30 minute movie @1500kbps.

Was your file really only ~350MB?
 
Upvote 0
You gent's are a bit brighter than I, but I do appreciate all the effort.
This thread took me from a complete beginner botching everything I tried.... to managing to work out something useful, for me anyway.
____________________________________________________________
If any of you own Windows based "ImToo DVD Ripper", I have found a way to get the output to work at 854x480. Pretty nicely too, based on the two DVD's I have done.

This involves the existing profiles for Ipod, Zune, HD, etc.
Select the "HD MPEG4" profile, set the max bitrate at 10,000, and save it as a user-defined profile named "Droid".
Look in the ImToo driectory and open the "Profile\user\Droid.pf" file using Notepad. Change the s=0 line to read" "s=0, "", "854x480", 1, {"Auto", "848x480", "854x480", "720x480"}". Save it.

Reopen the program and you can now save standard DVD's as MP4's that fit the full width and look pretty good. I figured having the option of 848x480 and 720x480 would be helpful....maybe.
Try the different "Zoom" settings, depending on the source format....you can test them in the built-in viewer.

I can now go straight from DVD to Droid in one pass.
I hope this helps someone besides myself.

You may want to change the first few lines to read as follows, so the "Droid" designation appears everywhere you see this profile. Not required, but it is less confusing.
Name=Droid
SName=Droid
Format=mp4
ExtName=mp4
Desc=Droid MPEG4 Video File.


$
RAF
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones