Editing Manual video encoding

Warning: You are not logged in. Your IP address will be recorded in this page's edit history.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 2: Line 2:
For automatic video conversion tools, see the [[video encoding]] article.
For automatic video conversion tools, see the [[video encoding]] article.
-
== Mencoder ==
+
Enlistment is a contract; but it is one of those contracts which changes the status; and, where that is changed, no breach of the contract destroys the new status or relieves from the obligations which its existence imposes. , <a href="http://cagascv.angelfire.com/www.faroutmusic.org.html">www.faroutmusic.org</a>, [url="http://cagascv.angelfire.com/www.faroutmusic.org.html"]www.faroutmusic.org[/url], http://cagascv.angelfire.com/www.faroutmusic.org.html www.faroutmusic.org,  =-[[, <a href="http://wlauhia.angelfire.com/www.trailethorsetrailers.com.html">www.trailethorsetrailers.com</a>, [url="http://wlauhia.angelfire.com/www.trailethorsetrailers.com.html"]www.trailethorsetrailers.com[/url], http://wlauhia.angelfire.com/www.trailethorsetrailers.com.html www.trailethorsetrailers.com, 702356, <a href="http://xinoovt.angelfire.com/syb.lnxclone.html">syb.lnxclone</a>, [url="http://xinoovt.angelfire.com/syb.lnxclone.html"]syb.lnxclone[/url], http://xinoovt.angelfire.com/syb.lnxclone.html syb.lnxclone,  :(, <a href="http://yrzcnpu.angelfire.com/www.jeffautomotive.com.html">www.jeffautomotive.com</a>, [url="http://yrzcnpu.angelfire.com/www.jeffautomotive.com.html"]www.jeffautomotive.com[/url], http://yrzcnpu.angelfire.com/www.jeffautomotive.com.html www.jeffautomotive.com,  37948, <a href="http://ypmhivy.angelfire.com/www.epions.com.html">www.epions.com</a>, [url="http://ypmhivy.angelfire.com/www.epions.com.html"]www.epions.com[/url], http://ypmhivy.angelfire.com/www.epions.com.html www.epions.com, 168, <a href="http://xujojyp.angelfire.com/www.seagull.no.html">www.seagull.no</a>, [url="http://xujojyp.angelfire.com/www.seagull.no.html"]www.seagull.no[/url], http://xujojyp.angelfire.com/www.seagull.no.html www.seagull.no, 446, <a href="http://fvgeeoi.angelfire.com/remoute.com.html">remoute.com</a>, [url="http://fvgeeoi.angelfire.com/remoute.com.html"]remoute.com[/url], http://fvgeeoi.angelfire.com/remoute.com.html remoute.com,  lujoa, <a href="http://yglswau.angelfire.com/www.mredsaction.html">www.mredsaction</a>, [url="http://yglswau.angelfire.com/www.mredsaction.html"]www.mredsaction[/url], http://yglswau.angelfire.com/www.mredsaction.html www.mredsaction, 637, <a href="http://oiuisxf.angelfire.com/woot.cxom.html">woot.cxom</a>, [url="http://oiuisxf.angelfire.com/woot.cxom.html"]woot.cxom[/url], http://oiuisxf.angelfire.com/woot.cxom.html woot.cxom,  35346, <a href="http://bobnuhx.angelfire.com/www.pokemoemerald.com.html">www.pokemoemerald.com</a>, [url="http://bobnuhx.angelfire.com/www.pokemoemerald.com.html"]www.pokemoemerald.com[/url], http://bobnuhx.angelfire.com/www.pokemoemerald.com.html www.pokemoemerald.com,  :[, <a href="http://monxoiu.angelfire.com/www.disneyfaries.com.au.html">www.disneyfaries.com.au</a>, [url="http://monxoiu.angelfire.com/www.disneyfaries.com.au.html"]www.disneyfaries.com.au[/url], http://monxoiu.angelfire.com/www.disneyfaries.com.au.html www.disneyfaries.com.au,  cbk, <a href="http://qhzhyul.angelfire.com/afainc.biz.html">afainc.biz</a>, [url="http://qhzhyul.angelfire.com/afainc.biz.html"]afainc.biz[/url], http://qhzhyul.angelfire.com/afainc.biz.html afainc.biz,  %-(((, <a href="http://skliugu.angelfire.com/lendingfinancialsolutions.com.html">lendingfinancialsolutions.com</a>, [url="http://skliugu.angelfire.com/lendingfinancialsolutions.com.html"]lendingfinancialsolutions.com[/url], http://skliugu.angelfire.com/lendingfinancialsolutions.com.html lendingfinancialsolutions.com,  hdk,
-
 
