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 19: Line 19:
   -lavcopts vcodec=mpeg4:mbd=1:vbitrate=300 -vf scale=352:208 \
   -lavcopts vcodec=mpeg4:mbd=1:vbitrate=300 -vf scale=352:208 \
   -ffourcc DIVX -ofps 15 -o outfile.avi
   -ffourcc DIVX -ofps 15 -o outfile.avi
-
 
-
mplayer will play 30 fps video fine.  The 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):
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):
Line 50: Line 42:
  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 119:
== 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 182: Line 160:
  #
  #
  ## Mux MPEG4 file
  ## Mux MPEG4 file
-
  #  MP4Box is part of the GPAC package.
+
  #  That's the weak point of this method
-
  #  You could also use mp4creator,
+
  #  mp4creator seems to be buggy and unsupported
-
#  but that's buggy and no longer actively developed
+
  mp4creator -create=N800.aac N800.mp4
-
  -fps ist frames per second; you need to give this info
+
  mp4creator -create=N800.264 -rate=25 N800.mp4
-
  MP4Box -new -add N800.264 -add N800.aac -fps 25.000 N800.mp4
+
mp4creator -O N800.mp4
-
 
+
The thread on talk.maemo.org gives an idea how other software may work.  
The thread on talk.maemo.org gives an idea how other software may work.  
Line 195: Line 172:
[[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)