<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-10379379</id><updated>2011-11-17T23:59:08.595+11:00</updated><category term='truecrypt gpg encryption'/><category term='mkv linux encoding h.264 x264 mencoder'/><category term='avi joining mencoder'/><title type='text'>Psyk's stuff</title><subtitle type='html'>Techno geeky ramblings</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://psyklops.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10379379/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://psyklops.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Psyk</name><uri>http://www.blogger.com/profile/15377630409144936476</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_Y10hQ3VoMFs/SQ5JQXLWZUI/AAAAAAAAAAM/Z6eEP_-MQfA/S220/Adjusted.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>14</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-10379379.post-2034803033798730101</id><published>2010-10-03T14:24:00.000+11:00</published><updated>2010-10-03T14:24:03.279+11:00</updated><title type='text'>Fixing choppy sound in Fedora and VMware</title><content type='html'>Sony and Ableton etc. don't support Linux with their major high-end audio applications which is such a damn shame. &amp;nbsp;Applications such as Ableton Live, Sony Acid Pro and Sony Vegas Pro demand a lot of CPU resources and my system is dual-boot to get the best experience with these apps, but sometimes one needs to do a quick re-edit, re-render and sometimes most of the material is stored on the Linux partitions in ext3/lvm format.... It would be easier if Apple, Sony and Ableton supported Linux... oh well. &amp;nbsp;The current answer is to run them up in a Windows virtual machine and I've had a lot of success with VMware Workstation.&lt;br /&gt;&lt;br /&gt;One of the biggest issues is choppy sound under load within the VM's. &amp;nbsp;Ableton is extra sensitive and allows you to tweak additional parameters to get the most optimum configuration, since you're virtualized you have multiple layers of tweaking...&lt;br /&gt;&lt;br /&gt;Since Fedora (currently on 13) runs Pulseaudio, it's much easier now days to configure and setup the audio parameters. Below are a settings that helped in getting better audio (i.e. without stuttering) in a Vista VM.&lt;br /&gt;&lt;br /&gt;1) Run up in a terminal&lt;br /&gt;&lt;pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"&gt;&lt;code&gt;gedit /etc/pulse/daemon.conf&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;2)Change the following (most of these will be commented out with a ';' just remove the semi-colon):&lt;br /&gt;&lt;pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"&gt;&lt;code&gt;high-priority = yes &lt;br /&gt;nice-level = -11&lt;br /&gt;realtime-scheduling = yes &lt;br /&gt;realtime-priority = 5 &lt;br /&gt;default-fragments = 25 &lt;br /&gt;default-fragment-size-msec = 25 &lt;br /&gt;resample-method = speex-float-3 &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;3) Bring up a terminal window as user (i.e. non-root):&lt;br /&gt;&lt;pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"&gt;&lt;code&gt;[psyk@psyk ~]$ killall pulseaudio&lt;br /&gt;[psyk@psyk ~]$ pulseaudio &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;The last entry should restart the pulse daemon.&lt;br /&gt;&lt;br /&gt;Fire up your VM and you should get trouble-free sound :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10379379-2034803033798730101?l=psyklops.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://psyklops.blogspot.com/feeds/2034803033798730101/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://psyklops.blogspot.com/2010/10/fixing-choppy-sound-in-fedora-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10379379/posts/default/2034803033798730101'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10379379/posts/default/2034803033798730101'/><link rel='alternate' type='text/html' href='http://psyklops.blogspot.com/2010/10/fixing-choppy-sound-in-fedora-and.html' title='Fixing choppy sound in Fedora and VMware'/><author><name>Psyk</name><uri>http://www.blogger.com/profile/15377630409144936476</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_Y10hQ3VoMFs/SQ5JQXLWZUI/AAAAAAAAAAM/Z6eEP_-MQfA/S220/Adjusted.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10379379.post-1594198280574938749</id><published>2010-09-05T00:49:00.000+10:00</published><updated>2010-09-05T00:49:18.779+10:00</updated><title type='text'>Mounting Truecrypt/Realcrypt with read/write access for users</title><content type='html'>Mounting realcrypt or truecrypt volumes as a regular user disallows writing to the volumes unless you're root.&lt;br /&gt;&lt;br /&gt;A quick fix is as follows.&amp;nbsp; When mounting your realcrypt volume, click mount -&amp;gt; Options.&amp;nbsp; You should get the screen below.&amp;nbsp; In the mount options field enter the relevant uid and gid entries as shown.&lt;br /&gt;&lt;table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://i54.tinypic.com/149qgp5.png" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="297" src="http://i54.tinypic.com/149qgp5.png" width="320" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Options screen in Realcrypt when mounting a volume&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10379379-1594198280574938749?l=psyklops.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://psyklops.blogspot.com/feeds/1594198280574938749/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://psyklops.blogspot.com/2010/09/mounting-truecryptrealcrypt-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10379379/posts/default/1594198280574938749'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10379379/posts/default/1594198280574938749'/><link rel='alternate' type='text/html' href='http://psyklops.blogspot.com/2010/09/mounting-truecryptrealcrypt-with.html' title='Mounting Truecrypt/Realcrypt with read/write access for users'/><author><name>Psyk</name><uri>http://www.blogger.com/profile/15377630409144936476</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_Y10hQ3VoMFs/SQ5JQXLWZUI/AAAAAAAAAAM/Z6eEP_-MQfA/S220/Adjusted.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://i54.tinypic.com/149qgp5_th.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10379379.post-8977197701302506406</id><published>2010-06-12T17:07:00.001+10:00</published><updated>2010-09-05T00:50:46.415+10:00</updated><title type='text'>Setting up Password-less logins via SSH</title><content type='html'>This allows you to SSH into many machines (great for managing a number of VM's) without having to continually enter login and password. &lt;br /&gt;&lt;br /&gt;On your main server (e.g. your management server), configure the SSH keys: &amp;nbsp; &lt;br /&gt;&lt;pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;&lt;/code&gt;# mkdir -p $HOME/.ssh&lt;br /&gt;# chmod 0700 $HOME/.ssh&lt;br /&gt;# ssh-keygen -t dsa -f $HOME/.ssh/id_dsa -P ''&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This command creates two files: $HOME/.ssh/id_dsa (private key) and $HOME/.ssh/&lt;br /&gt;id_dsa.pub (public key).&lt;br /&gt;&lt;pre style="background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); color: black; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"&gt;&lt;code&gt;# ssh-copy-id -i $HOME/.ssh/id_dsa.pub &lt;i&gt;(your.other.linux.servers)&lt;/i&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;From your 'management server' test the results by ssh'ing into each of the servers:&lt;br /&gt;&lt;pre style="background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); color: black; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"&gt;&lt;code&gt;# ssh &lt;i&gt;(your.other.linux.servers)&lt;/i&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10379379-8977197701302506406?l=psyklops.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://psyklops.blogspot.com/feeds/8977197701302506406/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://psyklops.blogspot.com/2010/06/setting-up-password-less-logins-via-ssh.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10379379/posts/default/8977197701302506406'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10379379/posts/default/8977197701302506406'/><link rel='alternate' type='text/html' href='http://psyklops.blogspot.com/2010/06/setting-up-password-less-logins-via-ssh.html' title='Setting up Password-less logins via SSH'/><author><name>Psyk</name><uri>http://www.blogger.com/profile/15377630409144936476</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_Y10hQ3VoMFs/SQ5JQXLWZUI/AAAAAAAAAAM/Z6eEP_-MQfA/S220/Adjusted.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10379379.post-8550265133579462984</id><published>2010-01-24T00:23:00.003+11:00</published><updated>2010-01-24T00:27:47.833+11:00</updated><title type='text'>Update to PS3 encoding using mencoder in MP4 format</title><content type='html'>Further to my old (and probably obsolete) entry &lt;a href="http://psyklops.blogspot.com/2009/08/encoding-for-ps3-and-potentially-other.html"&gt;here&lt;/a&gt;&amp;nbsp;I thought it worthwhile to add an update in regards to encoding to MP4 format playable on Windows Media Centres and PS3's, although it should work on other platforms such as the Xbox but can't be sure as I don't have one for testing.&lt;br /&gt;&lt;br /&gt;One of the biggest issues I had with the previous method was the reliability in muxing it into an MP4 via MP4Box and especially when trying to get the audio, video sync right which I think had to do with it not being able to detect the FPS correctly. &amp;nbsp;In any case, the procedure involves converting everthing to an AVI (mencoder's preferred format) and then ripping/converting them raw and muxing it back into an MP4 using MP4box, mencoder can do MP4's but it's broken.&lt;br /&gt;&lt;br /&gt;First things first, and I can't take all the credit for this. &amp;nbsp;Credit goes to the &lt;a href="http://h264enc.sourceforge.net/"&gt;h264enc&lt;/a&gt; project which uses mencoder heavily and has some great built-in profiles. &amp;nbsp;Excellent display of show-casing mencoder's power and versatility.&lt;br /&gt;&lt;br /&gt;Lets, start...&lt;br /&gt;&lt;br /&gt;Add a new profile entry in &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;~/.mplayer/mencoder.conf&lt;/span&gt;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&lt;pre style="background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt; [H264ENC]  &lt;br /&gt; profile-desc="taken from h264enc, PS3 compatible encode with high quality."  &lt;br /&gt; vf=pp=al:c,softskip,scale=720:-10,harddup   &lt;br /&gt; aspect=16:9  &lt;br /&gt; af=volnorm=2,lavcresample=48000:16:1   &lt;br /&gt; srate=48000  &lt;br /&gt; oac=faac=yes   &lt;br /&gt; faacopts=mpeg=4:br=160:tns=yes:object=2  &lt;br /&gt; ovc=x264=yes  &lt;br /&gt; x264encopts=crf=19:me=umh:me_range=24:nodct_decimate:nointerlaced:8x8dct:nofast_pskip:trellis=1:partitions=p8x8,b8x8,i8x8,i4x4:mixed_refs:keyint=240:keyint_min=24:psy_rd=0.8,0.2:frameref=3:bframes=3:b_adapt=2:b_pyramid:weight_b:direct_pred=auto:subq=7:chroma_me:cabac:aud:aq_mode=1:deblock:vbv_maxrate=20000:vbv_bufsize=20000:level_idc=41:threads=auto:ssim:psnr  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;Obviously you can add your own parameters here especially in the "vf" section where you can adjust the scale, add some additional features (e.g. pullup,softskip, yadif etc.)&lt;br /&gt;&lt;br /&gt;I won't go into all the details here, but basically this scales the image down to a 720p type format, normalizes the volume and resamples it to 48kHz, encodes it to AAC at 160kb and uses a constant rate factor for h264 of '19' for higher-end quality without much regard for final file size (i.e. it focuses on maximizing the video quality).&lt;br /&gt;&lt;br /&gt;Once you have your profile you can run:&lt;br /&gt;&lt;pre style="background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt; mencoder -profile H264ENC "source_movie_file.ext" -o "source_movie_file.avi"  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;This is the encoding process and the lengthiest bit...&lt;br /&gt;&lt;br /&gt;If you want to hardsub an SRT file you can specify the &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;-sub "name_of_srt_file.srt"&lt;/span&gt; and the &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;-subfont-autoscale 1&lt;/span&gt; parameters to the mencoder line above.&lt;br /&gt;&lt;br /&gt;For example:&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; mencoder -profile H264ENC "source_movie_file.ext" -o "source_movie_file.ext.avi" -sub "name_of_srt_file.srt" -subfont-autoscale 1  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Once this is finished, you'll have a h264 encoded video and aac encoded audio muxed into an AVI format, which is not very friendly format and container combo, only mencoder/mplayer/vlc player friendly :)&lt;br /&gt;&lt;br /&gt;Next process requires us to split the video and audio into 'raw' input files that MP4Box can handle.  We'll do the video first:&lt;br /&gt;&lt;pre style="background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt; mencoder "source_movie_file.avi" -nosound -ovc copy -of rawvideo -o h264_video.h264  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;This will output a file called "h264_video.h264" in a raw stream that MP4Box can understand. As we've already done the encoding in the first step this will be quick as we're just ripping it from the AVI file.&lt;br /&gt;&lt;br /&gt;Next, is the audio:&lt;br /&gt;&lt;pre style="background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt; MP4Box -aviraw audio "source_movie_file.avi" -out aac.raw  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;Here we're using MP4Box to rip the audio from the AVI to a file called "aac_audio.raw" as MP4Box will rename the output.&lt;br /&gt;&lt;br /&gt;Rename it so that MP4Box can manage it as an AAC input:&lt;br /&gt;&lt;pre style="background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt; mv aac_audio.raw aac_audio.aac  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;The next step is to pick up the framerate (FPS) of the original movie source for correct interpretation into MP4.&lt;br /&gt;&lt;pre style="background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt; mplayer "source_movie_file.avi" -noconfig all -loop 1 -identify -nosound -vo null -nocache -frames 1 2&amp;gt;/dev/null | grep '^ID_VIDEO_FPS' | tail -n 1 | awk -F= '{print $2}' &amp;gt; mp4fps.fps  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;This outputs the FPS of the original converted movie (AVI file) to a file called mp4fps.fps.&lt;br /&gt;&lt;br /&gt;The final step muxes the video and audio into an MP4 container compatible with the many MP4 hardware devices and media centres.  This may not work with an iPod as it uses some advanced parameters in the encoding.  I'll try and post up the iPod parameters another time...&lt;br /&gt;&lt;pre style="background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt; MP4Box -fps $(cat "mp4fps.fps") -add "h264_video.h264" -add "aac_audio.aac"#audio:name="LC-AAC Stereo" -itags name="source_movie_file.avi":comment="Tagged by Psyk on $(date)" -mpeg4 -new "source_movie_file.avi".mp4  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;The final output will be something like "Source_movie_file.avi.mp4".  You can obviously change these output files and edit the tags.&lt;br /&gt;&lt;br /&gt;Lastly, the cleanup:&lt;br /&gt;&lt;pre style="background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt; rm h264_video.h264  &lt;br /&gt; rm aac_audio.aac  &lt;br /&gt; rm mp4fps.fps  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;To make things easier I put all of these into a very simple shell-script.&lt;br /&gt;&lt;pre style="background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt; mencoder -profile H264ENC "$1" -o "$1".avi  &lt;br /&gt; sleep 2  &lt;br /&gt; mencoder "$1".avi -nosound -ovc copy -of rawvideo -o h264_video.h264  &lt;br /&gt; sleep 2  &lt;br /&gt; MP4Box -aviraw audio "$1".avi -out aac.raw  &lt;br /&gt; sleep 2  &lt;br /&gt; mv aac_audio.raw aac_audio.aac  &lt;br /&gt; mplayer "$1".avi -noconfig all -loop 1 -identify -nosound -vo null -nocache -frames 1 2&amp;gt;/dev/null | grep '^ID_VIDEO_FPS' | tail -n 1 | awk -F= '{print $2}' &amp;gt; mp4fps  &lt;br /&gt; .fps  &lt;br /&gt; MP4Box -fps $(cat "mp4fps.fps") -add "h264_video.h264" -add "aac_audio.aac"#audio:name="LC-AAC Stereo" -itags name="$1":comment="Tagged by lazza on $(date)" -mpeg4  &lt;br /&gt;  -new "$1".mp4  &lt;br /&gt; sleep 2  &lt;br /&gt; rm h264_video.h264  &lt;br /&gt; rm aac_audio.aac  &lt;br /&gt; rm mp4fps.fps  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10379379-8550265133579462984?l=psyklops.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://psyklops.blogspot.com/feeds/8550265133579462984/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://psyklops.blogspot.com/2010/01/update-to-ps3-encoding-using-mencoder.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10379379/posts/default/8550265133579462984'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10379379/posts/default/8550265133579462984'/><link rel='alternate' type='text/html' href='http://psyklops.blogspot.com/2010/01/update-to-ps3-encoding-using-mencoder.html' title='Update to PS3 encoding using mencoder in MP4 format'/><author><name>Psyk</name><uri>http://www.blogger.com/profile/15377630409144936476</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_Y10hQ3VoMFs/SQ5JQXLWZUI/AAAAAAAAAAM/Z6eEP_-MQfA/S220/Adjusted.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10379379.post-2945417843652737941</id><published>2010-01-20T00:31:00.013+11:00</published><updated>2010-01-20T19:06:38.765+11:00</updated><title type='text'>Using Handbrake for conversion</title><content type='html'>&lt;div style="text-align: right;"&gt;&lt;div style="text-align: left;"&gt;I've been playing around with &lt;a href="http://handbrake.fr/"&gt;HandBrake&lt;/a&gt; for a little while now and it's a very good and versatile encoder. &amp;nbsp;One of the reasons I like it so much is that it combines two of my favourite encoders being FFmpeg and Mencoder.&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;One of the more challenging items is adjusting the aspect ratio of your final video.  It requires some understanding of Pixel Aspect Ratio which is different to your standard aspect ratio.  I won't go into detail here, but basically to change your video format from 4:3 to 16:9 you'll need to feed the PAR parameters.&lt;br /&gt;&lt;br /&gt;Here are the rough PAR specs on standard DVD's.&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;NTSC 4:3 - storage resolution 720 x 480,PAR 8/9 - display resolution 640 x 480 (= 4:3 aspect ratio)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;NTSC 16:9 - storage resolution 720 x 480,PAR 32/27 - display resolution 853 x 480 (= 16:9 aspect ratio)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;PAL 4:3 - storage resolution 720 x 576,PAR 16/15 - display resolution 768 x 576 (= 4:3 aspect ratio)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;PAL 16:9 - storage resolution 720 x 576,PAR 64/45 - display resolution 1024 x 576 (= 16:9 aspect ratio)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Under HandBrake I've been using the preset settings for doing the encode and they're working well.  Here's a list of the preset settings as per 0.94 of Handbrake:&lt;br /&gt;&lt;pre style="background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt; Apple:  &lt;br /&gt; Universal: -e x264 -q 20.0 -a 1,1 -E faac,ac3 -B 160,160 -6 dpl2,auto -R 48,Auto -D 0.0,0.0 -f mp4 -X 720 --loose-anamorphic -m -x cabac=0:ref=2:me=umh:bframes=0:8x8dct=0:trellis=0:subme=6  &lt;br /&gt; iPod: -e x264 -b 700 -a 1 -E faac -B 160 -6 dpl2 -R 48 -D 0.0 -f mp4 -I -X 320 -m -x level=30:bframes=0:cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1:subme=6:8x8dct=0:trellis=0  &lt;br /&gt; iPhone &amp;amp; iPod Touch: -e x264 -q 20.0 -a 1 -E faac -B 128 -6 dpl2 -R 48 -D 0.0 -f mp4 -X 480 -m -x cabac=0:ref=2:me=umh:bframes=0:subme=6:8x8dct=0:trellis=0  &lt;br /&gt;  AppleTV: -e x264 -q 20.0 -a 1,1 -E faac,ac3 -B 160,160 -6 dpl2,auto -R 48,Auto -D 0.0,0.0 -f mp4 -4 -X 960 --loose-anamorphic -m -x cabac=0:ref=2:me=umh:b-adapt=2:weightb=0:trellis=0:weightp=0  &lt;br /&gt; ----  &lt;br /&gt; Regular  &lt;br /&gt; Normal: -e x264 -q 20.0 -a 1 -E faac -B 160 -6 dpl2 -R 48 -D 0.0 -f mp4 --strict-anamorphic -m -x ref=2:bframes=2:subme=6:mixed-refs=0:weightb=0:8x8dct=0:trellis=0  &lt;br /&gt; High Profile: -e x264 -q 20.0 -a 1,1 -E faac,ac3 -B 160,160 -6 dpl2,auto -R 48,Auto -D 0.0,0.0 -f mp4 --detelecine --decomb --loose-anamorphic -m -x b-adapt=2:rc-lookahead=50  &lt;br /&gt; ----  &lt;br /&gt; Legacy  &lt;br /&gt; Classic: -b 1000 -a 1 -E faac -B 160 -6 dpl2 -R 48 -D 0.0 -f mp4  &lt;br /&gt; AppleTV Legacy: -e x264 -b 2500 -a 1,1 -E faac,ac3 -B 160,160 -6 dpl2,auto -R 48,Auto -D 0.0,0.0 -f mp4 -4 --strict-anamorphic -m -x ref=1:subme=5:me=umh:no-fast-pskip=1:cabac=0:weightb=0:8x8dct=0:trellis=0  &lt;br /&gt; iPhone Legacy: -e x264 -b 960 -a 1 -E faac -B 128 -6 dpl2 -R 48 -D 0.0 -f mp4 -I -X 480 -m -x level=30:cabac=0:ref=1:analyse=all:me=umh:no-fast-pskip=1:psy-rd=0,0:bframes=0:subme=6:8x8dct=0:trellis=0  &lt;br /&gt; iPod Legacy: -e x264 -b 1500 -a 1 -E faac -B 160 -6 dpl2 -R 48 -D 0.0 -f mp4 -I -X 640 -m -x level=30:bframes=0:cabac=0:ref=1:vbv-maxrate=1500:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1:psy-rd=0,0:subme=6:8x8dct=0:trellis=0  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;The Normal and High-Profile settings should work just find on a PS3.&lt;br /&gt;&lt;br /&gt;As an example, here are the details on a source DVD I'm encoding for the kids:&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;+ title 1:&lt;/li&gt;&lt;li&gt;+ vts 0, ttn 0, cells 0-&amp;gt;0 (0 blocks)&lt;/li&gt;&lt;li&gt;+ angle(s) 0&lt;/li&gt;&lt;li&gt;+ duration: 00:39:46&lt;/li&gt;&lt;li&gt;+ size: 720x576, pixel aspect: 16/15, display aspect: 1.33, 25.000 fps&lt;/li&gt;&lt;li&gt;+ autocrop: 0/0/12/6&lt;/li&gt;&lt;li&gt;+ chapters:&lt;/li&gt;&lt;li&gt;+ 1: cells 0-&amp;gt;0, 0 blocks, duration 00:39:46&lt;/li&gt;&lt;li&gt;+ audio tracks:&lt;/li&gt;&lt;li&gt;+ 1, Unknown (AC3) (2.0 ch) (iso639-2: und), 48000Hz, 224000bps&lt;/li&gt;&lt;li&gt;+ subtitle tracks:&lt;/li&gt;&lt;li&gt;+ combing detected, may be interlaced or telecined&lt;/li&gt;&lt;/ul&gt;The aspect is 4:3 with a pixel aspect of 16/15.&lt;br /&gt;&lt;br /&gt;Another way to pick up the aspect and Pixel Aspect Ratio (PAR) parameters is to use FFmpeg. &lt;br /&gt;For example, you could do something like &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;ffmpeg -i movie.vob&lt;/span&gt; :&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"&gt;&lt;code&gt;&lt;br /&gt;&lt;br /&gt;$ffmpeg -i movie.vob &amp;nbsp;&lt;br /&gt;&amp;nbsp;Seems stream 0 codec frame rate differs from container frame rate: 59.94 (60000/1001) -&amp;amp;gt; 29.97 (30000/1001) &lt;br /&gt;&amp;nbsp;Input #0, mpeg, from 'mvoie.vob': &lt;br /&gt;&amp;nbsp;&amp;nbsp;Duration: 00:03:08.18, start: 0.060000, bitrate: 6939 kb/s &lt;br /&gt;&amp;nbsp;&amp;nbsp; Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x480 [PAR 8:9 DAR 4:3], 8000 kb/s, 29.97 tbr, 90k tbn, 59.94 tbc &lt;br /&gt;&amp;nbsp;&amp;nbsp; Stream #0.1[0xa0]: Audio: pcm_s16be, 48000 Hz, stereo, s16, 1536 kb/s &lt;br /&gt;&amp;nbsp;At least one output file must be specified &lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;You'll note the PAR is 8:9 and DAR is 4:3 which matches an NTSC DVD as per above. &amp;nbsp;Applying a&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;--pixel-aspect 32:27&lt;/span&gt; in Handbrake would change this to a Widescreen format.&lt;br /&gt;&lt;br /&gt;By using HandBrake I was able to re-encode to a compliant MP4 with the correct wide-screen aspect display.  The size of the file was slightly larger and the resolution increased slightly from 720x576 (or 704 with cropping) to 1001x576 (with cropping) in Widescreen format.  Very handy tool this HandBrake :) &lt;br /&gt;&lt;br /&gt;Here's the command I used:&lt;br /&gt;&lt;pre style="background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt; HandBrakeCLI -v -i source.avi -o target.mp4 --deinterlace --size 700 -e x264 -a 1 -E faac -B 160 -6 dpl2 -R 48 -D 0.0 -f mp4 --custom-anamorphic --pixel-aspect 64:45 -m -x ref=2:bframes=2:subme=6:mixed-refs=0:weightb=0:8x8dct=0:trellis=0   &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10379379-2945417843652737941?l=psyklops.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://psyklops.blogspot.com/feeds/2945417843652737941/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://psyklops.blogspot.com/2010/01/using-handbrake-for-conversion.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10379379/posts/default/2945417843652737941'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10379379/posts/default/2945417843652737941'/><link rel='alternate' type='text/html' href='http://psyklops.blogspot.com/2010/01/using-handbrake-for-conversion.html' title='Using Handbrake for conversion'/><author><name>Psyk</name><uri>http://www.blogger.com/profile/15377630409144936476</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_Y10hQ3VoMFs/SQ5JQXLWZUI/AAAAAAAAAAM/Z6eEP_-MQfA/S220/Adjusted.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10379379.post-3674315451718524694</id><published>2010-01-01T10:27:00.001+11:00</published><updated>2010-01-18T00:08:36.165+11:00</updated><title type='text'>Ripping audio from video files with mplayer</title><content type='html'>Here's a quick fire way to get that sound clip, soundtrack or whatever it is into an audio format from a video file.  For example, on youtube, there might be a good video clip with a great soundtrack, and the video is nothing more than just a fixed image and/or you want to stick on your iPod/iPhone etc.  Or you might want to get an audio sample for use in a ring tone etc.&lt;br /&gt;&lt;br /&gt;Below is a script that I use to rip audio files out of pretty much any video.  &lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; #!/bin/bash  &lt;br /&gt; echo "Ripping audio......."   &lt;br /&gt; mplayer -nocorrect-pts -vo null -vc null -ao pcm:fast:file=audiodump.wav "$1"   &lt;br /&gt; normalize -v audiodump.wav   &lt;br /&gt; faac -b 256 -c 48000 --mpeg-vers 4 -o audiodump.aac audiodump.wav  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;The first line uses mplayer to dump the audio to a standard wav file called "audiodump.wav".  The "-nocorrect-pts" corrects errors in some certain video files.&lt;br /&gt;&lt;br /&gt;I then normalize the audio file via the "normalize" command (make sure you have the normalize package installed).&lt;br /&gt;&lt;br /&gt;It's then encoded into AAC format using faac.  You could easily do an mp3 here by using lame.  For example, change the line starting with faac to something like:&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;&lt;br /&gt;lame --preset extreme audiodump.wav audiodump.mp3&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10379379-3674315451718524694?l=psyklops.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://psyklops.blogspot.com/feeds/3674315451718524694/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://psyklops.blogspot.com/2010/01/ripping-audio-from-video-files-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10379379/posts/default/3674315451718524694'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10379379/posts/default/3674315451718524694'/><link rel='alternate' type='text/html' href='http://psyklops.blogspot.com/2010/01/ripping-audio-from-video-files-with.html' title='Ripping audio from video files with mplayer'/><author><name>Psyk</name><uri>http://www.blogger.com/profile/15377630409144936476</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_Y10hQ3VoMFs/SQ5JQXLWZUI/AAAAAAAAAAM/Z6eEP_-MQfA/S220/Adjusted.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10379379.post-2617830872371024998</id><published>2009-11-08T22:31:00.006+11:00</published><updated>2010-01-18T00:09:51.298+11:00</updated><title type='text'>Creating animated GIFS with mplayer</title><content type='html'>Looking for a quick fire way to create an animated GIF from sections of video's I didn't need to look any further than the multimedia swiss-army knife of the linux world, mplayer/mencoder and ffmpeg.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;mplayer -ao null -loop 0 -ss 0:11:22 -endpos 5 file.avi&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;First is to playback the video and find the section you want.  Tweak the "-ss" parameter to find the starting point and the "-endpos" for the finishing point of your video clip.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; mplayer file.avi -ao null -ss 0:11:22 -endpos 5 -vo gif89a:fps=25:output=animated.gif -aspect 16/9 -vf scale=-2:100  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Use mplayer again to write out the animated GIF file. Adjust the "scale" parameter to adjust the size of the animated GIF which is useful if you're going to use it as a signature for web forum etc.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10379379-2617830872371024998?l=psyklops.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://psyklops.blogspot.com/feeds/2617830872371024998/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://psyklops.blogspot.com/2009/11/creating-animated-gifs-with-mplayer.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10379379/posts/default/2617830872371024998'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10379379/posts/default/2617830872371024998'/><link rel='alternate' type='text/html' href='http://psyklops.blogspot.com/2009/11/creating-animated-gifs-with-mplayer.html' title='Creating animated GIFS with mplayer'/><author><name>Psyk</name><uri>http://www.blogger.com/profile/15377630409144936476</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_Y10hQ3VoMFs/SQ5JQXLWZUI/AAAAAAAAAAM/Z6eEP_-MQfA/S220/Adjusted.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10379379.post-8925894288381611535</id><published>2009-08-12T21:04:00.011+10:00</published><updated>2010-01-18T00:11:55.016+11:00</updated><title type='text'>Encoding for the PS3, and potentially other MP4 compatible devices</title><content type='html'>Playing around with encoding settings for playback on the PS3 led to alot of trial and error and tweaking.  It seems to be easier to find a way on how "not" to do it than how to do it as there's so many utilities and tools out there.&lt;br /&gt;&lt;br /&gt;I stuck with mencoder/mplayer as I've used it over the years and extremely comfortable with how it behaves and works.  The only real challenge is that it can't really mux properly into an MP4 container that other devices can properly read (i.e. it can read it's own 'corrupted' MP4 but nothing else can!).  If that's mencoder's only blemish on an otherwise powerful video encoding tool, then that's really nothing at all.  &lt;br /&gt;&lt;br /&gt;So the process is to use mencoder, faac for some additional flexibility in bitrates, normalize for levelling out the audio and then MP4Box to mux it all together into a universally compliant MP4 container.&lt;br /&gt;&lt;br /&gt;If you're running Fedora, you'll need to install these applications as follows:&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;yum install mplayer mencoder gpac normalize faac&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Firstly, create edit your ~/.mplayer/mencoder.conf and add the following:&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; [PS3]  &lt;br /&gt; vf=pullup,softskip,pp=fd,scale=:-10,hqdn3d,harddup  &lt;br /&gt; ovc=x264=yes   &lt;br /&gt; x264encopts=level_idc=41:crf=18:bframes=16:b_pyramid=yes:partitions=all:threads=auto:frameref=4:mixed_refs=yes:weight_b=yes  &lt;br /&gt; oac=pcm=yes  &lt;br /&gt; of=rawvideo=yes  &lt;br /&gt; sws=9  &lt;br /&gt; aspect=16/9  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Then create a file called "enc-to-ps3.sh" in your favourite editer (e.g. gedit).  This will be the executable filename and you can choose any name you like. &lt;br /&gt;&lt;br /&gt;Add the following lines:&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;mplayer -fps 29.97 -nocorrect-pts -vo null -vc null -ao pcm:fast:waveheader:file="$1"_temp.wav "$1" &amp;&amp; \&lt;br /&gt;normalize -a 0.5 -v "$1"_temp.wav &amp;&amp; \&lt;br /&gt;faac -b 256 -c 48000 --mpeg-vers 4 -o "$1"_temp.aac "$1"_temp.wav &amp;&amp; \&lt;br /&gt;mencoder -profile PS3 "$1" -ofps 29.97 -o "$1"_temp.264 &amp;&amp; \&lt;br /&gt;MP4Box -fps 29.97 -add "$1"_temp.264 -add "$1"_temp.aac "$1".mp4 &amp;&amp; \&lt;br /&gt;rm "$1"_temp.wav &amp;&amp; \&lt;br /&gt;rm "$1"_temp.264 &amp;&amp; \&lt;br /&gt;rm "$1"_temp.aac &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Make "enc-to-ps3.sh" executable by running:&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;chmod +x enc-to-ps3.sh&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;So what does it do?&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;mplayer -vc null -vo null -ao pcm:fast:waveheader:file=temp_&amp;quot;$1&amp;quot;_temp.wav &amp;quot;$1&amp;quot; &amp;amp;&amp;amp; \&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;This line rips the audio from your video track and writes it out to a wave file.  The name of the 'temp' file is your original file prefixed and suffixed with "temp" for easy identification. &lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;normalize -v temp_&amp;quot;$1&amp;quot;_temp.wav &amp;amp;&amp;amp; \&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Quickly normalize the audio to prevent clipping and clean up the sound.  I have a lot of clips where the audio is too load/soft and this helps adjust that.&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;faac -b 256 -c 48000 --mpeg-vers 4 --tns -o temp_&amp;quot;$1&amp;quot;_temp.aac temp_&amp;quot;$1&amp;quot;_temp.wav &amp;amp;&amp;amp; \&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;This line encodes the resulting normalized WAV audio file into AAC at 256kb bitrate.&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;mencoder -profile PS3 &amp;quot;$1&amp;quot; -o temp_&amp;quot;$1&amp;quot;_temp.264 &amp;amp;&amp;amp; \&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Mencoder is used here to encode the original video using the profile settings we created earlier.  This is the lengthiest piece of the encoding process depending on your source, so grab a coffee and come back in a little while.  The output is a raw h.264 (x264) stream.&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;MP4Box -add temp_&amp;quot;$1&amp;quot;_temp.264 -add temp_&amp;quot;$1&amp;quot;_temp.aac &amp;quot;$1&amp;quot;.mp4 &amp;amp;&amp;amp; \&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Using MP4Box from the gpac utilities, the resulting h.264 stream and AAC audio file are then muxed together into an MP4 file using the detected frame rate of the original video to keep things in sync.&lt;br /&gt;&lt;br /&gt;And then your done.  &lt;br /&gt;&lt;br /&gt;Usage is as easy as:&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;enc-to-ps3.sh &amp;lt;name_of_video&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The resulting file should be playable on the PS3...&lt;br /&gt;&lt;br /&gt;The script is quite rudimentary, but the basis of keeping it like this allows understanding of the process and then empower you to tweak settings if you so desire.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10379379-8925894288381611535?l=psyklops.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://psyklops.blogspot.com/feeds/8925894288381611535/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://psyklops.blogspot.com/2009/08/encoding-for-ps3-and-potentially-other.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10379379/posts/default/8925894288381611535'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10379379/posts/default/8925894288381611535'/><link rel='alternate' type='text/html' href='http://psyklops.blogspot.com/2009/08/encoding-for-ps3-and-potentially-other.html' title='Encoding for the PS3, and potentially other MP4 compatible devices'/><author><name>Psyk</name><uri>http://www.blogger.com/profile/15377630409144936476</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_Y10hQ3VoMFs/SQ5JQXLWZUI/AAAAAAAAAAM/Z6eEP_-MQfA/S220/Adjusted.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10379379.post-7911528961547242555</id><published>2009-02-10T23:12:00.010+11:00</published><updated>2009-02-11T08:04:01.776+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mkv linux encoding h.264 x264 mencoder'/><title type='text'>Windows Media Centre, Linux and .mkv files</title><content type='html'>I've been running Vista MCE for sometime now and while it's doing the job, I would've really liked to be running Mythdora... That'll be a project for another time.&lt;br /&gt;&lt;br /&gt;In any case, I'm running &lt;a href="http://www.free-codecs.com/download/FFDShow.htm"&gt;ffdshow&lt;/a&gt; and the &lt;a href="http://haali.cs.msu.ru/mkv/"&gt;haali splitter&lt;/a&gt;.  Haali is used to handle the MKV's (Matroska) and MP4's whereas ffdshow will pretty much handle any other format including Divx/XviD and anything else.  As a result it's really all you need to prevent serious 'codec-hell' in Windows.&lt;br /&gt;&lt;br /&gt;First and foremost, a lot of the credit needs to go to this &lt;a href="http://ubuntuforums.org/showthread.php?t=273635"&gt;UbuntuForums thread&lt;/a&gt; where the original poster walks through a process of ripping DVD's to MKV format.  &lt;br /&gt;&lt;br /&gt;Also, the following method is an alternative to my &lt;a href="http://psyklops.blogspot.com/2008/11/encoding-to-h264x264-with-mencoder-and.html"&gt;previous post &lt;/a&gt;in regards to encoding dvr-ms files into MP4 containers for PS3 compatible playback.&lt;br /&gt;&lt;br /&gt;If you want to automate things and not really worry about tweaking or understanding the process (which will lend itself to allow you to tweak), then you can use something like &lt;a href="http://fixounet.free.fr/avidemux/"&gt;avidemux&lt;/a&gt;. &lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_Y10hQ3VoMFs/SZFyJO0F6iI/AAAAAAAAACg/4QvShf_Oq1U/s1600-h/Screenshot-t_fightnightr4_vga08_v2_h264.mov+-+Avidemux.png"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 320px; height: 208px;" src="http://1.bp.blogspot.com/_Y10hQ3VoMFs/SZFyJO0F6iI/AAAAAAAAACg/4QvShf_Oq1U/s320/Screenshot-t_fightnightr4_vga08_v2_h264.mov+-+Avidemux.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5301143739312761378" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;However, I like tweaking and tinkering with the settings and understanding the process, so the manual method described in the Ubuntu link works for me. &lt;br /&gt;&lt;br /&gt;One of the things I do, is use a different set of parameters for the H264/x264 encode in addition to using AAC encoded audio as opposed to ogg.  Here is the 'to-mkv' profile entry in my ~/.mplayer/mencoder.conf&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;[to-mkv]&lt;br /&gt;profile-desc=&amp;quot;        Makes a x264 raw video stream for muxing into MKV&amp;quot;&lt;br /&gt;lavdopts=threads=2&lt;br /&gt;ovc=x264=yes &lt;br /&gt;x264encopts=keyint_min=24:keyint=240:crf=18:qp_min=5:qp_max=51:qcomp=0.75:me=umh:subq=6:frameref=6:bframes=3:ip_factor=1.25:&lt;br /&gt;pb_factor=1.33:deblock=-1,-1:nopsnr:b_pyramid=yes:brdo=yes:weight_b=yes:mixed_refs=yes:bime=yes:chroma_me=yes:partitions=all&lt;br /&gt;:trellis=1:8x8dct=yes:threads=auto&lt;br /&gt;oac=copy=yes&lt;br /&gt;of=rawvideo=yes&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The resulting mencoder command is:&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;$mencoder -profile to-mkv -vf scale=720:-10,harddup &amp;lt;video_source&amp;gt; -o &amp;lt;output_video&amp;gt;.264&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;The above command outputs only a raw h.264 video format with no audio. I'm asking it to convert "video_source" into a DVD scaled (720x576/480 etc.) h.264 "output_video".264.  The ".264" extension helps identify it as a raw h.264 video and is of very good quality depending on your source.  In my case they're usually TV recorded hi-def channels of 1920x1080 MPG format and AC3 audio.&lt;br /&gt;&lt;br /&gt;Mux the .264 file into an MP4 container (the mkv utilities handles the mp4 format a little better):&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;$MP4Box -add output_video.264 output_video.mp4&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;If you haven't already separated the audio from the video, then you'll need to do that. Once done, normalize the audio file by doing:&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;$normalize audio.wav&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Once you have separated and normalized the audio, encode to AAC format with the following:&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;$faac audio.wav -o audio.aac&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Once you have the MP4 and AAC files you can use the &lt;a href="http://www.bunkus.org/videotools/mkvtoolnix/index.html"&gt;mkv gui tools&lt;/a&gt; to mux them all into the Matroska (MKV) container.  You can start the gui utility by running:&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;$mmg&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;...and that's all there is too it in creating mkv files in linux.  I deliberately left out a lot of detail and only high-lighted some of the key points in the process in doing it as a lot of it is documented elsewhere.&lt;br /&gt;&lt;br /&gt;Refer to the Ubuntuforums page for more detail: &lt;a href="http://ubuntuforums.org/showthread.php?t=273635"&gt;http://ubuntuforums.org/showthread.php?t=273635&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10379379-7911528961547242555?l=psyklops.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://psyklops.blogspot.com/feeds/7911528961547242555/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://psyklops.blogspot.com/2009/02/windows-media-centre-linux-and-mkv.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10379379/posts/default/7911528961547242555'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10379379/posts/default/7911528961547242555'/><link rel='alternate' type='text/html' href='http://psyklops.blogspot.com/2009/02/windows-media-centre-linux-and-mkv.html' title='Windows Media Centre, Linux and .mkv files'/><author><name>Psyk</name><uri>http://www.blogger.com/profile/15377630409144936476</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_Y10hQ3VoMFs/SQ5JQXLWZUI/AAAAAAAAAAM/Z6eEP_-MQfA/S220/Adjusted.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_Y10hQ3VoMFs/SZFyJO0F6iI/AAAAAAAAACg/4QvShf_Oq1U/s72-c/Screenshot-t_fightnightr4_vga08_v2_h264.mov+-+Avidemux.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10379379.post-6408791757487535176</id><published>2009-02-01T14:03:00.003+11:00</published><updated>2009-09-13T10:32:51.111+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='avi joining mencoder'/><title type='text'>Joining AVI files together</title><content type='html'>Here's a simple way to join two AVI files together.  The AVI's should be the same in regards to type (i.e. XvID/DivX, audio bitrate etc.):&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;&lt;br /&gt;$cat movie1.avi movie2.avi movie3.avi &gt; movie_temp.avi&lt;br /&gt;$mencoder -forceidx -ovc copy -oac copy movie_temp.avi -o movie_final.avi&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10379379-6408791757487535176?l=psyklops.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://psyklops.blogspot.com/feeds/6408791757487535176/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://psyklops.blogspot.com/2009/02/joining-avi-files-together.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10379379/posts/default/6408791757487535176'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10379379/posts/default/6408791757487535176'/><link rel='alternate' type='text/html' href='http://psyklops.blogspot.com/2009/02/joining-avi-files-together.html' title='Joining AVI files together'/><author><name>Psyk</name><uri>http://www.blogger.com/profile/15377630409144936476</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_Y10hQ3VoMFs/SQ5JQXLWZUI/AAAAAAAAAAM/Z6eEP_-MQfA/S220/Adjusted.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10379379.post-1439358822899508513</id><published>2009-01-25T16:28:00.026+11:00</published><updated>2010-01-01T10:08:42.757+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='truecrypt gpg encryption'/><title type='text'>Protecting ones data on removable drives</title><content type='html'>With large capacity drives and USB sticks getting cheaper for more capacity, the tendency to carry more and more around with you increases.  With so much information being digitzed, losing a USB-key or a small passport sized backup USB drive would be akin to losing your wallet, keys and credit cards...&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;Truecrypt&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_Y10hQ3VoMFs/SXv9yisTOfI/AAAAAAAAABQ/3_ONg5djW2Y/s1600-h/Screenshot-TrueCrypt.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px; height: 256px;" src="http://3.bp.blogspot.com/_Y10hQ3VoMFs/SXv9yisTOfI/AAAAAAAAABQ/3_ONg5djW2Y/s320/Screenshot-TrueCrypt.jpg" alt="" id="BLOGGER_PHOTO_ID_5295104831652051442" border="0" /&gt;&lt;/a&gt;I've been looking at &lt;a href="http://www.truecrypt.org/"&gt;Truecrypt&lt;/a&gt; which is an open-source encryption application which can encrypt entire partitions, drives and/or create a virtual drive as a file on an existing file-system.  It has a rich set of encryption algorithms and can also chain them together.  For example, it can chain AES256 (Rijndael), Twofish and Serpent the latter two being finalists for AES encryption standard.  There's plenty of information out there on the strengths of these ciphers, so I won't go into detail here...&lt;br /&gt;&lt;br /&gt;However, if you are interested, you can read NIST's entire 116 page &lt;a href="http://csrc.nist.gov/archive/aes/round2/r2report.pdf"&gt;report&lt;/a&gt; on the AES encryption round and their decisions to choose Rijndael.  In summary &lt;span style="font-weight: bold;"&gt;none have any known security attacks let alone cracked&lt;/span&gt; (it would've never made it this far if it had been cracked before :) ). The strength testing they used was on purposely weakened versions of the algorithms - and usually provided by the team themselves.  Twofish and Serpent came out slightly stronger in the 'weakend' versions submitted for analysis, but didn't fare so well in things like implementation (i.e. smartcards, memory footprint for asic implementation etc.).&lt;br /&gt;&lt;br /&gt;Unfortunately, Truecrypt only comes with packages ready for SuSE and Ubuntu, however the source is available for download.&lt;br /&gt;&lt;br /&gt;A guide is available here if you want to build and compile it yourself.&lt;br /&gt;&lt;a href="http://arbitness.blogspot.com/2008/07/installing-truecrypt-on-fedora-9-howto.html"&gt;http://arbitness.blogspot.com/2008/07/installing-truecrypt-on-fedora-9-howto.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;There's good information here as well:&lt;br /&gt;&lt;a href="http://penguinenclave.blogspot.com/2008/12/truecrypt-61-install-guide-for-fedora.html"&gt;http://penguinenclave.blogspot.com/2008/12/truecrypt-61-install-guide-for-fedora.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;However, what is nice is that there are binaries for Fedora available from here: &lt;br /&gt;&lt;a href="http://www.lfarkas.org/linux/packages/fedora/9/"&gt;http://www.lfarkas.org/linux/packages/fedora/9/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Since I run Fedora 9 x86_64 version, there was no binary, so I downloaded the srpm file from here:&lt;br /&gt;&lt;a href="http://www.lfarkas.org/linux/packages/fedora/9/SRPMS/"&gt;http://www.lfarkas.org/linux/packages/fedora/9/SRPMS/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The basic process for building it from SRPM is as follows:&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;&lt;br /&gt;cd ~/rpmbuild/SRPMS&lt;br /&gt;&lt;br /&gt;wget -c http://www.lfarkas.org/linux/packages/fedora/9/SRPMS/truecrypt-6.1-1.fc9.src.rpm&lt;br /&gt;&lt;br /&gt;rpmbuild --rebuild truecrypt-6.1-1.fc9.src.rpm&lt;br /&gt;&lt;br /&gt;cd ~/rpmbuild/RPMS/x86_64/&lt;br /&gt;&lt;br /&gt;su -c&amp;quot;rpm -Uvh truecrypt-6.1-1.fc9.src.rpm&amp;quot;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Truecrypt is easy to use.  Once it's up and running it has a gui for mounting encrypted volumes and for creating them.  Refer to the &lt;a href="http://www.truecrypt.org/docs/"&gt;documentation&lt;/a&gt; at Truecrypts website.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;PGP and GnuPG &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Finally the other method I use is &lt;a href="http://www.pgpi.org/"&gt;PGP&lt;/a&gt; or the linux implementation of it called &lt;a href="http://www.gnupg.org/"&gt;GPG&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I've primarily been looking GPG to do symmetric cipher encryption on a single file, which basically asks for a passphrase prior to encryption.  You just then need the passphrase to decrypt the file.  Not as a secure as using public/private key encryption of course...&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;gpg -v --cipher-algo TWOFISH --symmetric --output &amp;lt;encrypted file&amp;gt; &amp;lt;name of file you want encrypted&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;GPG defaults to '&lt;a href="http://en.wikipedia.org/wiki/CAST-128"&gt;CAST5&lt;/a&gt;' (or CAST-128) so I've forced it to use &lt;a href="http://en.wikipedia.org/wiki/Twofish"&gt;TWOFISH&lt;/a&gt; in this implementation.  GPG supports a few ciphers, and you can check what's available on your system by running 'gpg --version'.&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;$ gpg --version&lt;br /&gt;gpg (GnuPG) 1.4.9&lt;br /&gt;Copyright (C) 2008 Free Software Foundation, Inc.&lt;br /&gt;License GPLv3+: GNU GPL version 3 or later &amp;lt;http://gnu.org/licenses/gpl.html&amp;gt;&lt;br /&gt;This is free software: you are free to change and redistribute it.&lt;br /&gt;There is NO WARRANTY, to the extent permitted by law.&lt;br /&gt;&lt;br /&gt;Home: ~/.gnupg&lt;br /&gt;Supported algorithms:&lt;br /&gt;Pubkey: RSA, RSA-E, RSA-S, ELG-E, DSA&lt;br /&gt;Cipher: 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH&lt;br /&gt;Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224&lt;br /&gt;Compression: Uncompressed, ZIP, ZLIB, BZIP2&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;The best method to modify the cipher algorithm to use is to modify the ~/.gnupg/gpg.conf file and add the following items at the end.  Modifying the 'personal-cipher-preferences' option as shown defaults TWOFISH as the cipher to use first.&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;personal-cipher-preferences TWOFISH AES256 AES192 AES BLOWFISH CAST5 3DES&lt;br /&gt;personal-digest-preferences SHA256 SHA1 SHA512 SHA384 SHA224 RIPEMD160 MD5&lt;br /&gt;personal-compress-preferences ZIP ZLIB BZIP2 Z0  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;You probably don't need to adjust the digest-preferences unless you're wanting to use it with private/public keys etc.&lt;br /&gt;&lt;br /&gt;To decrypt you would just type:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;gpg &amp;lt;name of encrypted file&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;If you want to encrypt multiple files, it's a lot easier to zip or tar them and then encrypt the final compressed file.&lt;br /&gt;&lt;br /&gt;Windows users can use the win32 implementation of GnuPG available from here:&lt;br /&gt;&lt;a href="http://www.pgpi.org/download/gnupg/"&gt;http://www.pgpi.org/download/gnupg/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;A GUI front-end to GPG  called WinPT is available from here:&lt;br /&gt;&lt;a href="http://winpt.gnupt.de/int/"&gt;http://winpt.gnupt.de/int/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Otherwise PGP is compatible.&lt;br /&gt;&lt;a href="http://www.pgp.com/downloads/desktoptrial/desktoptrial2.html#trial_or_freeware"&gt;http://www.pgp.com/downloads/desktoptrial/desktoptrial2.html#trial_or_freeware&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Quick update, Truecrypt is now available in Fedora 11 called Realcrypt from the rpmfusion repositories.  Make sure you have rpmfusion enabled and then install via yum.&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;&lt;br /&gt;yum install realcrypt&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10379379-1439358822899508513?l=psyklops.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://psyklops.blogspot.com/feeds/1439358822899508513/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://psyklops.blogspot.com/2009/01/protecting-ones-data-on-removable.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10379379/posts/default/1439358822899508513'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10379379/posts/default/1439358822899508513'/><link rel='alternate' type='text/html' href='http://psyklops.blogspot.com/2009/01/protecting-ones-data-on-removable.html' title='Protecting ones data on removable drives'/><author><name>Psyk</name><uri>http://www.blogger.com/profile/15377630409144936476</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_Y10hQ3VoMFs/SQ5JQXLWZUI/AAAAAAAAAAM/Z6eEP_-MQfA/S220/Adjusted.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_Y10hQ3VoMFs/SXv9yisTOfI/AAAAAAAAABQ/3_ONg5djW2Y/s72-c/Screenshot-TrueCrypt.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10379379.post-4034170969521554057</id><published>2009-01-07T00:02:00.010+11:00</published><updated>2009-02-10T12:10:58.992+11:00</updated><title type='text'>Mediatomb and the PS3 with mencoder</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_Y10hQ3VoMFs/SYPABz4J52I/AAAAAAAAABw/Ybwuys_Ue44/s1600-h/Screenshot-MEDIATOMB+-+Mozilla+Firefox.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 161px;" src="http://2.bp.blogspot.com/_Y10hQ3VoMFs/SYPABz4J52I/AAAAAAAAABw/Ybwuys_Ue44/s320/Screenshot-MEDIATOMB+-+Mozilla+Firefox.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5297288724055975778" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;After some mucking around, I'm successfully streaming from my Fedora/Linux PC to the PS3 over wireless.&lt;br /&gt;&lt;br /&gt;A great guide to get this going is from the mediatomb website and more specifically the transcoding section:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://mediatomb.cc/dokuwiki/transcoding:transcoding"&gt;http://mediatomb.cc/dokuwiki/transcoding:transcoding&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Take note to adjust your config.xml.&lt;br /&gt;&lt;br /&gt;The site describes using ffmpeg and/or VLC as the transcoding engine, but I've always liked mencoder as I'm more familiar with it and have a lot of profiles defined already in ~/.mplayer/mencoder.conf.&lt;br /&gt;&lt;br /&gt;In regards to the mediatomb config.xml file (located at ~/.mediatomb/config.xml), like with most things, it needs to be heavily customised.  I have a stack of AVI's that aren't in DivX/XviD format (which is what mediatomb tells the PS3 by default) and I have some AVI files which ffmpeg borks on...  however, mencoder works very well on all these files.  As a result, I transcode everything rather than pass the DivX/XviD to the PS3 - and surprisingly it streams well over wireless.&lt;br /&gt;&lt;br /&gt;So here's the "~/bin/mencoder-tr" script I use that mediatomb calls to transcode the video's from the PC to a format the PS3 can understand.  In this case I'm transcoding to a DVD compliant MPEG2 stream and AC3 audio in 720x576 format:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;exec mencoder \&lt;br /&gt;-oac lavc -ovc lavc \&lt;br /&gt;-of mpeg \&lt;br /&gt;-mpegopts format=dvd:tsaf \&lt;br /&gt;-vf softskip,scale=720:576,hqdn3d,harddup \&lt;br /&gt;-srate 48000 \&lt;br /&gt;-af lavcresample=48000:volnorm=2 \&lt;br /&gt;-ofps 25 \&lt;br /&gt;-lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=5120:vstrict=0:keyint=15:vbitrate=5120:acodec=ac3:abitrate=192:autoaspect \&lt;br /&gt;"$1" -o "$2"&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;The "$1" and "$2" designations are mediatomb specific...&lt;br /&gt;&lt;br /&gt;Lastly, I have the following "transcoding" section in my "~/.mediatomb/config.xml" file:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&amp;lt;transcoding enabled="yes"&amp;gt;&lt;br /&gt;   &amp;lt;mimetype-profile-mappings&amp;gt; &lt;br /&gt;     &amp;lt;transcode mimetype="audio/mpeg" using="vlcwav"/&amp;gt;   &lt;br /&gt;     &amp;lt;transcode mimetype="video/x-flv" using="transvideo"/&amp;gt;&lt;br /&gt;     &amp;lt;transcode mimetype="video/mp4" using="transvideo"/&amp;gt;&lt;br /&gt;     &amp;lt;transcode mimetype="video/x-quicktime" using="transvideo"/&amp;gt;&lt;br /&gt;     &amp;lt;transcode mimetype="application/ogg" using="vlcwav"/&amp;gt;&lt;br /&gt;     &amp;lt;transcode mimetype="audio/x-ms-wma" using="vlcwav"/&amp;gt;&lt;br /&gt;     &amp;lt;transcode mimetype="audio/x-ms-asf" using="vlcwav"/&amp;gt;&lt;br /&gt;     &amp;lt;transcode mimetype="audio/x-flac" using="ffmpegwav"/&amp;gt;&lt;br /&gt;     &amp;lt;transcode mimetype="audio/x-aac" using="vlcwav"/&amp;gt;&lt;br /&gt;     &amp;lt;transcode mimetype="audio/mp4" using="vlcwav"/&amp;gt;&lt;br /&gt;     &amp;lt;transcode mimetype="video/x-msvideo" using="transvideo"/&amp;gt;&lt;br /&gt;     &amp;lt;transcode mimetype="video/x-ms-wmv" using="transvideo"/&amp;gt;&lt;br /&gt;     &amp;lt;transcode mimetype="video/mpeg" using="mpeg2trans"/&amp;gt;&lt;br /&gt;     &amp;lt;transcode mimetype="video/x-matroska" using="transvideo"/&amp;gt;&lt;br /&gt;     &amp;lt;transcode mimetype="image/jpeg" using="rescalejpeg"/&amp;gt;&lt;br /&gt;   &amp;lt;/mimetype-profile-mappings&amp;gt;&lt;br /&gt;   &amp;lt;profiles&amp;gt;&lt;br /&gt;     &amp;lt;profile name="transvideo" enabled="yes" type="external"&amp;gt;&lt;br /&gt;       &amp;lt;mimetype&amp;gt;video/mpeg&amp;lt;/mimetype&amp;gt;&lt;br /&gt;       &amp;lt;accept-url&amp;gt;no&amp;lt;/accept-url&amp;gt;&lt;br /&gt;       &amp;lt;first-resource&amp;gt;yes&amp;lt;/first-resource&amp;gt;&lt;br /&gt;       &amp;lt;agent command="mencoder-tr" arguments="%in %out"/&amp;gt;&lt;br /&gt;       &amp;lt;buffer size="10485760" chunk-size="262144" fill-size="524288"/&amp;gt;&lt;br /&gt;     &amp;lt;/profile&amp;gt;&lt;br /&gt;     &amp;lt;profile name="mpeg2trans" enabled="yes" type="external"&amp;gt;&lt;br /&gt;       &amp;lt;mimetype&amp;gt;video/mpeg&amp;lt;/mimetype&amp;gt;&lt;br /&gt;       &amp;lt;accept-url&amp;gt;no&amp;lt;/accept-url&amp;gt;&lt;br /&gt;       &amp;lt;first-resource&amp;gt;yes&amp;lt;/first-resource&amp;gt;&lt;br /&gt;       &amp;lt;hide-original-resource&amp;gt;yes&amp;lt;/hide-original-resource&amp;gt;&lt;br /&gt;       &amp;lt;agent command="mencoder-tr" arguments="%in %out"/&amp;gt;&lt;br /&gt;       &amp;lt;buffer size="28800000" chunk-size="512000" fill-size="120000"/&amp;gt;&lt;br /&gt;     &amp;lt;/profile&amp;gt;&lt;br /&gt;     &amp;lt;profile name="ffmpegwav" enabled="yes" type="external"&amp;gt;&lt;br /&gt;       &amp;lt;use-chunked-encoding&amp;gt;no&amp;lt;/use-chunked-encoding&amp;gt;&lt;br /&gt;       &amp;lt;mimetype&amp;gt;audio/wav&amp;lt;/mimetype&amp;gt;&lt;br /&gt;       &amp;lt;accept-url&amp;gt;no&amp;lt;/accept-url&amp;gt;&lt;br /&gt;       &amp;lt;first-resource&amp;gt;yes&amp;lt;/first-resource&amp;gt;&lt;br /&gt;       &amp;lt;agent command="ffmpegaudio" arguments="%in %out"/&amp;gt;&lt;br /&gt;       &amp;lt;buffer size="1048576" chunk-size="131072" fill-size="262144"/&amp;gt;&lt;br /&gt;     &amp;lt;/profile&amp;gt;&lt;br /&gt;     &amp;lt;profile name="vlcwav" enabled="yes" type="external"&amp;gt;&lt;br /&gt;   &amp;lt;use-chunked-encoding&amp;gt;no&amp;lt;/use-chunked-encoding&amp;gt;&lt;br /&gt;       &amp;lt;mimetype&amp;gt;audio/wav&amp;lt;/mimetype&amp;gt;&lt;br /&gt;       &amp;lt;accept-url&amp;gt;yes&amp;lt;/accept-url&amp;gt;&lt;br /&gt;       &amp;lt;first-resource&amp;gt;yes&amp;lt;/first-resource&amp;gt;&lt;br /&gt;       &amp;lt;agent command="vlc" arguments="-I dummy %in --sout #transcode{acodec=s16l,ab=192,channels=2}:standard{access=file,mux=wav,dst=%out} vlc:quit"/&amp;gt;&lt;br /&gt;       &amp;lt;buffer size="512000" chunk-size="32000" fill-size="64000"/&amp;gt;&lt;br /&gt;     &amp;lt;/profile&amp;gt;&lt;br /&gt;     &amp;lt;profile name="rescalejpeg" enabled="yes" type="external"&amp;gt;&lt;br /&gt;       &amp;lt;mimetype&amp;gt;image/jpeg&amp;lt;/mimetype&amp;gt;&lt;br /&gt;       &amp;lt;accept-url&amp;gt;no&amp;lt;/accept-url&amp;gt;&lt;br /&gt;       &amp;lt;first-resource&amp;gt;yes&amp;lt;/first-resource&amp;gt;&lt;br /&gt;       &amp;lt;accept-ogg-theora&amp;gt;no&amp;lt;/accept-ogg-theora&amp;gt;&lt;br /&gt;       &amp;lt;agent command="convert" arguments="-size 1080x720 %in -auto-orient -resize 1080x720 +profile '*' %out"/&amp;gt;&lt;br /&gt;       &amp;lt;buffer size="50000" chunk-size="100" fill-size="100"/&amp;gt;&lt;br /&gt;     &amp;lt;/profile&amp;gt;&lt;br /&gt;    &amp;lt;/profiles&amp;gt;&lt;br /&gt;&amp;lt;/transcoding&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Note the "mencoder-tr" entries that allows mediatomb to execute the required script to perform the transcoding.&lt;br /&gt;&lt;br /&gt;The advantage of this method means that using mencoder's engine it can read pretty much any format and convert to any format, in this case a standard DVD mpeg stream.&lt;br /&gt;&lt;br /&gt;As requested, here is my entire ~/.mediatomb/config.xml&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;&amp;lt;config version=&amp;quot;1&amp;quot; xmlns=&amp;quot;http://mediatomb.cc/config/1&amp;quot; xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot; xsi:schemaLocation=&amp;quot;http://mediatomb.cc/config/1 http://mediatomb.cc/config/1.xsd&amp;quot;&amp;gt;&lt;br /&gt;  &amp;lt;server&amp;gt;&lt;br /&gt;    &amp;lt;ui enabled=&amp;quot;yes&amp;quot;&amp;gt;&lt;br /&gt;      &amp;lt;accounts enabled=&amp;quot;no&amp;quot; session-timeout=&amp;quot;30&amp;quot;&amp;gt;&lt;br /&gt;        &amp;lt;account user=&amp;quot;mediatomb&amp;quot; password=&amp;quot;mediatomb&amp;quot;/&amp;gt;&lt;br /&gt;      &amp;lt;/accounts&amp;gt;&lt;br /&gt;    &amp;lt;/ui&amp;gt;&lt;br /&gt;    &amp;lt;name&amp;gt;MediaTomb&amp;lt;/name&amp;gt;&lt;span style="font-weight:bold;"&gt;&lt;span style="font-style:italic;"&gt;&lt;br /&gt;    &amp;lt;udn&amp;gt;uuid:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&amp;lt;/udn&amp;gt;&lt;br /&gt;    &amp;lt;home&amp;gt;/home/xxxxxxxxxxxxx&amp;lt;/home&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;    &amp;lt;webroot&amp;gt;/usr/share/mediatomb/web&amp;lt;/webroot&amp;gt;&lt;br /&gt;    &amp;lt;storage&amp;gt;&lt;br /&gt;      &amp;lt;sqlite3 enabled=&amp;quot;yes&amp;quot;&amp;gt;&lt;br /&gt;        &amp;lt;database-file&amp;gt;mediatomb.db&amp;lt;/database-file&amp;gt;&lt;br /&gt;      &amp;lt;/sqlite3&amp;gt;&lt;br /&gt;      &amp;lt;mysql enabled=&amp;quot;no&amp;quot;&amp;gt;&lt;br /&gt;        &amp;lt;host&amp;gt;localhost&amp;lt;/host&amp;gt;&lt;br /&gt;        &amp;lt;username&amp;gt;mediatomb&amp;lt;/username&amp;gt;&lt;br /&gt;        &amp;lt;database&amp;gt;mediatomb&amp;lt;/database&amp;gt;&lt;br /&gt;      &amp;lt;/mysql&amp;gt;&lt;br /&gt;    &amp;lt;/storage&amp;gt;&lt;br /&gt;    &amp;lt;protocolInfo extend=&amp;quot;yes&amp;quot;/&amp;gt;&lt;br /&gt;  &amp;lt;/server&amp;gt;&lt;br /&gt;  &amp;lt;import hidden-files=&amp;quot;no&amp;quot;&amp;gt;&lt;br /&gt;    &amp;lt;scripting script-charset=&amp;quot;UTF-8&amp;quot;&amp;gt;&lt;br /&gt;      &amp;lt;common-script&amp;gt;/usr/share/mediatomb/js/common.js&amp;lt;/common-script&amp;gt;&lt;br /&gt;      &amp;lt;playlist-script&amp;gt;/usr/share/mediatomb/js/playlists.js&amp;lt;/playlist-script&amp;gt;&lt;br /&gt;      &amp;lt;virtual-layout type=&amp;quot;builtin&amp;quot;&amp;gt;&lt;br /&gt;        &amp;lt;import-script&amp;gt;/usr/share/mediatomb/js/import.js&amp;lt;/import-script&amp;gt;&lt;br /&gt;      &amp;lt;/virtual-layout&amp;gt;&lt;br /&gt;    &amp;lt;/scripting&amp;gt;&lt;br /&gt;    &amp;lt;mappings&amp;gt;&lt;br /&gt;      &amp;lt;extension-mimetype ignore-unknown=&amp;quot;no&amp;quot;&amp;gt;&lt;br /&gt;        &amp;lt;map from=&amp;quot;mp3&amp;quot; to=&amp;quot;audio/mpeg&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;map from=&amp;quot;ogg&amp;quot; to=&amp;quot;application/ogg&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;map from=&amp;quot;asf&amp;quot; to=&amp;quot;video/x-ms-asf&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;map from=&amp;quot;asx&amp;quot; to=&amp;quot;video/x-ms-asf&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;map from=&amp;quot;wma&amp;quot; to=&amp;quot;audio/x-ms-wma&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;map from=&amp;quot;wax&amp;quot; to=&amp;quot;audio/x-ms-wax&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;map from=&amp;quot;wmv&amp;quot; to=&amp;quot;video/x-ms-wmv&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;map from=&amp;quot;wvx&amp;quot; to=&amp;quot;video/x-ms-wvx&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;map from=&amp;quot;wm&amp;quot; to=&amp;quot;video/x-ms-wm&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;map from=&amp;quot;wmx&amp;quot; to=&amp;quot;video/x-ms-wmx&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;map from=&amp;quot;m3u&amp;quot; to=&amp;quot;audio/x-mpegurl&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;map from=&amp;quot;pls&amp;quot; to=&amp;quot;audio/x-scpls&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;map from=&amp;quot;ts&amp;quot; to=&amp;quot;video/mpeg&amp;quot;/&amp;gt;&lt;br /&gt;    &amp;lt;map from=&amp;quot;vob&amp;quot; to=&amp;quot;video/mpeg&amp;quot;/&amp;gt;&lt;br /&gt;    &amp;lt;map from=&amp;quot;wav&amp;quot; to=&amp;quot;audio/wav&amp;quot;/&amp;gt;&lt;br /&gt;    &amp;lt;map from=&amp;quot;mpg&amp;quot; to=&amp;quot;video/mpeg&amp;quot;/&amp;gt;&lt;br /&gt;    &amp;lt;map from=&amp;quot;aac&amp;quot; to=&amp;quot;audio/x-aac&amp;quot;/&amp;gt;&lt;br /&gt;    &amp;lt;map from=&amp;quot;m4a&amp;quot; to=&amp;quot;audio/mp4&amp;quot;/&amp;gt;&lt;br /&gt;    &amp;lt;map from=&amp;quot;mkv&amp;quot; to=&amp;quot;video/x-matroska&amp;quot;/&amp;gt;&lt;br /&gt;    &amp;lt;map from=&amp;quot;mov&amp;quot; to=&amp;quot;video/x-quicktime&amp;quot;/&amp;gt; &lt;br /&gt;    &amp;lt;map from=&amp;quot;flv&amp;quot; to=&amp;quot;video/x-flv&amp;quot;/&amp;gt;&lt;br /&gt;    &amp;lt;map from=&amp;quot;divx&amp;quot; to=&amp;quot;video/x-divx&amp;quot;/&amp;gt;&lt;br /&gt;      &amp;lt;/extension-mimetype&amp;gt;&lt;br /&gt;      &amp;lt;mimetype-upnpclass&amp;gt;&lt;br /&gt;        &amp;lt;map from=&amp;quot;audio/*&amp;quot; to=&amp;quot;object.item.audioItem.musicTrack&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;map from=&amp;quot;video/*&amp;quot; to=&amp;quot;object.item.videoItem&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;map from=&amp;quot;image/*&amp;quot; to=&amp;quot;object.item.imageItem&amp;quot;/&amp;gt;&lt;br /&gt;      &amp;lt;/mimetype-upnpclass&amp;gt;&lt;br /&gt;      &amp;lt;mimetype-contenttype&amp;gt;&lt;br /&gt;        &amp;lt;treat mimetype=&amp;quot;audio/mpeg&amp;quot; as=&amp;quot;mp3&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;treat mimetype=&amp;quot;application/ogg&amp;quot; as=&amp;quot;ogg&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;treat mimetype=&amp;quot;audio/x-flac&amp;quot; as=&amp;quot;flac&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;treat mimetype=&amp;quot;image/jpeg&amp;quot; as=&amp;quot;jpg&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;treat mimetype=&amp;quot;audio/x-mpegurl&amp;quot; as=&amp;quot;playlist&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;treat mimetype=&amp;quot;audio/x-scpls&amp;quot; as=&amp;quot;playlist&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;treat mimetype=&amp;quot;audio/x-wav&amp;quot; as=&amp;quot;pcm&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;treat mimetype=&amp;quot;audio/L16&amp;quot; as=&amp;quot;pcm&amp;quot;/&amp;gt;&lt;br /&gt;      &amp;lt;/mimetype-contenttype&amp;gt;&lt;br /&gt;    &amp;lt;/mappings&amp;gt;&lt;br /&gt;  &amp;lt;/import&amp;gt;&lt;br /&gt;&amp;lt;transcoding enabled=&amp;quot;yes&amp;quot;&amp;gt;&lt;br /&gt;    &amp;lt;mimetype-profile-mappings&amp;gt;  &lt;br /&gt;      &amp;lt;transcode mimetype=&amp;quot;audio/mpeg&amp;quot; using=&amp;quot;vlcwav&amp;quot;/&amp;gt;    &lt;br /&gt;      &amp;lt;transcode mimetype=&amp;quot;video/x-flv&amp;quot; using=&amp;quot;transvideo&amp;quot;/&amp;gt;&lt;br /&gt;      &amp;lt;transcode mimetype=&amp;quot;video/mp4&amp;quot; using=&amp;quot;transvideo&amp;quot;/&amp;gt;&lt;br /&gt;      &amp;lt;transcode mimetype=&amp;quot;video/x-quicktime&amp;quot; using=&amp;quot;transvideo&amp;quot;/&amp;gt;&lt;br /&gt;      &amp;lt;transcode mimetype=&amp;quot;application/ogg&amp;quot; using=&amp;quot;vlcwav&amp;quot;/&amp;gt;&lt;br /&gt;      &amp;lt;transcode mimetype=&amp;quot;audio/x-ms-wma&amp;quot; using=&amp;quot;vlcwav&amp;quot;/&amp;gt;&lt;br /&gt;      &amp;lt;transcode mimetype=&amp;quot;audio/x-ms-asf&amp;quot; using=&amp;quot;vlcwav&amp;quot;/&amp;gt;&lt;br /&gt;      &amp;lt;transcode mimetype=&amp;quot;audio/x-flac&amp;quot; using=&amp;quot;ffmpegwav&amp;quot;/&amp;gt;&lt;br /&gt;      &amp;lt;transcode mimetype=&amp;quot;audio/x-aac&amp;quot; using=&amp;quot;vlcwav&amp;quot;/&amp;gt;&lt;br /&gt;      &amp;lt;transcode mimetype=&amp;quot;audio/mp4&amp;quot; using=&amp;quot;vlcwav&amp;quot;/&amp;gt;&lt;br /&gt;      &amp;lt;transcode mimetype=&amp;quot;video/x-msvideo&amp;quot; using=&amp;quot;transvideo&amp;quot;/&amp;gt;&lt;br /&gt;      &amp;lt;transcode mimetype=&amp;quot;video/x-ms-wmv&amp;quot; using=&amp;quot;transvideo&amp;quot;/&amp;gt;&lt;br /&gt;      &amp;lt;transcode mimetype=&amp;quot;video/mpeg&amp;quot; using=&amp;quot;mpeg2trans&amp;quot;/&amp;gt;&lt;br /&gt;      &amp;lt;transcode mimetype=&amp;quot;video/x-matroska&amp;quot; using=&amp;quot;transvideo&amp;quot;/&amp;gt;&lt;br /&gt;      &amp;lt;transcode mimetype=&amp;quot;image/jpeg&amp;quot; using=&amp;quot;rescalejpeg&amp;quot;/&amp;gt;&lt;br /&gt;    &amp;lt;/mimetype-profile-mappings&amp;gt;&lt;br /&gt;    &amp;lt;profiles&amp;gt;&lt;br /&gt;      &amp;lt;profile name=&amp;quot;transvideo&amp;quot; enabled=&amp;quot;yes&amp;quot; type=&amp;quot;external&amp;quot;&amp;gt;&lt;br /&gt;        &amp;lt;mimetype&amp;gt;video/mpeg&amp;lt;/mimetype&amp;gt;&lt;br /&gt;        &amp;lt;accept-url&amp;gt;no&amp;lt;/accept-url&amp;gt;&lt;br /&gt;        &amp;lt;first-resource&amp;gt;yes&amp;lt;/first-resource&amp;gt;&lt;br /&gt;        &amp;lt;agent command=&amp;quot;mencoder-tr&amp;quot; arguments=&amp;quot;%in %out&amp;quot;/&amp;gt;&lt;br /&gt;    &amp;lt;buffer size=&amp;quot;10485760&amp;quot; chunk-size=&amp;quot;262144&amp;quot; fill-size=&amp;quot;524288&amp;quot;/&amp;gt;&lt;br /&gt;      &amp;lt;/profile&amp;gt;&lt;br /&gt;      &amp;lt;profile name=&amp;quot;mpeg2trans&amp;quot; enabled=&amp;quot;yes&amp;quot; type=&amp;quot;external&amp;quot;&amp;gt;&lt;br /&gt;        &amp;lt;mimetype&amp;gt;video/mpeg&amp;lt;/mimetype&amp;gt;&lt;br /&gt;        &amp;lt;accept-url&amp;gt;no&amp;lt;/accept-url&amp;gt;&lt;br /&gt;        &amp;lt;first-resource&amp;gt;yes&amp;lt;/first-resource&amp;gt;&lt;br /&gt;        &amp;lt;hide-original-resource&amp;gt;yes&amp;lt;/hide-original-resource&amp;gt;&lt;br /&gt;        &amp;lt;agent command=&amp;quot;mencoder-tr&amp;quot; arguments=&amp;quot;%in %out&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;buffer size=&amp;quot;28800000&amp;quot; chunk-size=&amp;quot;512000&amp;quot; fill-size=&amp;quot;120000&amp;quot;/&amp;gt;&lt;br /&gt;      &amp;lt;/profile&amp;gt;&lt;br /&gt;      &amp;lt;profile name=&amp;quot;ffmpegwav&amp;quot; enabled=&amp;quot;yes&amp;quot; type=&amp;quot;external&amp;quot;&amp;gt;&lt;br /&gt;        &amp;lt;use-chunked-encoding&amp;gt;no&amp;lt;/use-chunked-encoding&amp;gt;&lt;br /&gt;        &amp;lt;mimetype&amp;gt;audio/wav&amp;lt;/mimetype&amp;gt;&lt;br /&gt;        &amp;lt;accept-url&amp;gt;no&amp;lt;/accept-url&amp;gt;&lt;br /&gt;        &amp;lt;first-resource&amp;gt;yes&amp;lt;/first-resource&amp;gt;&lt;br /&gt;        &amp;lt;agent command=&amp;quot;ffmpegaudio&amp;quot; arguments=&amp;quot;%in %out&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;buffer size=&amp;quot;1048576&amp;quot; chunk-size=&amp;quot;131072&amp;quot; fill-size=&amp;quot;262144&amp;quot;/&amp;gt;&lt;br /&gt;      &amp;lt;/profile&amp;gt;&lt;br /&gt;      &amp;lt;profile name=&amp;quot;vlcwav&amp;quot; enabled=&amp;quot;yes&amp;quot; type=&amp;quot;external&amp;quot;&amp;gt;&lt;br /&gt;    &amp;lt;use-chunked-encoding&amp;gt;no&amp;lt;/use-chunked-encoding&amp;gt; &lt;br /&gt;        &amp;lt;mimetype&amp;gt;audio/wav&amp;lt;/mimetype&amp;gt;&lt;br /&gt;        &amp;lt;accept-url&amp;gt;yes&amp;lt;/accept-url&amp;gt;&lt;br /&gt;        &amp;lt;first-resource&amp;gt;yes&amp;lt;/first-resource&amp;gt;&lt;br /&gt;        &amp;lt;agent command=&amp;quot;vlc&amp;quot; arguments=&amp;quot;-I dummy %in --sout #transcode{acodec=s16l,ab=192,channels=2}:standard{access=file,mux=wav,dst=%out} vlc:quit&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;buffer size=&amp;quot;512000&amp;quot; chunk-size=&amp;quot;32000&amp;quot; fill-size=&amp;quot;64000&amp;quot;/&amp;gt;&lt;br /&gt;      &amp;lt;/profile&amp;gt;&lt;br /&gt;      &amp;lt;profile name=&amp;quot;rescalejpeg&amp;quot; enabled=&amp;quot;yes&amp;quot; type=&amp;quot;external&amp;quot;&amp;gt;&lt;br /&gt;        &amp;lt;mimetype&amp;gt;image/jpeg&amp;lt;/mimetype&amp;gt;&lt;br /&gt;        &amp;lt;accept-url&amp;gt;no&amp;lt;/accept-url&amp;gt;&lt;br /&gt;        &amp;lt;first-resource&amp;gt;yes&amp;lt;/first-resource&amp;gt;&lt;br /&gt;        &amp;lt;accept-ogg-theora&amp;gt;no&amp;lt;/accept-ogg-theora&amp;gt;&lt;br /&gt;        &amp;lt;agent command=&amp;quot;convert&amp;quot; arguments=&amp;quot;-size 1080x720 %in -auto-orient -resize 1080x720 +profile '*' %out&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;buffer size=&amp;quot;50000&amp;quot; chunk-size=&amp;quot;100&amp;quot; fill-size=&amp;quot;100&amp;quot;/&amp;gt;&lt;br /&gt;      &amp;lt;/profile&amp;gt;&lt;br /&gt;      &amp;lt;profile name=&amp;quot;vlcyoutube&amp;quot; enabled=&amp;quot;no&amp;quot; type=&amp;quot;external&amp;quot;&amp;gt;&lt;br /&gt;        &amp;lt;mimetype&amp;gt;video/mpeg&amp;lt;/mimetype&amp;gt;&lt;br /&gt;        &amp;lt;accept-url&amp;gt;yes&amp;lt;/accept-url&amp;gt;&lt;br /&gt;        &amp;lt;first-resource&amp;gt;yes&amp;lt;/first-resource&amp;gt;&lt;br /&gt;        &amp;lt;accept-ogg-theora&amp;gt;yes&amp;lt;/accept-ogg-theora&amp;gt;&lt;br /&gt;        &amp;lt;agent command=&amp;quot;vlc&amp;quot; arguments=&amp;quot;-I dummy %in --sout #transcode{vcodec=mp2v,vb=4096,canvas-width=448,canvas-height=252,acodec=mpga,ab=64,samplerate=44100,channels=1}:standard{access=file,mux=ts,dst=%out} vlc:quit&amp;quot;/&amp;gt; &lt;br /&gt;        &amp;lt;buffer size=&amp;quot;14400000&amp;quot; chunk-size=&amp;quot;256000&amp;quot; fill-size=&amp;quot;80000&amp;quot;/&amp;gt;&lt;br /&gt;      &amp;lt;/profile&amp;gt; &lt;br /&gt;    &amp;lt;/profiles&amp;gt;&lt;br /&gt;  &amp;lt;/transcoding&amp;gt;&lt;br /&gt;&amp;lt;/config&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Note the &lt;span style="font-style:italic;"&gt;&lt;span style="font-weight:bold;"&gt;bold and italicized&lt;/span&gt;&lt;/span&gt; regions.  The home designation should be your "/home/(username)/.mediatomb" directory, and the uuid is a unique 32 alpha-numeric string.&lt;br /&gt;&lt;br /&gt;Lastly, my config.xml probably needs a lot of cleaning up also.  I basically heavily modified the one avialable from the &lt;a href="http://mediatomb.cc/dokuwiki/transcoding:transcoding"&gt;mediatomb website&lt;/a&gt; and didn't go and clean it up.  Fo example, I could probably delete the "vlcyoutube" transcoding trigger as I'm using the transvideo one instead.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10379379-4034170969521554057?l=psyklops.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://psyklops.blogspot.com/feeds/4034170969521554057/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://psyklops.blogspot.com/2009/01/mediatomb-and-ps3-with-mencoder.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10379379/posts/default/4034170969521554057'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10379379/posts/default/4034170969521554057'/><link rel='alternate' type='text/html' href='http://psyklops.blogspot.com/2009/01/mediatomb-and-ps3-with-mencoder.html' title='Mediatomb and the PS3 with mencoder'/><author><name>Psyk</name><uri>http://www.blogger.com/profile/15377630409144936476</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_Y10hQ3VoMFs/SQ5JQXLWZUI/AAAAAAAAAAM/Z6eEP_-MQfA/S220/Adjusted.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_Y10hQ3VoMFs/SYPABz4J52I/AAAAAAAAABw/Ybwuys_Ue44/s72-c/Screenshot-MEDIATOMB+-+Mozilla+Firefox.png' height='72' width='72'/><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10379379.post-2099317031694690451</id><published>2008-12-31T10:43:00.003+11:00</published><updated>2008-12-31T10:50:03.544+11:00</updated><title type='text'>Building ffmpeg from SVN</title><content type='html'>A couple of quick notes to build ffmpeg from svn under Fedora.&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;$svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg&lt;br /&gt;$cd ffmpeg&lt;br /&gt;$./configure --prefix=/usr --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --enable-libdc1394 --enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avfilter-lavf --enable-postproc --enable-swscale --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-optimizations --disable-stripping&lt;br /&gt;$make&lt;br /&gt;$su -&lt;br /&gt;Password:&lt;br /&gt;#make install&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;I basically used the same configure parameters (or as close too) as the original rpm packaged fedora build from rpmfusion.  Satisfy the missing library requests if any errors come up after running the 'configure' script.  Typically it will just be installing the 'devel' versions of the package.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10379379-2099317031694690451?l=psyklops.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://psyklops.blogspot.com/feeds/2099317031694690451/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://psyklops.blogspot.com/2008/12/building-ffmpeg-from-svn.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10379379/posts/default/2099317031694690451'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10379379/posts/default/2099317031694690451'/><link rel='alternate' type='text/html' href='http://psyklops.blogspot.com/2008/12/building-ffmpeg-from-svn.html' title='Building ffmpeg from SVN'/><author><name>Psyk</name><uri>http://www.blogger.com/profile/15377630409144936476</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_Y10hQ3VoMFs/SQ5JQXLWZUI/AAAAAAAAAAM/Z6eEP_-MQfA/S220/Adjusted.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10379379.post-7063084568096466485</id><published>2008-11-02T23:25:00.005+11:00</published><updated>2008-11-03T12:54:29.607+11:00</updated><title type='text'>Encoding to h.264/x264 with mencoder and ffmpeg</title><content type='html'>&lt;span style="font-family:arial;"&gt;&lt;/span&gt;Looking at ways to compress and encode movies/videos to a more compact size with minimal noticeable quality loss, led a search to some solid and well developed open source utilities.  I run both Windows (home theatre) and Linux on a separate workstation so an open source solution made it much more flexible to use on both platforms.&lt;br /&gt;&lt;br /&gt;Windows dvr-ms format is an absolute pain.  Don't know why they don't just stick with an open standard like Matroska :)  anyways... &lt;br /&gt;&lt;br /&gt;First things first.  Mencoder etc. has a hard time with DVR-MS files, so strip it using ffmpeg:&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;ffmpeg -y -i movie.dvr-ms -vcodec copy -acodec copy -f dvd movie.mpg&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This extracts the mpg from the dvr-ms file to a more user-friendly format.  Yes you'll lose the metadata information...&lt;br /&gt;&lt;br /&gt;The following mencoder command creates a high quality h264 movie scaled to roughly 720x480 with aac audio (it all needs to be on one line).&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;mencoder -vf pullup,softskip,pp=fd,scale=720:-10,hqdn3d,harddup -lavdopts threads=2 -ovc x264 -x264encopts bitrate=1200:subq=6:frameref=6:qcomp=0.8:8x8dct:b_pyramid:weight_b:me=umh:partitions=p8x8,i4x4:bime:brdo:nodct_decimate:trellis=1:direct_pred=auto:level_idc=30:nocabac:threads=auto -oac faac -faacopts br=128:raw:mpeg=4:tns:object=2 -of lavf -lavfopts format=mp4 -sws 9 -ofps 24000/1001 -srate 48000 -alang en movie.mpg -o movie.mp4&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Rather than typing all that out, you can use mencoder's "-profile" parameter by creating a mencoder.conf file in &lt;code&gt;~/.mplayer/mencoder.conf&lt;/code&gt; with the following contents:&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;[h264mp4]&lt;br /&gt;profile-desc=&amp;quot;H.264 MP4&amp;quot;&lt;br /&gt;vf=pullup,softskip,pp=fd,scale=720:-10,hqdn3d,harddup&lt;br /&gt;lavdopts=threads=2&lt;br /&gt;ovc=x264=yes&lt;br /&gt;x264encopts=bitrate=1200:subq=6:frameref=6:qcomp=0.8:8x8dct=yes:b_pyramid=yes:weight_b=yes:me=umh:partitions=p8x8,i4x4:bime=yes:brdo=yes:nodct_dec&lt;br /&gt;imate=yes:trellis=1:direct_pred=auto:level_idc=30:nocabac=yes:threads=auto&lt;br /&gt;oac=faac=yes&lt;br /&gt;faacopts=br=128:raw=yes:mpeg=4:tns=yes:object=2&lt;br /&gt;of=lavf=yes&lt;br /&gt;lavfopts=format=mp4&lt;br /&gt;sws=9&lt;br /&gt;ofps=24000/1001&lt;br /&gt;srate=48000&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;In which case you can then run :&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;mencoder -profile h264mp4 movie.mpg -o movie.mp4&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This creates a h.264 video stream and an aac encoded audio stream perfect for muxing into an MP4 container.  Unfortunately mencoder's MP4 muxing is a little broken and will more than likely not play correctly in anything other than mplayer.&lt;br /&gt;&lt;br /&gt;To mux it back into a more compliant MP4 format, run ffmpeg again:&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;ffmpeg -y -i movie.mp4 -vcodec copy -acodec copy movie-remuxed.mp4&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Make sure you use a different name for the mp4 output from ffmpeg above so you don't overwrite the original input file.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10379379-7063084568096466485?l=psyklops.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://psyklops.blogspot.com/feeds/7063084568096466485/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://psyklops.blogspot.com/2008/11/encoding-to-h264x264-with-mencoder-and.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10379379/posts/default/7063084568096466485'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10379379/posts/default/7063084568096466485'/><link rel='alternate' type='text/html' href='http://psyklops.blogspot.com/2008/11/encoding-to-h264x264-with-mencoder-and.html' title='Encoding to h.264/x264 with mencoder and ffmpeg'/><author><name>Psyk</name><uri>http://www.blogger.com/profile/15377630409144936476</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://4.bp.blogspot.com/_Y10hQ3VoMFs/SQ5JQXLWZUI/AAAAAAAAAAM/Z6eEP_-MQfA/S220/Adjusted.jpg'/></author><thr:total>1</thr:total></entry></feed>