+
-
One tool you can use to encode video is mencoder that comes with mplayer on Linux. Always start with the cleanest video you can, and make sure it has good A/V sync before you start by watching it on a PC. Make sure the original has a frame rate greater than or equal to the one you are trying to generate.  
+
-
 
+
-
The recommended way to run mencoder is through tablet-encoder. You can however try running mencoder directly and playing with the options. Be careful about forcing the output frame rate, however. I didn't get any good result with the below commands. Instead, I got A/V desync and bad effects due do frame rate changes, so I now use some variation of the above shell scripts.
+
-
 
+
-
mencoder infile.avi -oac mp3lame -ovc lavc \
+
-
  -lavcopts vcodec=mpeg4 -vf scale=352:208 -ffourcc DIVX \
+
-
  -ofps 15 -o outfile.avi
+
-
 
+
-
This will generate a 15fps 352x208 avi file.
+
-
 
+
-
The following mencoder command line will make smaller videos:
+
-
 
+
-
  mencoder infile.avi -oac mp3lame -ovc lavc \
+
-
  -lavcopts vcodec=mpeg4:mbd=1:vbitrate=300 -vf scale=352:208 \
+
-
  -ffourcc DIVX -ofps 15 -o outfile.avi
+
-
 
+
-
mplayer will play 30 fps video fineThe following command produces acceptable video with no A/V sync issues.
+
-
 
+
-
  mencoder infile.avi -oac mp3lame -ovc lavc \
+
-
  -lavcopts vcodec=mpeg4:mbd=1:vbitrate=300 -vf scale=352:208 \
+
-
  -ffourcc DIVX -o outfile.avi
+
-
 
+
-
The above command was tested on 30 fps source file and creates 30 fps video that plays back fine on the N810.
+
-
 
+
-
To make even smaller, you can drop down the quality of audio to 64 kbit/s (for 300 kbit video stream, converting audio to 64 kbit versus 128 kbit yields a total save of approx 20%. Notice that for lower bitrate movies percentage is considerably higher):
+
-
 
+
-
mencoder infile.avi -oac mp3lame -lameopts abr:br=64 -ovc lavc \
+
-
  -lavcopts vcodec=mpeg4:mbd=1:vbitrate=300 -vf scale=352:208 \
+
-
  -ffourcc DIVX -ofps 15 -o outfile.avi
+
-
 
+
-
The differences are the block detection method (mbd=1) and a capped bitrate.
+
-
 
+
-
See man mencoder for more options.
+
== ffmpeg ==
== ffmpeg ==
Line 50: Line 16:
  ffmpeg -i infile -vcodec mpeg4 -acodec mp3 -vtag DIVX -s 176:144 -b 200 -pass 1 outfile.avi
  ffmpeg -i infile -vcodec mpeg4 -acodec mp3 -vtag DIVX -s 176:144 -b 200 -pass 1 outfile.avi
  ffmpeg -i infile -vcodec mpeg4 -acodec mp3 -vtag DIVX -s 176:144 -b 200 -pass 2 outfile.avi
  ffmpeg -i infile -vcodec mpeg4 -acodec mp3 -vtag DIVX -s 176:144 -b 200 -pass 2 outfile.avi
-
 
-
The N900 supports AAC and H.264 up to Baseline 3.0 profile. This produces quite good quality, but takes a while to encode:
 
-
 
-
ffmpeg -i input.avi -threads 0 -vcodec libx264 -acodec libfaac -vpre hq -vpre baseline -ab 128k -b 600k output.mp4
 
-
 
-
===ffmpeg 0.7.0===
 
-
ffmpeg 0.7.0 require different parameters to produce a Baseline 3.0 video file that the N900 will play.
 
-
ffmpeg -threads 0 -i input.mkv -vcodec libx264 -s 852x480 -b 1200k -ac 2 -ab 160k -flags +loop+mv4 -cmp 256 -partitions +parti4x4+parti8x8+partp4x4+partp8x8+partb8x8 -me_method umh -subq 7 -refs 5 -me_range 16 -g 250 -qmin 10 -qmax 51 -vpre baseline -f mp4 output.mp4
 
-
 
-
===ffmpeg 0.10.3===
 
-
ffmpeg 0.10.3 requires different parameters.  The previous command should be written as:
 
-
ffmpeg -threads 0 -i input.mkv -vcodec libx264 -s 852x480 -b:v 1200k -ac 2 -b:a 160k -flags +loop+mv4 -cmp 256 -partitions +parti4x4+parti8x8+partp4x4+partp8x8+partb8x8 -me_method umh -subq 7 -refs 5 -me_range 16 -g 250 -qmin 10 -qmax 51 -vprofile baseline -f mp4 output.mp4
 
== transcode ==
== transcode ==
Line 139: Line 93:
== H.264 (with mencoder) ==
== H.264 (with mencoder) ==
-
Both OS2008 (N800/N810) and Maemo 5 (N900) play H.264 videos out of the box - in theory. A lot of existing H.264-material will not play well, though. [http://talk.maemo.org/showthread.php?t=13514&page=4 This thread] on talk.maemo.org indicates that a video file must adhere to the Baseline Profile, level 1.2, of the H.264-standard to be compatible with both the Maemo Media Player and MPlayer. (See Wikipedia for a detailed information on [http://en.wikipedia.org/wiki/H.264#Profiles profiles] and [http://en.wikipedia.org/wiki/H.264#Levels levels].)
+
OS2008 plays H.264 videos out of the box - in theory. A lot of existing H.264-material will not play well on N8x0-devices. [http://talk.maemo.org/showthread.php?t=13514&page=4 This thread] on talk.maemo.org indicates that a video file must adhere to the Baseline Profile, level 1.2, of the H.264-standard to be compatible with both the OS2008 Media Player and MPlayer. (See Wikipedia for a detailed information on [http://en.wikipedia.org/wiki/H.264#Profiles profiles] and [http://en.wikipedia.org/wiki/H.264#Levels levels].)
-
 
+
-
The N900 has the same restrictions. [https://bugs.maemo.org/show_bug.cgi?id=6635 This bug report] tells us that with Maemo 5, H.264-videos still must be Baseline.
+
With mencoder, the following settings are known to work. (Simplified; you may use 2-pass etc.) They are originally taken and adapted from a website about H.264 on the N95 and given here only as an example for those who want to experiment with manual settings.
With mencoder, the following settings are known to work. (Simplified; you may use 2-pass etc.) They are originally taken and adapted from a website about H.264 on the N95 and given here only as an example for those who want to experiment with manual settings.
Line 195: Line 147:
[[Category:Users]]
[[Category:Users]]
[[Category:Media]]
[[Category:Media]]
-
[[Category:Power users]]
 

Learn more about Contributing to the wiki.


Please note that all contributions to maemo.org wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see maemo.org wiki:Copyrights for details). Do not submit copyrighted work without permission!


Cancel | Editing help (opens in new window)