<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>ffmpeg &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://en.wordpress.com/tag/ffmpeg/</link>
	<description>Feed of posts on WordPress.com tagged "ffmpeg"</description>
	<pubDate>Sun, 27 Dec 2009 03:44:56 +0000</pubDate>

	<generator>http://en.wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[DVDs to iPod with OpenBSD]]></title>
<link>http://unixandbeer.wordpress.com/2009/12/23/dvds-to-ipod-with-openbsd/</link>
<pubDate>Thu, 24 Dec 2009 03:46:56 +0000</pubDate>
<dc:creator>unixandbeer</dc:creator>
<guid>http://unixandbeer.wordpress.com/2009/12/23/dvds-to-ipod-with-openbsd/</guid>
<description><![CDATA[I wanted to put DVDs on my 1st generation video iPod using OpenBSD but soon found out it wasn&#8217;]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I wanted to put DVDs on my 1st generation video iPod using OpenBSD but soon found out it wasn&#8217;t so easy.  This took a bit of lrn2internet so I thought I&#8217;d share.  </p>
<p>I&#8217;m sure there&#8217;s other ways of doing this, but my way is only two commands, albeit with a shitload of arguments, and you could even put it in a script if you wanted to.</p>
<p>For this you will need <b>mencoder</b> and <b>ffmpeg</b>.  Then type in the following:</p>
<p><b>$ mencoder dvd://1 -vf scale=320:240 -o output.avi -oac copy -ovc lavc -lavcopts vcodec=libx264</p>
<p>$ ffmpeg -i output.avi -acodec libfaac -ab 128kb -ac 2 -vcodec mpeg4 -b 1200kb -ar 44100 -mbd 2 -flags +4mv -trellis 2 -aic 2 -cmp 2 -subcmp 2 -s 320&#215;180 -title &#8220;Title of Movie&#8221; -f ipod output.m4v</b></p>
<p>After that just stick output.m4v on the iPod manually or use iTunes.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Append videos with ffmpeg]]></title>
<link>http://pookito.wordpress.com/2009/12/17/append-videos-with-ffmpeg/</link>
<pubDate>Thu, 17 Dec 2009 02:28:21 +0000</pubDate>
<dc:creator>pookito</dc:creator>
<guid>http://pookito.wordpress.com/2009/12/17/append-videos-with-ffmpeg/</guid>
<description><![CDATA[At this moment I just append a couple of videos files using ffmpeg command. I think there is such a ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>At this moment I just append a couple of videos files using ffmpeg command. I think there is such a freedom of using free and open source software. I was able append a couple of videos that were in an mp4 container with x264 video codec and mp3 audio codec. The two files were appended and the codecs were transform into free and open source formats. Isn&#8217;t that nice. You can do the same. I download them from the you tube since it was devided in 10 minutes each one. If you would like to append any video files you will have to use the following command:</p>
<blockquote><p>ffmpeg -i input.file -i secondinput.file -i asmanyinputfileasyoulike.file -vcodec libtheora -acodec vorbis outputfile.ogv</p>
</blockquote>
<p>For audio and Video Bittrate you can always you can use the -V 600kb and -A 128kb or any other value that you want.  This is everything you need to have for video files in a free and opensource way, you can redistribute the video file.  <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />   Isn&#8217;t this nice.  <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />
<p>=-=-=-=-=<br /><i>Powered by <b><a href='http://bilbo.gnufolks.org/'>Bilbo Blogger</a></b></i></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Ffmpeg and Linux]]></title>
<link>http://pookito.wordpress.com/2009/12/15/ffmpeg-and-linux/</link>
<pubDate>Tue, 15 Dec 2009 00:03:03 +0000</pubDate>
<dc:creator>pookito</dc:creator>
<guid>http://pookito.wordpress.com/2009/12/15/ffmpeg-and-linux/</guid>
<description><![CDATA[For a while I have been searching for a tool that would allow me to encode movies in Linux. I knew a]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>For a while I have been searching for a tool that would allow me to encode movies in Linux. I knew about ffmpeg but I was a little upset with Ubuntu because the ffmpeg application was not compiled to function with none free codecs. Those codecs might be: x264, mp3 among others codecs and containers like MP4. </p>
<p>Well the good news is that in Linux we do not need all those containers and Junk. I discover, and I know this is not new, that it is good enough with Theora/Vorbis. I know that there are other GUI tools to do all the encoding, but for some reason, I am happy enough with he fact that I can use a tool like ffmpeg to do the job of free and open source software. I got to tell you, it is neat and fast. Here is the command that I would use to encode any file into Theora/Vorbis video file: <strong>ffmpeg -i input.file -vcodec libtheora -ac 2 -acodec vorbis output.ogv</strong></p>
<p>It is this simple. For more information you can always &#8220;man ffmpeg&#8221; command and learn more about it. One last thing, I usually like to rip the audio of any videos to put it on my Personal Media Player (PMP) and I would need to rip the audio and put it in Vorbis or OGG format. If you want to do that the command is: <strong>ffmpeg -i input.file -vn -ac 2 -acodec vorbis output.ogg</strong></p>
<p>This should work. The reason why I am writing this is because the community is always giving me so much, this is just a way for me to give back to the community. </p>
<p>Until later. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>Pookito</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Burn subtitles from MKV to AVI to 3GP]]></title>
<link>http://ourlinux.wordpress.com/2009/12/10/hardcode-burn-subtitles-from-mkv-to-avi-to-3gp/</link>
<pubDate>Thu, 10 Dec 2009 08:02:27 +0000</pubDate>
<dc:creator>tanclo</dc:creator>
<guid>http://ourlinux.wordpress.com/2009/12/10/hardcode-burn-subtitles-from-mkv-to-avi-to-3gp/</guid>
<description><![CDATA[INPUT: Embedded vobsub in MKV container (h264/AAC) OUTPUT: Hardcoded &#8220;burned-in&#8221; subs in]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>INPUT: Embedded vobsub in MKV container (h264/AAC)<br />
OUTPUT: Hardcoded &#8220;burned-in&#8221; subs in AVI container</p>
<p>The Input = movie_x264_aac.MKV from DVD by OGMRip ver. 0.13.2  <em>or</em> K9Copy then OGMRip* (note below)<br />
Output = movie_libavcodec_mp3lame.AVI by mencoder/ffmpeg, thusly:</p>
<p>The easiest way is to navigate to the folder where your input file is saved, then open a terminal. If you already followed the guide here, then your life will be simple.<a href="http://ourlinux.wordpress.com/2009/12/10/add-feature-to-nautilus-to-open-terminal-in-current-folder/">guide link</a></p>
<p>You can also change the input option in the command below, to explicitly point to the location of the input file and output file in the commands below, eg &#8220;~/Videos/DVD_T1 &#8211; multisubs &#8211; x264 aac.mkv&#8221; (include the &#8220;commas if there are spaces in the file name&#8221;). In this case, it would not matter where your terminal is active.</p>
<p>If you have the script installed now, open a terminal and enter this (this assume you have installed the software in my Post-install guide)..</p>
<div style="background-color:#cccccc;">mencoder &#8216;DVD_T1 &#8211; multisubs &#8211; x264 aac.mkv&#8217; -slang kor -spualign 2 -subpos 96 -o DVD_T1_KOR.avi -oac mp3lame -ovc lavc -lavcopts vbitrate=700</div>
<p>Now you can convert the movie.hardcoded.subs_lang.AVI to a 3GP. I use ffmpeg which is ver y easy and allows one to cue the jobs right away. I was able to get fully AAC enable ffmpeg with ease in Mandriva 2010.0. Check my December 2009 post-install part 3. Make sure you have those essential packages, and then install the correct WinFF.rpm. <a href="http://www.rpmfind.net/linux/RPM/">Try rpmfind</a>. Just make sure you have the package that fits your installation/architecture the best eg. winff-1.1.1-1mdv2010.1.i586.rpm or &#8220;x86_64&#8243;</p>
<p>I found these links and others useful in solving this problem&#8230;<br />
Ubuntu Forum &#8211; Burning subs (<a href="http://ubuntuforums.org/showthread.php?t=1155877">forum link</a>)<br />
Taiabati Linux Goodies (<a href="http://www.taiabati.com/linux/video-for-meizu.html">read more</a>)<br />
Check out my.del.icio.us bookmarks with the tag mencoder</p>
<p>*OGMRip User Manual (<a href="http://ogmrip.sourceforge.net/en/manual.html">user manual link</a>) and Sourceforge.net (<a href="http://sourceforge.net/projects/ogmrip/support">support link</a>)</p>
<div class="wp-caption alignleft" style="width: 210px"><a href="http://ogmrip.sourceforge.net/en/manual.html"><img title=" Uncheck the &#34;Automatic Compressibility Check&#34;" src="http://ogmrip.sourceforge.net/en/shots/ogmrip-options-small.png" alt="OGMRip snapshot" width="200" height="178" /></a><p class="wp-caption-text">OGMRip User Manual Snapshot</p></div>
<p><em>When using OGMRip, to avert the indefinite stalling during encoding (<a href="http://sourceforge.net/projects/ogmrip/forums/forum/258034/topic/3407466">user issue note</a>), unchecked the Automatic Compressibility Check</em> (the last pane of the GUI, before hitting &#8220;Extract&#8221;). I found a &#8216;log file&#8217; in my rip data folder that grew to a ridiculous size as a result of this stalling. b-frames and automatic compressibility was recently included into the software and may not work reliably. We await OGMRip version 0.13.3 for fixes.</p>
<p>As an example, my custom profile settings in OGMRip are::<br />
Ctrl+f to open &#8220;Edit Profiles&#8221; pane<br />
Select &#8220;PC, Low Quality&#8221; and &#8220;Copy&#8221;<br />
Select Copy of PC, Low Quality and &#8220;Edit&#8221;<br />
General tab &#8211; Format, MKV &#38;  FourCC, FFMpeg<br />
Video tab &#8211; Codec, X264 &#38; Quality, Normal<br />
Audio tab &#8211; AAC &#38; 24000Hz<br />
Subtitles tab &#8211; Codec, VobSub</p>
<p>You can Rename this profile to<br />
Custom <strong>PC, Low Quality</strong><br />
1-pass, 1&#215;700MB (MKV + x264 + AAC)</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[ffmpeg Unknown encoder 'libmp3lame']]></title>
<link>http://lembra.wordpress.com/2009/12/04/ffmpeg-unknown-encoder-libmp3lame/</link>
<pubDate>Fri, 04 Dec 2009 11:24:01 +0000</pubDate>
<dc:creator>Eduardo</dc:creator>
<guid>http://lembra.wordpress.com/2009/12/04/ffmpeg-unknown-encoder-libmp3lame/</guid>
<description><![CDATA[I was trying to convert a .flv file to mp3 when using the command ffmpeg -i video.flv -acodec libmp3]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p style="text-align:left;">I was trying to convert a .flv file to mp3 when using the command <em>ffmpeg -i video.flv -acodec libmp3lame -ab 196k -ac 2 -ar 44100 audio.mp3 </em>came up with <em>Unknown encoder &#8216;libmp3lame&#8217;</em>. It was because I did not install the ffmpeg from source and in the binary the <em>&#8211;enable-libmp3lame</em> was not defined. Ps.: To see what options are enabled just <em>ffmpeg &#8211;help</em></p>
<p style="text-align:left;">To solve this problem I did the following:</p>
<ul>
<li>Installed the libmp3lame from source: <em>wget http://easynews.dl.sourceforge.net/sourceforge/lame/lame-3.97.tar.gz; tar -xvf lame-3.97.tar.gz; cd lame-3.97;./configure; sudo make &#38;&#38; make install</em></li>
<li>Removed the pre-compiled ffmpeg installation: <em>apt-get remove ffmpeg</em></li>
<li>Downloaded its source: <em>svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg</em></li>
<li>Installed the source setting the &#8211;enable-libmp3lame option up: <em>sudo ./configure &#8211;enable-libmp3lame</em>; <em>sudo make &#38;&#38; make install</em></li>
<li>And<em> ffmpeg -i video.flv -acodec libmp3lame -ab 192k -ac 2 -ar 44100 audio.mp3</em> command should works properly</li>
</ul>
<div id="_mcePaste" style="overflow:hidden;position:absolute;left:-10000px;top:81px;width:1px;height:1px;"><em>ffmpeg -i video.flv -acodec libmp3lame -ab 196k -ac 2 -ar 44100 audio.mp3</em></div>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Extract a keyframe from a video with FFMpeg]]></title>
<link>http://kr3l.wordpress.com/2009/12/03/extract-a-keyframe-from-a-video-with-ffmpeg/</link>
<pubDate>Thu, 03 Dec 2009 21:07:52 +0000</pubDate>
<dc:creator>Karel</dc:creator>
<guid>http://kr3l.wordpress.com/2009/12/03/extract-a-keyframe-from-a-video-with-ffmpeg/</guid>
<description><![CDATA[If you want to extract a particular frame from a video, you can use the following ffmpeg command: ff]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>If you want to extract a particular frame from a video, you can use the following ffmpeg command:</p>
<pre>ffmpeg -i INPUTPATH -vframes 1 -ss TIMESTAMP -f image2 -vcodec mjpeg OUTPUTPATH.jpg</pre>
<p>where TIMESTAMP is in the format hh:mm:ss.ff</p>
<p>If you have the frame number instead of the timestamp, you can use the following Ruby script to convert the frame number to the timestamp (for a framerate of 25fps) &#8211; there&#8217;s probably a better way for formatting a number to have two digits though <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> :</p>
<pre>def self.profile_thumbnail(frame_nr = nil)
#calculate timestamp
begin
  if frame_nr.nil?
    framenr = 25*60*2
  else
    framenr = frame_nr.to_i
  end

rescue
  framenr = 25*60*2
end

uur = (framenr/(60*60*25))
min = ((framenr-uur*60*60*25)/(60*25))
sec = ((framenr-uur*60*60*25-min*60*25)/25)
frame = ((framenr-uur*60*60*25-min*60*25-sec*25))
uur_s = uur.to_s
if uur&#60;10
  uur_s = '0'+uur_s
end
min_s = min.to_s
if min&#60;10
  min_s = '0'+min_s
end
sec_s = sec.to_s
if sec&#60;10
  sec_s='0'+sec_s
end
frame_s = frame.to_s
if frame&#60;10
  frame_s = '00'+frame_s
elsif frame&#60;100
  frame_s = '0'+frame_s
end

stamp = uur_s+':'+min_s+':'+sec_s+'.'+frame_s
return  ' -vframes 1 -ss '+stamp+' -f image2 -vcodec mjpeg '

end</pre>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Job Hunt?]]></title>
<link>http://tallerthanmidgets.wordpress.com/2009/12/01/job-hunt/</link>
<pubDate>Tue, 01 Dec 2009 23:38:10 +0000</pubDate>
<dc:creator>pkcs11</dc:creator>
<guid>http://tallerthanmidgets.wordpress.com/2009/12/01/job-hunt/</guid>
<description><![CDATA[I have a pretty stable job. I work an actual job and I also have a fellowship at a local university.]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I have a pretty stable job. I work an actual job and I also have a fellowship at a local university. The fellowship doesn&#8217;t pay at all nor does it offer benefits. My paying job does both, but after carefully weighing and measuring the cost of health care my work provides it was quickly determined that it was lacking.</p>
<p>(450/month for two people with a 1,200$ deductible, the weighing and measuring didn&#8217;t take long at all)</p>
<p>I humbled myself and asked my boss if the company would kindly allow me to add my wife (who is pregnant) and subsidize part of the costs. I figured it would be a great way to make up for the fact that I&#8217;m grossly underpaid for a post-doc mathematician doing tech work.</p>
<p>To my surprise, I was surprised to be denied. I was pretty pissed and frankly I still am.</p>
<p>To put this into perspective, we make ~100 dollars per month too much to qualify for government assistance yet couldn&#8217;t conceive of being able to afford 450/month for what amounts to the most wretched coverage known to man-kind. Add on top of this the fact that I can&#8217;t cover my wife with personal insurance because pregnancy is considered a pre-existing condition.</p>
<p>It&#8217;s moments like this that make it so obvious that we need health care reform badly in the US.</p>
<p>To come full circle, I almost have no choice but to seek a new position elsewhere. Which is painful for me because I love what I do. I mostly love the fact that I don&#8217;t have much to worry about. I manage roughly 20 servers, the most critical of which are 3 VoIP servers.</p>
<p>So while I burn an immense amount of mental stress at the university, I get to mentally unwind at work. Even though I find myself using Swarm Theory to project sales and revenue numbers, it&#8217;s far easier than doing so for human behavior.</p>
<p>If anyone wants to pick up a loyal, hard-working post-doc techie for cheap (heavily subsidized health insurance + base salary), let me know!</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[FFmpeg]]></title>
<link>http://nowardev.wordpress.com/2009/11/30/ffmpeg/</link>
<pubDate>Mon, 30 Nov 2009 20:07:58 +0000</pubDate>
<dc:creator>nowardev</dc:creator>
<guid>http://nowardev.wordpress.com/2009/11/30/ffmpeg/</guid>
<description><![CDATA[HOW TO TEST YOUR FFMPEG FFmpeg handles a lots of formats but only if you install it correctly let’s ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p style="text-align:center;">HOW TO TEST YOUR FFMPEG</p>
<p>FFmpeg handles a lots of formats but only if you install it correctly <strong>let’s go to test it</strong></p>
<p>Type in a terminal :</p>
<blockquote>
<pre>ffmpeg -formats 2&#62;&#38;1 &#124; grep aac</pre>
</blockquote>
<p>if you get</p>
<blockquote><p>D  aac             ADTS AAC<br />
D A    mpeg4aac</p></blockquote>
<p>E=Encoder and so…</p>
<p><span style="color:#ff0000;"><strong> Your ffmpeg is not able to use restricted formats like ac3 wma etc etc ! and you’ll get problems !</strong></span><strong> </strong></p>
<p><strong> </strong></p>
<p>if you get</p>
<blockquote><p>D  aac             ADTS AAC<br />
DEA    aac<br />
D A    mpeg4aac</p></blockquote>
<p>your FFmpeg is compiled with aac supports and if you wanna encode on ac3 formats you HAVE TO USE like codec name aac!</p>
<p>EXAMPLE: ffmpeg -i INPUT <span style="color:#ff0000;"><strong>-acodec aac</strong></span> OUTPUT<br />
fi you get</p>
<blockquote><p>D  aac             ADTS AAC<br />
DEA    libfaac<br />
D A    mpeg4aac</p></blockquote>
<p>Your FFmpeg is compiled with aac supports but YOU HAVE TO USE LIBFAAC like codec name!</p>
<p>EXAMPLE: ffmpeg -i INPUT <span style="color:#ff0000;"><strong>-acodec libfaac</strong></span> OUTPUT</p>
<p>this works for many codecs example xvid h264 etc etc</p>
<p>etc etc</p>
<h2 style="text-align:center;">HOW TO FIX FFMPEG on Kubuntu system</h2>
<p>1-Add Medibuntu repository</p>
<p>then reinstall FFmpeg + these packages  (NUMBER COULD CHANGE BUT YOU CAN SEARCH WITH SYNAPTIC O KPACKAGEKIT )</p>
<blockquote><p>sudo apt-get install ffmpeg libavdevice-unstripped-52 libavformat-unstripped-52 libavutil-unstripped-49 libpostproc-unstripped-51 libswscale-unstripped-0</p></blockquote>
<p><strong> Error that makes your ffmpeg sucks</strong></p>
<blockquote><p>error while loading shared libraries: libavutil.so.50: cannot open shared object file: No such file or directory</p></blockquote>
<p>that is due to an older ffmpeg version on the pc you have to rid it</p>
<p>try this</p>
<pre>sudo apt-get remove –-purge ffmpeg</pre>
<p>then compile ffmpeg again.</p>
<h2 style="text-align:center;">HOW To FIx FFMPEG on Kubuntu 9.04 system COMPILING</h2>
<blockquote>
<pre>sudo apt-get build-dep ffmpeg &#38;&#38; sudo apt-get install libx264-dev  libxvidcore4-dev libopenjpeg-dev libamrwb-dev libamrnb-dev  checkinstall  libasound2-dev   libdc1394-22-dev   libgsm1-dev  libimlib2-dev libraw1394-dev libsdl1.2-dev libschroedinger-dev libspeex-dev  libtheora-dev  libvorbis-dev libx11-dev libxext-dev libxvmc-dev quilt texi2html zlib1g-dev libfaad-dev libdirac-dev libfaac-dev libmp3lame-dev</pre>
</blockquote>
<blockquote><p>svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg</p></blockquote>
<blockquote>
<pre> cd ffmpeg &#38;&#38; ./configure --prefix=/usr/local --enable-shared --enable-libmp3lame --enable-gpl --enable-libfaad --enable-libvorbis --enable-pthreads --enable-libfaac --enable-libxvid --enable-postproc --enable-x11grab --enable-libgsm --enable-libx264  --enable-libtheora --enable-libdc1394 --enable-nonfree --disable-stripping --enable-avfilter --enable-libdirac --disable-decoder=libdirac --enable-libschroedinger --disable-encoder=libschroedinger --enable-avfilter-lavf --enable-libamr-nb --enable-libamr-wb &#38;&#38;  make</pre>
</blockquote>
<h2 style="text-align:center;">HOW To FIx FFMPEG on Kubuntu 9.10 system COMPILING</h2>
<p>This could help you to add some feauters on your ffmpeg when this article will get old.The most of configuration can be found here , i mean to enable codecs,</p>
<blockquote>
<pre>./configure --help &#124; grep enable-lib</pre>
</blockquote>
<p>that should list every library you can enable. And as you can see on karmic koala 9.10 the old way to compile ffmpeg can not be used again, just because  amr libraries have changed name and some feauters have been added like vdpau for nvdia cars only.</p>
<p>So now you need to install :</p>
<blockquote>
<pre>sudo apt-get install libopencore-amrnb-dev libopencore-amrwb-dev</pre>
</blockquote>
<p>when i tried to compile ffmpeg then i get some errors like this</p>
<blockquote><p>ibavcodec/vdpau.h:76: error: expected specifier-qualifier-list before ‘VdpPictureInfoMPEG4Part2’</p></blockquote>
<p>and of course this is an error because i have not disabled  vdpau support that is only for nvidia cards. and i have an intel&#8230; well so you should search something to disable with</p>
<blockquote>
<pre>./configure --help &#124; grep disable-</pre>
</blockquote>
<p>Because of course you use software like kdenlive or software that use ffmpeg YOU NEED TO ENABLE THIS OPTION ;</p>
<p>&#8211;enable-shared</p>
<p>And you should REMOVE FFMPEG AND EVERY OLD FFMPEG FROM YOUR SYSTEM THAT SHOULD BE INSTALLED ON</p>
<p><strong>/usr</strong></p>
<p><span style="color:#ff0000;"><strong>so to avoid some problems</strong></span> with libraries you need to install ffmpeg on /usr/local so the most of configure script has</p>
<p>/usr/local like prefix by default anyway to be sure &#8230;.</p>
<p><strong>&#8211;prefix=/usr/local</strong></p>
<p>So this could be a configuration <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> here there is not x264 becasue on kubuntu karmic seems there are some problems with x264 version&#8230; -.-&#8221;  **)</p>
<pre>--prefix=/usr/local --enable-shared --enable-gpl --enable-version3 --enable-nonfree  --enable-postproc --enable-avfilter --enable-avfilter-lavf --enable-pthreads --enable-x11grab  --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libdc1394 --enable-libdirac  --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame  --enable-libopenjpeg --enable-libschroedinger --enable-libtheora --enable-libvorbis  --enable-libxvid --disable-vdpau</pre>
<p>and this one another to add some libraries that you never use in your life &#8230;</p>
<pre>./configure  --prefix=/usr/local --enable-shared  --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-avfilter --enable-avfilter-lavf --enable-pthreads --enable-x11grab --enable-gray    --enable-bzlib --enable-libopencore-amrnb  --enable-libopencore-amrwb --enable-libdc1394  --enable-libdirac   --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame  --enable-libopenjpeg  --enable-libschroedinger  --enable-libspeex --enable-libtheora  --enable-libvorbis     --enable-libxvid   --enable-zlib  --enable-gprof  --enable-extra-warnings --disable-vdpau</pre>
<p>if you want 264 encoder you should download and installl libx264 too&#8230; -.-&#8221;</p>
<div id="_mcePaste">git clone git://git.videolan.org/x264.git</div>
<pre>git clone git://git.videolan.org/x264.git</pre>
<p><big> </big></p>
<p><big></p>
<pre>cd x264  &#38;&#38;  ./configure --enable-shared  &#38;&#38;  make -j3  &#38;&#38;  sudo checkinstall</pre>
<p></big><br />
**if you want install normally you should use sudo make install instead of sudo checkinstall.</p>
<p>then recompile ffmpeg you should get errors on compiling ffmpeg just because this library is going to be installed in /usr/local/lib instead of /usr/lib&#8230;</p>
<p>for my own use i installed ffmpeg on /usr &#8230; even if this can be a pain in some situations</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[PHP: FFmpeg กับการประยุกต์ใช้งาน]]></title>
<link>http://adaydesign.wordpress.com/2009/11/30/php-ffmpeg-%e0%b8%81%e0%b8%b1%e0%b8%9a%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%9b%e0%b8%a3%e0%b8%b0%e0%b8%a2%e0%b8%b8%e0%b8%81%e0%b8%95%e0%b9%8c%e0%b9%83%e0%b8%8a%e0%b9%89%e0%b8%87%e0%b8%b2%e0%b8%99/</link>
<pubDate>Sun, 29 Nov 2009 18:48:46 +0000</pubDate>
<dc:creator>adaydesign</dc:creator>
<guid>http://adaydesign.wordpress.com/2009/11/30/php-ffmpeg-%e0%b8%81%e0%b8%b1%e0%b8%9a%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%9b%e0%b8%a3%e0%b8%b0%e0%b8%a2%e0%b8%b8%e0%b8%81%e0%b8%95%e0%b9%8c%e0%b9%83%e0%b8%8a%e0%b9%89%e0%b8%87%e0%b8%b2%e0%b8%99/</guid>
<description><![CDATA[เมือเราต้องการเขียนโค้ดแปลงไฟล์วีดีโอหรือทำ thumbnail จากวีดีโอ สามารถใช้โปรแกรม FFmpeg มาช่วยได้ครั]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>เมือเราต้องการเขียนโค้ดแปลงไฟล์วีดีโอหรือทำ thumbnail จากวีดีโอ สามารถใช้โปรแกรม FFmpeg มาช่วยได้ครับ โดยหาโหลดได้ตามเวปไซทั่วไป ส่วนปัญหาที่พบในบอร์ดตามเน็ตที่ต่างๆ ก้อคือ เราจะเขียนคำสั่งยังไงให้มัน แปลงไฟล์ หรือ ทำ thumbnail ได้อย่างสมบูรณ์ วันนี้ผมนำคำสั่งเหล่านี้มานำเสนอแล้วครับ อ่านต่อเลยครับ</p>
<p>ตัวอย่าง คำสั่งการแปลงไฟล์วีดีโอต่างๆ เป็น .flv</p>
<blockquote><p>ffmpeg -i <span style="color:#008000;"><strong><span style="text-decoration:underline;">M2U9.MPG</span></strong></span> -acodec mp3 -ar 22050 -ab 32 -f flv -s 320&#215;240 <strong><span style="color:#008000;"><span style="text-decoration:underline;">zdemo0011.flv</span></span></strong></p></blockquote>
<p>ตัวอย่าง คำสั่งการทำ thumbnail จากไฟล์วีดีโอ</p>
<blockquote><p>ffmpeg -vcodec png -i <strong><span style="color:#008000;"><span style="text-decoration:underline;">zdemo001.flv</span></span></strong> -ss 00:00:08 -vframes 1 -f image2 -s <span style="color:#008000;"><strong><span style="text-decoration:underline;">sqcif thmb002.png</span></strong></span></p></blockquote>
<p>&#160;</p>
<p>เมื่อเราจะใช้ PHP เขียนโค้ดเพื่อเรียกคำสั่งจาก FFmpeg ต้องทำดังนี้(ง่ายสุดๆ)</p>
<blockquote><p>1. ดาว์โหลด FFmpeg แล้วก้อปปี้ไปวางไว้ที่ โฟเดอร์ www ของเวปเรา<br />
หากอ้างถึง FFmpeg จะได้พาทคือ www/myWeb/FFmpeg<br />
www เป็นโฟเดอร์ของ apache นะ</p></blockquote>
<blockquote><p>2. เอาโค้ดที่ทำการแปลงไฟล์ ไปไว้ที่โฟเดอร์ ffmpeg เลยคร้บ เช่นเราจะ โ้ค้ด php เราชื่อ convert.php<br />
อ้างพาทแล้วจะได้ ffmpeg/convert.php</p></blockquote>
<p>3. ในโค้ด convert.php ดังนี้</p>
<blockquote><p>&#60;?</p>
<p>$cmd = &#8220;ffmpeg -i <strong>M2U9.MPG</strong> -acodec mp3 -ar 22050 -ab 32 -f flv -s 320&#215;240 <strong>zdemo0011.flv&#8221;</strong></p>
<p><strong>exec($cmd);<br />
</strong></p>
<p>?&#62;</p></blockquote>
<p><span style="color:#008000;"><span style="color:#000000;">เท่านี้เราก้อสามารถใช้โปรแกรม FFmpeg โดยผ่านโค้ด exec ของ PHP ได้ &#8230;. เดี๋ยวจะมาอธิบายเกี่ยวกับรายละเอียดฟังก์ชั่น และพารามิเตอร์อีกครับ บาย</span><strong><span style="text-decoration:underline;"><br />
</span></strong></span></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[ffmpeg 으로 스트리밍 서버만들기]]></title>
<link>http://kt2sj.wordpress.com/2009/11/29/ffmpeg-%ec%9c%bc%eb%a1%9c-%ec%8a%a4%ed%8a%b8%eb%a6%ac%eb%b0%8d-%ec%84%9c%eb%b2%84%eb%a7%8c%eb%93%a4%ea%b8%b0/</link>
<pubDate>Sun, 29 Nov 2009 03:49:04 +0000</pubDate>
<dc:creator>Justin Park</dc:creator>
<guid>http://kt2sj.wordpress.com/2009/11/29/ffmpeg-%ec%9c%bc%eb%a1%9c-%ec%8a%a4%ed%8a%b8%eb%a6%ac%eb%b0%8d-%ec%84%9c%eb%b2%84%eb%a7%8c%eb%93%a4%ea%b8%b0/</guid>
<description><![CDATA[우분투 8.04에서 Logitech Quickcam Pro 4000으로 스트리밍 서버 만드는 방법이다. [원본링크] http://minimonk.tistory.com/985 $ f]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>우분투 8.04에서 Logitech Quickcam Pro 4000으로 스트리밍 서버 만드는 방법이다.</p>
<p>[원본링크] <a title="구차니의 잡동사니 모음" href="http://minimonk.tistory.com/985" target="_blank">http://minimonk.tistory.com/985</a></p>
<p>$ ffserver -f ./ffserver.conf<br />
$ ffmpeg -y -f video4linux -r 30 -s 160&#215;120 -i /dev/video0 http://localhost:8090/feed1.ffm<br />
웹브라우저 http://xxx.xxx.xxx.xxx:8090/stream.asf[링크 : <a title="[http://sound79.tistory.com/105]로 이동합니다.&#8221; href=&#8221;http://sound79.tistory.com/105&#8243; target=&#8221;_blank&#8221;>http://sound79.tistory.com/105</a>]</p>
<p>머.. ffmpeg 홈페이지의 <a title="[http://ffmpeg.org/ffserver-doc.html]로 이동합니다." href="http://ffmpeg.org/ffserver-doc.html" target="_blank">ffserver</a> 문서와 다를 내용은 그리 없지만</p>
<p>As a simple test, just run the following two command lines where INPUTFILE is some file which you can decode with ffmpeg:</p>
<pre>./ffserver -f doc/ffserver.conf &#38;

./ffmpeg -i INPUTFILE http://localhost:8090/feed1.ffm</pre>
<p>At this point you should be able to go to your Windows machine and fire up Windows Media Player (WMP). Go to Open URL and enter</p>
<pre>http://&#60;linuxbox&#62;:8090/test.asf</pre>
<p>아무튼.. wmv 중요한건 저게 아니라 /etc/ffserver.conf 파일의 내용일 듯 하다.</p>
<p>ffmpeg 홈페이지의 <a title="[http://ffmpeg.org/sample.html]로 이동합니다." href="http://ffmpeg.org/sample.html" target="_blank">ffserver.conf</a> 예제파일</p>
<table style="width:518px;height:4887px;" cellspacing="1" cellpadding="1" width="518" bgcolor="#ffffff">
<tbody>
<tr>
<td width="100%"># Port on which the server is listening. You must select a different<br />
# port from your standard HTTP web server if it is running on the same<br />
# computer.<br />
Port 8090# Address on which the server is bound. Only useful if you have<br />
# several network interfaces.<br />
BindAddress 0.0.0.0# Number of simultaneous HTTP connections that can be handled. It has<br />
# to be defined *before* the MaxClients parameter, since it defines the<br />
# MaxClients maximum limit.<br />
MaxHTTPConnections 2000# Number of simultaneous requests that can be handled. Since FFServer<br />
# is very fast, it is more likely that you will want to leave this high<br />
# and use MaxBandwidth, below.<br />
MaxClients 1000# This the maximum amount of kbit/sec that you are prepared to<br />
# consume when streaming to clients.<br />
MaxBandwidth 1000# Access log file (uses standard Apache log file format)<br />
# &#8216;-&#8217; is the standard output.<br />
CustomLog -# Suppress that if you want to launch ffserver as a daemon.<br />
NoDaemon##################################################################<br />
# Definition of the live feeds. Each live feed contains one video<br />
# and/or audio sequence coming from an ffmpeg encoder or another<br />
# ffserver. This sequence may be encoded simultaneously with several<br />
# codecs at several resolutions.&#60;Feed feed1.ffm&#62;# You must use &#8216;ffmpeg&#8217; to send a live feed to ffserver. In this<br />
# example, you can type:<br />
#<br />
# ffmpeg http://localhost:8090/feed1.ffm# ffserver can also do time shifting. It means that it can stream any<br />
# previously recorded live stream. The request should contain:<br />
# &#8220;http://xxxx?date=[YYYY-MM-DDT][[HH:]MM:]SS[.m...]&#8220;.You must specify<br />
# a path where the feed is stored on disk. You also specify the<br />
# maximum size of the feed, where zero means unlimited. Default:<br />
# File=/tmp/feed_name.ffm FileMaxSize=5M<br />
File /tmp/feed1.ffm<br />
FileMaxSize 200K</p>
<p># You could specify<br />
# ReadOnlyFile /saved/specialvideo.ffm<br />
# This marks the file as readonly and it will not be deleted or updated.</p>
<p># Specify launch in order to start ffmpeg automatically.<br />
# First ffmpeg must be defined with an appropriate path if needed,<br />
# after that options can follow, but avoid adding the http:// field<br />
#Launch ffmpeg</p>
<p># Only allow connections from localhost to the feed.<br />
ACL allow 127.0.0.1</p>
<p>&#60;/Feed&#62;</p>
<p>##################################################################<br />
# Now you can define each stream which will be generated from the<br />
# original audio and video stream. Each format has a filename (here<br />
# &#8216;test1.mpg&#8217;). FFServer will send this stream when answering a<br />
# request containing this filename.</p>
<p>&#60;Stream test1.mpg&#62;</p>
<p># coming from live feed &#8216;feed1&#8242;<br />
Feed feed1.ffm</p>
<p># Format of the stream : you can choose among:<br />
# mpeg       : MPEG-1 multiplexed video and audio<br />
# mpegvideo  : only MPEG-1 video<br />
# mp2        : MPEG-2 audio (use AudioCodec to select layer 2 and 3 codec)<br />
# ogg        : Ogg format (Vorbis audio codec)<br />
# rm         : RealNetworks-compatible stream. Multiplexed audio and video.<br />
# ra         : RealNetworks-compatible stream. Audio only.<br />
# mpjpeg     : Multipart JPEG (works with Netscape without any plugin)<br />
# jpeg       : Generate a single JPEG image.<br />
# asf        : ASF compatible streaming (Windows Media Player format).<br />
# swf        : Macromedia Flash compatible stream<br />
# avi        : AVI format (MPEG-4 video, MPEG audio sound)<br />
Format mpeg</p>
<p># Bitrate for the audio stream. Codecs usually support only a few<br />
# different bitrates.<br />
AudioBitRate 32</p>
<p># Number of audio channels: 1 = mono, 2 = stereo<br />
AudioChannels 1</p>
<p># Sampling frequency for audio. When using low bitrates, you should<br />
# lower this frequency to 22050 or 11025. The supported frequencies<br />
# depend on the selected audio codec.<br />
AudioSampleRate 44100</p>
<p># Bitrate for the video stream<br />
VideoBitRate 64</p>
<p># Ratecontrol buffer size<br />
VideoBufferSize 40</p>
<p># Number of frames per second<br />
VideoFrameRate 3</p>
<p># Size of the video frame: WxH (default: 160&#215;128)<br />
# The following abbreviations are defined: sqcif, qcif, cif, 4cif, qqvga,<br />
# qvga, vga, svga, xga, uxga, qxga, sxga, qsxga, hsxga, wvga, wxga, wsxga,<br />
# wuxga, woxga, wqsxga, wquxga, whsxga, whuxga, cga, ega, hd480, hd720,<br />
# hd1080<br />
VideoSize 160&#215;128</p>
<p># Transmit only intra frames (useful for low bitrates, but kills frame rate).<br />
#VideoIntraOnly</p>
<p># If non-intra only, an intra frame is transmitted every VideoGopSize<br />
# frames. Video synchronization can only begin at an intra frame.<br />
VideoGopSize 12</p>
<p># More MPEG-4 parameters<br />
# VideoHighQuality<br />
# Video4MotionVector</p>
<p># Choose your codecs:<br />
#AudioCodec mp2<br />
#VideoCodec mpeg1video</p>
<p># Suppress audio<br />
#NoAudio</p>
<p># Suppress video<br />
#NoVideo</p>
<p>#VideoQMin 3<br />
#VideoQMax 31</p>
<p># Set this to the number of seconds backwards in time to start. Note that<br />
# most players will buffer 5-10 seconds of video, and also you need to allow<br />
# for a keyframe to appear in the data stream.<br />
#Preroll 15</p>
<p># ACL:</p>
<p># You can allow ranges of addresses (or single addresses)<br />
#ACL ALLOW &#60;first address&#62;</p>
<p># You can deny ranges of addresses (or single addresses)<br />
#ACL DENY &#60;first address&#62;</p>
<p># You can repeat the ACL allow/deny as often as you like. It is on a per<br />
# stream basis. The first match defines the action. If there are no matches,<br />
# then the default is the inverse of the last ACL statement.<br />
#<br />
# Thus &#8216;ACL allow localhost&#8217; only allows access from localhost.<br />
# &#8216;ACL deny 1.0.0.0 1.255.255.255&#8242; would deny the whole of network 1 and<br />
# allow everybody else.</p>
<p>&#60;/Stream&#62;</p>
<p>##################################################################<br />
# Example streams</p>
<p># Multipart JPEG</p>
<p>#&#60;Stream test.mjpg&#62;<br />
#Feed feed1.ffm<br />
#Format mpjpeg<br />
#VideoFrameRate 2<br />
#VideoIntraOnly<br />
#NoAudio<br />
#Strict -1<br />
#&#60;/Stream&#62;</p>
<p># Single JPEG</p>
<p>#&#60;Stream test.jpg&#62;<br />
#Feed feed1.ffm<br />
#Format jpeg<br />
#VideoFrameRate 2<br />
#VideoIntraOnly<br />
##VideoSize 352&#215;240<br />
#NoAudio<br />
#Strict -1<br />
#&#60;/Stream&#62;</p>
<p># Flash</p>
<p>#&#60;Stream test.swf&#62;<br />
#Feed feed1.ffm<br />
#Format swf<br />
#VideoFrameRate 2<br />
#VideoIntraOnly<br />
#NoAudio<br />
#&#60;/Stream&#62;</p>
<p># ASF compatible</p>
<p>&#60;Stream test.asf&#62;<br />
Feed feed1.ffm<br />
Format asf<br />
VideoFrameRate 15<br />
VideoSize 352&#215;240<br />
VideoBitRate 256<br />
VideoBufferSize 40<br />
VideoGopSize 30<br />
AudioBitRate 64<br />
StartSendOnKey<br />
&#60;/Stream&#62;</p>
<p># MP3 audio</p>
<p>#&#60;Stream test.mp3&#62;<br />
#Feed feed1.ffm<br />
#Format mp2<br />
#AudioCodec mp3<br />
#AudioBitRate 64<br />
#AudioChannels 1<br />
#AudioSampleRate 44100<br />
#NoVideo<br />
#&#60;/Stream&#62;</p>
<p># Ogg Vorbis audio</p>
<p>#&#60;Stream test.ogg&#62;<br />
#Feed feed1.ffm<br />
#Title &#8220;Stream title&#8221;<br />
#AudioBitRate 64<br />
#AudioChannels 2<br />
#AudioSampleRate 44100<br />
#NoVideo<br />
#&#60;/Stream&#62;</p>
<p># Real with audio only at 32 kbits</p>
<p>#&#60;Stream test.ra&#62;<br />
#Feed feed1.ffm<br />
#Format rm<br />
#AudioBitRate 32<br />
#NoVideo<br />
#NoAudio<br />
#&#60;/Stream&#62;</p>
<p># Real with audio and video at 64 kbits</p>
<p>#&#60;Stream test.rm&#62;<br />
#Feed feed1.ffm<br />
#Format rm<br />
#AudioBitRate 32<br />
#VideoBitRate 128<br />
#VideoFrameRate 25<br />
#VideoGopSize 25<br />
#NoAudio<br />
#&#60;/Stream&#62;</p>
<p>##################################################################<br />
# A stream coming from a file: you only need to set the input<br />
# filename and optionally a new format. Supported conversions:<br />
#    AVI -&#62; ASF</p>
<p>#&#60;Stream file.rm&#62;<br />
#File &#8220;/usr/local/httpd/htdocs/tlive.rm&#8221;<br />
#NoAudio<br />
#&#60;/Stream&#62;</p>
<p>#&#60;Stream file.asf&#62;<br />
#File &#8220;/usr/local/httpd/htdocs/test.asf&#8221;<br />
#NoAudio<br />
#Author &#8220;Me&#8221;<br />
#Copyright &#8220;Super MegaCorp&#8221;<br />
#Title &#8220;Test stream from disk&#8221;<br />
#Comment &#8220;Test comment&#8221;<br />
#&#60;/Stream&#62;</p>
<p>##################################################################<br />
# RTSP examples<br />
#<br />
# You can access this stream with the RTSP URL:<br />
#   rtsp://localhost:5454/test1-rtsp.mpg<br />
#<br />
# A non-standard RTSP redirector is also created. Its URL is:<br />
#   http://localhost:8090/test1-rtsp.rtsp</p>
<p>#&#60;Stream test1-rtsp.mpg&#62;<br />
#Format rtp<br />
#File &#8220;/usr/local/httpd/htdocs/test1.mpg&#8221;<br />
#&#60;/Stream&#62;</p>
<p>##################################################################<br />
# SDP/multicast examples<br />
#<br />
# If you want to send your stream in multicast, you must set the<br />
# multicast address with MulticastAddress. The port and the TTL can<br />
# also be set.<br />
#<br />
# An SDP file is automatically generated by ffserver by adding the<br />
# &#8217;sdp&#8217; extension to the stream name (here<br />
# http://localhost:8090/test1-sdp.sdp). You should usually give this<br />
# file to your player to play the stream.<br />
#<br />
# The &#8216;NoLoop&#8217; option can be used to avoid looping when the stream is<br />
# terminated.</p>
<p>#&#60;Stream test1-sdp.mpg&#62;<br />
#Format rtp<br />
#File &#8220;/usr/local/httpd/htdocs/test1.mpg&#8221;<br />
#MulticastAddress 224.124.0.1<br />
#MulticastPort 5000<br />
#MulticastTTL 16<br />
#NoLoop<br />
#&#60;/Stream&#62;</p>
<p>##################################################################<br />
# Special streams</p>
<p># Server status</p>
<p>&#60;Stream stat.html&#62;<br />
Format status</p>
<p># Only allow local people to get the status<br />
ACL allow localhost<br />
ACL allow 192.168.0.0 192.168.255.255</p>
<p>#FaviconURL http://pond1.gladstonefamily.net:8080/favicon.ico<br />
&#60;/Stream&#62;</p>
<p># Redirect index.html to the appropriate site</p>
<p>&#60;Redirect index.html&#62;<br />
URL http://www.ffmpeg.org/<br />
&#60;/Redirect&#62;</p>
<p>http://www.ffmpeg.org/</td>
</tr>
</tbody>
</table>
<p>아무튼 적절한 코덱을 지원하는 동영상을 찾아서 테스트 해봐야 하겠지만,<br />
해상도는 16의 배수, 프레임은 1이상 이어야 하는 것으로 보인다.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[pobieranie materiałów z youtube.com]]></title>
<link>http://trycode.wordpress.com/2009/11/28/pobieranie-materialow-z-youtube-com/</link>
<pubDate>Sat, 28 Nov 2009 19:18:52 +0000</pubDate>
<dc:creator>trym</dc:creator>
<guid>http://trycode.wordpress.com/2009/11/28/pobieranie-materialow-z-youtube-com/</guid>
<description><![CDATA[Za pomocą skryptu youtube-dl możemy pobierać dane z portalu youtube.com. Jest on dostępny w repozyto]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Za pomocą skryptu <em>youtube-dl</em> możemy pobierać dane z portalu <a href="http://youtube.com">youtube.com</a>. Jest on dostępny w repozytorium <em>Debiana</em>, ale wyłącznie w wersji <em>Sid</em>. Zatem jeśli mamy inną wersję tego systemu jak np. <em>Lenny</em> należy postępować zgodnie z poniższym. </p>
<p>Kopiujemy tekst skryptu z <a href="http://www.arrakis.es/~rggi3/youtube-dl/youtube-dl">tej strony</a> i zapisujemy pod nazwą <em>youtube-dl</em> lub <em>youtube-dl.py</em> (najprawdopodobniej żadna nazwa nie zawiedzie, chodzi o to aby było intuicyjnie) w katalogu do którego mamy ustawioną zmienną <em>PATH</em>.</p>
<p>Gdy nie wiemy gdzie umieścić dany skrypt wykonujemy:<br />
<code>$ $PATH</code></p>
<p>Polecenie to wylistuje katalogi do których mamy ustawioną zmienną <em>PATH</em> oddzielając je znakiem <em>:</em> (dwukropka).</p>
<blockquote><p>bash: /usr/local/bin:/usr/bin:/bin:/usr/games:</p></blockquote>
<p><!--more--></p>
<p>Ja nazwałem skrypt <em>youtube-dl.py</em> i zapisałem go w katalogu <em>/usr/local/bin</em>.<br />
Teraz co bardzo ważne należy nadać naszemu skryptowi prawa do wykonywania:<br />
<code># chmod +x youtube-dl.py</code></p>
<p>Już możemy pobierać dane z <em>youtube&#8217;a</em>!</p>
<h5>Przykłady:</h5>
<p><code>$ youtube-dl.py http://pl.youtube.com/watch?v=b24ddxV0SuI</code></p>
<p>Powyższa metoda nie zawiedzie w danym przypadku. Jednak nie ściągniemy tego co ukrywa się pod linkiem <a href="http://pl.youtube.com/watch?v=6wNLOUqVK2s">http://pl.youtube.com/watch?v=6wNLOUqVK2s</a>. Musimy się zalogować i potwierdzić datę urodzenia. </p>
<p>Zatem do dzieła:<br />
<code>$ youtube-dl.py -u TWOJ_LOGIN -p TWOJE_HASLO http://pl.youtube.com/watch?v=6wNLOUqVK2s</code></p>
<p>Pliki zostaną zapisane w katalogu bieżącym odpowiednio pod nazwą <em>b24ddxV0SuI.flv</em> i <em>6wNLOUqVK2s.flv</em>.</p>
<p>Jeśli nie odpowiadają nam formaty zapisanych plików (<em>*.flv</em>) bo chcemy np. wrzucić filmik na komórkę to polecam zapoznać się z programami <em>ffmpeg</em> lub <em>mencoder</em>, które oferują bardzo dużo jeśli chodzi o konwersję.</p>
<p>Przykładowe polecenie może wyglądać tak:<br />
<code>$ mencoder PLIK_WEJSCIOWY.flv -o PLIK_WYJSCIOWY.avi -oac mp3lame -ovc lavc</code></p>
<p>manual:<br />
<a href="http://www.digipedia.pl/man/youtube-dl.1.html">http://www.digipedia.pl/man/youtube-dl.1.html</a><br />
youtube-dl dla Windows XP:<br />
<a href="http://rg03.wordpress.com/youtube-dl-under-windows-xp/">http://rg03.wordpress.com/youtube-dl-under-windows-xp/</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Ubuntu 8.04 yasm/x264/ffmpeg Installation]]></title>
<link>http://nrftw.wordpress.com/2009/11/27/ubuntu-8-04-yasmx264ffmpeg-installation/</link>
<pubDate>Fri, 27 Nov 2009 17:27:19 +0000</pubDate>
<dc:creator>Maximus</dc:creator>
<guid>http://nrftw.wordpress.com/2009/11/27/ubuntu-8-04-yasmx264ffmpeg-installation/</guid>
<description><![CDATA[In the event anyone else is interested&#8230; Ubuntu 8.04 ffmpeg instructions Ubuntu ffmpeg instruct]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>In the event anyone else is interested&#8230;</p>
<ul><a href="http://ubuntuforums.org/showpost.php?p=6963607&#38;postcount=360">Ubuntu 8.04 ffmpeg instructions</a><br />
<a href="http://ubuntuforums.org/showthread.php?t=786095">Ubuntu ffmpeg instructions</a></ul>
<p>Of note, yasm, x264 and ffmpeg are unique items.  Both yasm and x264 are required in order to install ffmpeg.</p>
<p>The official ffmpeg.org site provides an <a href="http://ffmpeg.org/ffmpeg-doc.html">ffmpeg help</a> page.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Soft-Telecine PAL to NTSC MPEG2]]></title>
<link>http://linuxmoc.wordpress.com/2009/11/24/soft-telecine-pal-to-ntsc-mpeg2/</link>
<pubDate>Tue, 24 Nov 2009 08:43:40 +0000</pubDate>
<dc:creator>mocharhw</dc:creator>
<guid>http://linuxmoc.wordpress.com/2009/11/24/soft-telecine-pal-to-ntsc-mpeg2/</guid>
<description><![CDATA[Thought I&#8217;d post this as I haven&#8217;t found all this information in one place.  Sometimes I]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Thought I&#8217;d post this as I haven&#8217;t found all this information in one place.  Sometimes I like to take random movies I&#8217;ve downloaded off the net and encode and burn them to standard NTSC DVD.  The problem is a lot of the videos you find are from PAL (25 fps) source and/or they use out of the ordinary aspect ratios like 2.45:1 or 1.91:1.  These two issues can give you major headaches when trying to get them onto DVD and preserve the proper aspect ratio and smooth frame rate.</p>
<p>There&#8217;s a number of solutions to these problems which I&#8217;ll outline below.</p>
<p><strong>Convert &#8220;Any&#8221; PAL to NTSC MPEG2-PS (DVD), Soft-Telecine method<br />
</strong></p>
<p><code>mencoder INPUT_PAL.avi -vf scale=720:480,harddup -srate 48000<br />
-af lavcresample=48000 -ovc lavc -oac lavc -of mpeg -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:<br />
keyint=15:vstrict=0:acodec=ac3:abitrate=224:aspect=16/9 -mpegopts format=dvd:tsaf:tele_src=25:tele_dest=30000/1001 -o OUTPUT_NTSC.mpg</code></p>
<p>This &#8220;soft-telecine&#8221; method flags the frames for 25 fps to 29.97 fps to make the file NTSC compliant without changing the actual frame rate.</p>
<p><strong>Dealing with the Aspect Ratio problem</strong></p>
<p>The mencoder command above is incomplete because if you&#8217;ll notice it assumes you have a source already encoded at 720&#215;480 with a pixel aspect of 1:1 and a display aspect of 16:9.  Of course this is never the case, so you need to make a few modifications.  We need to do some simple math.</p>
<p>Example:  Source file has a display aspect of 2.45:1 and a resolution of 640&#215;261.</p>
<p>Desired output is NTSC-DVD with 16:9 display aspect:  (480)*(16/9)=854, and (854)/(2.45)=349, so we&#8217;ll encode to 720&#215;350 and pad/expand the remainder to 480.</p>
<p>mencoder uses the expand method, portions of the above command line would therefore be modified like this &#8220;-vf scale=720:350,expand=720:480&#8243; and make sure the -lavcopts part has &#8220;aspect=16/9&#8243; in it somewhere.</p>
<p>If you happen to prefer ffmpeg, it uses the padding method and you would achieve the same thing by having the following in the command line &#8220;-s 720:350 -padtop 65 -padbottom 65 -aspect 16:9&#8243;.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[HowTo: convertire MKV in AVI]]></title>
<link>http://idl3.wordpress.com/2009/11/23/howto-convertire-mkv-in-avi/</link>
<pubDate>Mon, 23 Nov 2009 08:58:40 +0000</pubDate>
<dc:creator>idl3</dc:creator>
<guid>http://idl3.wordpress.com/2009/11/23/howto-convertire-mkv-in-avi/</guid>
<description><![CDATA[Non so perche&#8217; vogliate fare una cosa del genere, ma se proprio volete convertire un file Matr]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Non so perche&#8217; vogliate fare una cosa del genere, ma se proprio volete <strong>convertire un file <a href="http://it.wikipedia.org/wiki/Matroska">Matroska</a> in un formato AVI</strong> potete usare <code>mencoder</code>. Vediamo come.</p>
<p><img src="http://idl3.wordpress.com/files/2009/11/matroska.png?w=150" alt="" title="matroska" width="150" height="150" class="alignleft size-thumbnail wp-image-1201" />Prima di tutto vediamo cosa sono questi file <a href="http://www.matroska.org/">Matroska</a>. Possiamo averne di tre tipi: <em>MKV</em> (video), <em>MKA</em> (audio) e <em>MKS</em> (sottotitoli), per crearli viene utilizzato l&#8217;<acronym title="Extensible Binary Meta Language">EBML</acronym>. Si tratta di un buon formato, anche se puo&#8217; dare <strong>qualche problemino</strong> con alcuni riproduttori di video, ma questo e&#8217; un problema dei riproduttori (o lettori) e non del formato del file. Comunque, ipotizziamo ci sia un buon motivo dietro il vostro desiderio di <strong>convertire il vostro bel video MKV in un altro formato</strong>. Per prima cosa dovete sapere in quale formato convertire, vediamone due.</p>
<p>Se volete <strong>convertire da Matroska a <a href="http://it.wikipedia.org/wiki/Xvid">Xvid</a></strong> dovete dare questo <strong>comando</strong>:<br />
<code>$ mencoder INPUT.mkv -ofps 25 -ovc xvid -oac mp3lame -lameopts abr:br=192 -srate 48000 -xvidencopts fixed_quant=4 -vf scale -zoom -xy 720 -o OUTPUT.avi</code><br />
analizzare ogni singola opzione sarebbe lungo e per voi inutile, andatevi dunque a leggere la <a href="http://www.mplayerhq.hu/DOCS/HTML-single/it/MPlayer.html">guida</a> di <code>mencoder</code>. Vi dico solo che l&#8217;opzione <code>xvidencopts fixed_quant</code> indica la <strong>qualita&#8217;</strong> (3 buona qualita&#8217; ma meno compressione, 5 bassa qualita&#8217; alta compressione), <strong>4 e&#8217; una buona via di mezzo</strong>. Se non ne siete soddisfatti potete sempre ripetere il comando cambiando i valori.</p>
<p>Potete anche <strong>convertire il vostro file MKV in formato <a href="http://it.wikipedia.org/wiki/DivX">DivX</a> 5</strong>, con questo <strong>comando</strong>:<br />
<code>$ mencoder INPUT.mkv -o OUTPUT.avi -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=700:vpass=1 -ffourcc DIVX50 -oac mp3lame -vf scale -zoom -xy 720</code></p>
<p>E&#8217; comunque consigliabile, laddove possibile, il formato Xvid rispetto al DivX, per varie ragioni.</p>
<p>Se doveste avere (come accade spesso) un file MKV con <strong>due tracce audio</strong>, allora dovete aggiungere una o piu&#8217; opzioni per indicare quale utilizzare. Ma prima di tutto dovete <strong>individuare la traccia audio che vi interessa</strong>, per farlo date questo comando:<br />
<code>$ mplayer -v INPUT.mkv</code><br />
leggete e cercate qualcosa del genere:</p>
<pre>[...]
...  -aid N, -alang LNG
...  -aid N, -alang LNG
[...]</pre>
<p>dove al posto di <em>N</em> c&#8217;e&#8217; un numero e al posto di <em>LNG</em> c&#8217;e&#8217; la lingua, ad esempio <code>-aid 1, -alang ita</code> e <code>-aid 2, -alang eng</code>. Ora <strong>avete tutto quello che vi serve</strong>. Il comando per creare un file in Xvid con la <strong>traccia audio in italiano</strong> sara&#8217; dunque (stando all&#8217;esempio):<br />
<code>$ mencoder INPUT.mkv -ofps 25 -ovc xvid -oac mp3lame -lameopts abr:br=128 -srate 48000 -vf scale -zoom -xy 720 -xvidencopts fixed_quant=4  -aid 1 -alang ita -o OUTPUT.avi</code></p>
<p><img src="http://idl3.wordpress.com/files/2009/11/video.jpg?w=150" alt="" title="video" width="150" height="150" class="alignright size-thumbnail wp-image-1202" />Certe volte (a seconda del formato audio) ci potrebbero essere <strong>problemi</strong> ad utilizzare questo sistema. In questi casi ci viene in aiuto <a href="http://www.bunkus.org/videotools/mkvtoolnix/index.html">mkvtoolnix</a>. Essendo <a href="http://packages.debian.org/lenny/mkvtoolnix">pacchettizzato</a>, per installarlo sulla nostra <strong>Debian</strong> facciamo cosi&#8217;:<br />
<code># apt-get install mkvtoolnix</code><br />
il <em>tool</em> contiene <strong>varie applicazioni</strong>, tra cui <code>mkvmerge</code>, <code>mkvinfo</code> e <code>mkvextract</code>. Quella che fa al caso nostro e&#8217; <strong>mkvextract</strong>, leggiamoci dunque la <a href="http://www.bunkus.org/videotools/mkvtoolnix/doc/mkvextract.html">guida</a>, che ci suggerisce la <strong>seguente procedura</strong>.</p>
<p>Prima di tutto dobbiamo <strong>identificare le tracce audio</strong> (e gli eventuali sottotitoli):<br />
<code>$ mkvmerge -i movie.mkv</code><br />
che ad esempio ci restituisce questo <em>output</em>:</p>
<pre>File ’movie.mkv’: container: Matroska
Track ID 1: video (V_MS/VFW/FOURCC, DIV3)
Track ID 2: audio (A_MPEG/L3)
Track ID 3: audio (A_VORBIS)
Track ID 4: subtitles (S_TEXT/UTF8)
Track ID 5: subtitles (S_TEXT/UTF8)</pre>
<p>Come vedete la traccia 2 e&#8217; un <strong>formato audio MP3</strong>, la traccia 3 e&#8217; un <strong>formato audio OGG</strong> e poi abbiamo i <strong>due sottotitoli</strong>. Se vogliamo la seconda traccia audio e i secondi sottotitoli, allora diamo questo <strong>comando</strong>:<br />
<code>$ mkvextract tracks movie.mkv 2:audio.mp3 5:subtitles.srt</code></p>
<p>Ora <a href="http://idl3.wordpress.com/2009/09/25/howto-tagliare-video-e-unire-audio-e-video-con-ffmpeg-e-mencoder/">potete usare ffmpeg</a> sul file MKV per <strong>estrarre solo il video</strong>:<br />
<code>$ ffmpeg -i INPUT.mkv -an -vcodec copy -y  OUTPUT.mkv</code><br />
e poi convertite con <code>mencoder</code> usando l&#8217;opzione <code>audiofile</code> per indicargli il <strong>file audio esterno</strong> (che abbiamo estratto con mkvextract):<br />
<code>$ mencoder INPUT.mkv -ofps 25 -ovc xvid -oac mp3lame -lameopts abr:br=192 -srate 48000 -xvidencopts fixed_quant=4 -vf scale -zoom -xy 720 -audiofile audio.mp3 -o OUTPUT.avi</code></p>
<p>Adesso avete il vostro bel <strong>file video in formato AVI XviD riproducibile nei piu&#8217; normali lettori</strong>. Se siete estimatori delle lingue originali, ma non le conoscete e volete i <strong>sottotitoli</strong>, basta inserirli <strong>nella stessa directory del file video</strong>. Generalmente per far si che il lettore li legga basta che file video e sottotitoli abbiano <strong>lo stesso nome</strong> (solo l&#8217;estensione diversa). Ad esempio: <code>Filmstrepitoso.avi</code> e <code>Filmstrepitoso.srt</code>. Puo&#8217; pero&#8217; capitare che ci siano lettori che <strong>non leggono i sottotitoli</strong> . Allora dovete <a href="http://idl3.wordpress.com/2009/10/10/1-scollegamenti/">inserirli nel file video</a>, in questo modo:<br />
<code>$ mencoder -ovc xvid -xvidencopts fixed_quant=4 -oac copy -sub Filmstrepitoso.srt -subfont-text-scale 4 -o Filmstrepitosoconsottotitoli.avi Filmstrepitoso.avi</code></p>
<p>Fatto, ora potete godervi il vostro <strong>film con i sottotitoli</strong> anche nel piu&#8217; <strong>scadente</strong> dei lettori.</p>
<hr />
<p style="text-align:right;"><a href="#content" title="torna su">[^] torna su</a>&#160;&#124;&#160;<a href="http://postli.com/post?u=http://idl3.wordpress.com/2009/11/23/howto-convertire-mkv-in-avi/&#38;t=HowTo: convertire MKV in AVI" title="Post to Postli" style="color:blue;text-decoration:none;">post<span style="color:orange;">&#60;</span><span style="color:red;">li</span><span style="color:orange;">&#62;</span></a>&#160;&#124;&#160;<a href="http://www.wikio.it/vote?url=http://idl3.wordpress.com/2009/11/23/howto-convertire-mkv-in-avi/" target="_blank"><img src="http://www.wikio.it/shared/img/vote/wikio2.gif" border="0" /></a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Notes On Installing Ubuntu 9.04 And Easy Peasy 1.5]]></title>
<link>http://tompurl.com/2009/11/17/notes-on-installing-ubuntu-9-04-and-easy-peasy-1-5/</link>
<pubDate>Tue, 17 Nov 2009 18:47:51 +0000</pubDate>
<dc:creator>tpurl</dc:creator>
<guid>http://tompurl.com/2009/11/17/notes-on-installing-ubuntu-9-04-and-easy-peasy-1-5/</guid>
<description><![CDATA[It&#8217;s unlike me to upgrade my systems very often since it can take so much time, but I was move]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>It&#8217;s unlike me to upgrade my systems very often since it can take so much time, but I was moved recently to upgrade both my &#8220;server&#8221; (to <a title="Ubuntu" href="http://www.ubuntu.com/">Ubuntu</a> 9.04) and my EEE PC 900 (to <a title="Easy Peasy" href="http://www.geteasypeasy.org/">Easy Peasy</a> 1.5).  In general, I&#8217;m very impressed with how much better Linux-on-the-desktop gets every 6 months, and I look forward to at least another 8 years as a happy desktop Linux user.</p>
<p>One of the great things about Ubuntu is that it really is just painless to set up some pretty sophisticated servers.  For example, I use my Ubuntu server to record television shows using <a title="MythTv" href="http://www.mythtv.org/">MythTv</a>, which can be <em>very</em> difficult to install.  However, using the Ubuntu packages, I was able to get my system up-and-running in less than 10 minutes.</p>
<p>I do have one very small criticism of Ubuntu, and it&#8217;s that they keep making it harder and harder to install <a title="ffmpeg" href="http://ffmpeg.org/">ffmpeg</a> from source.  The &#8220;stock&#8221; version of ffmpeg that comes with Ubuntu can&#8217;t do a lot of cool things like convert videos to the <a title="H264" href="http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC">H264</a> format, so one of the first things that I usually do after installing Ubuntu is compile a more robust version of that application.  Well, the process I used to compile it in 8.04 definitely did <em>not</em> work with 9.04 for some strange reason.  Thank goodness that I found <a title="this tutorial" href="http://ubuntuforums.org/showthread.php?t=786095">this tutorial</a>, which made things very simple.</p>
<p>One really great thing about the 1.5 version of Easy Peasy is that I can now use some <a title="Compiz" href="http://www.compiz-fusion.org/">Compiz</a> effects with my EEE PC 900.  Previous versions of Easy Peasy didn&#8217;t even allow me to turn Compiz on.  Hooray for tons tap-dancing sprites on my screen!</p>
<p>Here are some of the resources that I used to set up my Ubuntu 9.04 and Easy Peasy 1.5 systems.  Maybe someone else will find them to be useful:</p>
<ul>
<li><a title="Installing ffmpeg from source" href="http://ubuntuforums.org/showthread.php?t=786095">Installing ffmpeg from source</a></li>
<li><a title="NFS Server &#38; Client HOWTO" href="http://www.ubuntugeek.com/nfs-server-and-client-configuration-in-ubuntu.html">NFS Server &#38; Client HOWTO</a></li>
</ul>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Crear un video a partir de una imágen y un Mp3 con la consola]]></title>
<link>http://elsoftwarelibre.wordpress.com/2009/11/16/crear-un-video-a-partir-de-una-imagen-y-video-con-la-consola/</link>
<pubDate>Mon, 16 Nov 2009 05:09:48 +0000</pubDate>
<dc:creator>Soft-Libre</dc:creator>
<guid>http://elsoftwarelibre.wordpress.com/2009/11/16/crear-un-video-a-partir-de-una-imagen-y-video-con-la-consola/</guid>
<description><![CDATA[Resulta que si queremos subir un archivo de audio a youtube, por ejemplo un MP3 cualquiera, no prodr]]></description>
<content:encoded><![CDATA[Resulta que si queremos subir un archivo de audio a youtube, por ejemplo un MP3 cualquiera, no prodr]]></content:encoded>
</item>
<item>
<title><![CDATA[Setting Opencv in Ubuntu]]></title>
<link>http://bachbouch.wordpress.com/2009/11/13/setting-opencv-in-ubuntu/</link>
<pubDate>Fri, 13 Nov 2009 10:13:56 +0000</pubDate>
<dc:creator>bachbouch</dc:creator>
<guid>http://bachbouch.wordpress.com/2009/11/13/setting-opencv-in-ubuntu/</guid>
<description><![CDATA[setUpEclipseSVNCMakeOpenCV.sh Get and install Subversion: apt-get subversion Get and install CMake a]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><a href="http://bachbouch.wordpress.com/files/2009/11/setupeclipsesvncmakeopencv.docx">setUpEclipseSVNCMakeOpenCV.sh</a></p>
<p><span style="font-family:tahoma;"><span style="text-decoration:underline;"><strong>Get and install Subversion:</strong></span><br />
<em>apt-get subversion</em><br />
<span style="text-decoration:underline;"><br />
<strong>Get and install CMake</strong></span><br />
<em>apt-get cmake</em><br />
<strong><span style="text-decoration:underline;"><br />
Download and install OpenCV</span></strong><br />
<a href="http://www.nld.ds.mpg.de/~eren/Tutorial_ffmpeg_opencv.html" target="_blank">source</a></span></p>
<p><span style="text-decoration:underline;">First we need to install ffmpeg:</span></p>
<p>&#62;&#62;sudo apt-get install libsdl1.2-dev</p>
<p>First download ffmpeg 15261 (this is the very last version that supports the type “img_convert”. Later versions of ffmpeg might not support this type and therefore installations of opencv-1.0.0 (and later versions) end up with error.)</p>
<p>&#62;&#62; svn checkout -r 15261 svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg_15261<br />
&#62;&#62; cd ffmpeg_15261</p>
<p>Then we configure ffmpeq with the following flags.</p>
<p>&#62;&#62; ./configure &#8211;enable-shared &#8211;enable-gpl &#8211;enable-pthreads</p>
<p>We apply a patch (so called 0001-Fixes-the-compilation-problem.patch) (see http://code.google.com/p/avbin/issues/detail?id=15) to libswscale/swscale.h</p>
<p>&#62;&#62; patch libswscale/swscale.h &#60; ../0001-Fixes-the-compilation-problem.patch</p>
<p>After applying the patch we configure ffmpeg once more.</p>
<p>&#62;&#62; ./configure &#8211;enable-shared &#8211;enable-gpl &#8211;enable-pthreads<br />
&#62;&#62; make<br />
&#62;&#62; sudo make install<br />
&#62;&#62; echo &#8220;/usr/local/lib&#8221; &#62; /etc/ld.so.conf.d/ffmpeg.conf</p>
<p>&#62;&#62; /sbin/ldconfig</p>
<p>So far we installed ffmpeg. In order to test it you can run an avi file with the function ffplay. It should work without any problem.</p>
<p>&#62;&#62; ffplay my_test_video.avi</p>
<p><span style="text-decoration:underline;">Now it is time for OpenCV:</span></p>
<p>. Installing GTK &#38; OpenCV</p>
<p>&#62;&#62; sudo apt-get install libgtk2.0-dev</p>
<p>Get opencv and put the files in &#60;Opencv Source code&#62;</p>
<p>&#62;&#62;svn co https://code.ros.org/svn/opencv/trunk &#60;Opencv Source code&#62;</p>
<p>&#62;&#62; cd /usr/local/include/</p>
<p>&#62;&#62; mkdir ffmpeg</p>
<p>&#62;&#62; cd ffmpeg</p>
<p>&#62;&#62;sudo su</p>
<p>&#62;&#62; find ../ -name &#8220;*.h&#8221; &#124; xargs -n1 ln –s</p>
<p>&#62;&#62;sudo your_user_name</p>
<p>&#62;&#62; cd &#60;Opencv Source code&#62;</p>
<p>&#62;&#62; ./configure &#8211;enable-apps &#8211;enable-shared &#8211;with-ffmpeg &#8211;with-gnu-ld &#8211;with-x &#8211;without-quicktime &#8211;with-gtk CXXFLAGS=-fno-strict-aliasing CFLAGS=-I/usr/local/include/ffmpeg CPPFLAGS=-I/usr/local/include/ffmpeg LDFLAGS=-L/usr/local/lib</p>
<p>After a successful configuration we should see;</p>
<p>&#8230;</p>
<p>&#8230;</p>
<p>Use gtk+ 2.x:yes</p>
<p>Use gthread:yes</p>
<p>&#8230;</p>
<p>Use ffmpeg:yes</p>
<p>Use dc1394&#38;&#38;raw1394: yes</p>
<p>&#8230;</p>
<p>&#62;&#62; make</p>
<p>After running the command make, some of those following 5 errors can probably be observed in the file &#8220;cvcap_ffmpeg.cpp&#8221;.</p>
<p>1-) &#8220;cvcap_ffmpeg.cpp:250: error: integer constant is too large for &#8216;long&#8217; type&#8221;</p>
<p>As a solution we have to add the following 2 lines of code to the top of file &#8220;opencv/otherlibs/highgui/cvcap_ffmpeg.cpp&#8221;:</p>
<p>#define INT64_C</p>
<p>#define __STDC_CONSTANT_MACROS</p>
<p>2-) There is still a problem with pointers (in the later versions of ffmpeg), like cannot convert &#8216;ByteIOContext**&#8217; to &#8216;ByteIOContext*&#8217; for argument &#8216;1&#8242; to &#8216;int url_fclose(ByteIOContext*)</p>
<p>As a solution try to change the line containing<br />
url_fclose(&#38;mywriter-&#62;oc-&#62;pb);<br />
to<br />
url_fclose(mywriter-&#62;oc-&#62;pb);</p>
<p>3-)It might give an error about type definitions as well. As a solution we have to switch from int to PixelFormat.</p>
<p>&#8220;invalid conversion from ‘int’ to ‘PixelFormat&#8221;</p>
<p>For all cases do the following convertion: pix_fmt -&#62;(PixelFormat)pix_fmt</p>
<p>4-) PIX_FMT_RGBA32 was not declared in this scope&#8221;</p>
<p>Replace PIX_FMT_RGBA32 by PIX_FMT_RGB32.</p>
<p>5-) &#8220;../../lib/libhighgui.so.1.1.0: undefined reference to `av_free_packet&#8217; &#8220;</p>
<p>Add the following lines to cvcap_ffmpeg.cpp :</p>
<p>void av_free_packet(AVPacket *pkt)</p>
<p>{</p>
<p>if (pkt) {</p>
<p>if (pkt-&#62;destruct) pkt-&#62;destruct(pkt);</p>
<p>pkt-&#62;data = NULL; pkt-&#62;size = 0;</p>
<p>}</p>
<p>}</p>
<p>After getting rid of all the errors we type:<br />
&#62;&#62; sudo make install<br />
&#62;&#62; /sbin/ldconfig</p>
<p>Now we can run a program that uses OpenCV functions to verify that everything has been installed successfully.</p>
<p>&#8212;&#8212;&#8212;&#8212;-</p>
<p>Not sure is this step is necessary<br />
Download CMake module for OpenCV:<br />
<a href="http://opencv.willowgarage.com/wiki/Getting_started?action=AttachFile&#38;do=view&#38;target=FindOpenCV.cmake" target="_blank">http://opencv.willowgarage.com/wiki/Getting_started?action=AttachFile&#38;do=view&#38;target=FindOpenCV.cmake</a><br />
Save it to:  /usr/share/cmake/Modules</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>test is by followring the instructions here: http://www.rainsoft.de/projects/pwc.html</p>
<div>
<p><img src="http://img.zemanta.com/pixy.gif?x-id=ce688736-714a-8b12-ab8f-2bbec2b3671f" alt="" /></p>
</div>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Python script for resizing images and putting "black border"]]></title>
<link>http://tshah.wordpress.com/2009/11/11/python-script-for-resizing-images-and-putting-black-border/</link>
<pubDate>Wed, 11 Nov 2009 17:37:27 +0000</pubDate>
<dc:creator>tshah</dc:creator>
<guid>http://tshah.wordpress.com/2009/11/11/python-script-for-resizing-images-and-putting-black-border/</guid>
<description><![CDATA[As you may have noticed in my flashing images video, I had to get all the images the same size in or]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>As you may have noticed in my <a href="http://tshah.wordpress.com/2009/11/09/flashing-up-youtube/">flashing images video</a>,  I had to get all the images the same size in order to use ffmpeg to convert them into a video. However, since not all the images were the same size, I had to write a script that would put the black borders. So I used Python&#8217;s PIL to thumbnail the image and then save with a black border as a png file for ffmpeg to use. Here is the script that I used:</p>
<pre class="brush: python;">
#!/usr/bin/python
#(C) 2009 Tej A. Shah
#This program is free software: you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation, either version 3 of the License, or
#(at your option) any later version.
#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#GNU General Public License for more details.
#You should have received a copy of the GNU General Public License
#along with this program.  If not, see &#60;http://www.gnu.org/licenses/&#62;.

import os
import Image
import ImageDraw
from os.path import join, getsize

size = 1920,1080
counter = 0
names = []

for root, dirs, files in os.walk('wedding photos'):
	for name in files:
		names = names + [os.path.join(root,name)]

names.sort()

for name in names:
	print name
	newImg = Image.new(&#34;RGB&#34;,size)
	draw = ImageDraw.Draw(newImg)
	draw.rectangle((0,0,size),(0,0,0))
	del draw

	oldImg = Image.open(name)
	oldImg.thumbnail( size, Image.ANTIALIAS )
	oldImg = oldImg.convert(&#34;RGB&#34;)

	xStartPoint = (size[0] /2) - (oldImg.size[0]/2)
	newImg.paste(oldImg, (xStartPoint,0,xStartPoint + oldImg.size[0], size[1]) )

	counter = counter +1
	if counter &#60; 10:
		filename = &#34;000&#34; + str(counter)
	elif counter &#60; 100 :
		filename = &#34;00&#34; + str(counter)
	elif counter &#60; 1000 :
		filename = &#34;0&#34; + str(counter)
	else:
		filename = str(counter)
	newImg.save(&#34;makeMovie/&#34; + filename + &#34;.png&#34;,&#34;PNG&#34;)
</pre>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Flashing up Youtube]]></title>
<link>http://tshah.wordpress.com/2009/11/09/flashing-up-youtube/</link>
<pubDate>Mon, 09 Nov 2009 23:48:58 +0000</pubDate>
<dc:creator>tshah</dc:creator>
<guid>http://tshah.wordpress.com/2009/11/09/flashing-up-youtube/</guid>
<description><![CDATA[I decided to test out how Youtube will handle a video that flashes images at 30 frames a second. Ple]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I decided to test out how Youtube will handle a video that flashes images at 30 frames a second. Please stop the movie if you feel dizzy <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> .<br />
<span style='text-align:center; display: block;'><object width='425' height='350'><param name='movie' value='http://www.youtube.com/v/L3oiDQEvHhc&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;hd=0' /><param name='allowfullscreen' value='true' /><param name='wmode' value='transparent' /><embed src='http://www.youtube.com/v/L3oiDQEvHhc&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;hd=0' type='application/x-shockwave-flash' allowfullscreen='true' width='425' height='350' wmode='transparent'></embed></object></span></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Convert any video file to DVD]]></title>
<link>http://rixbuntu.wordpress.com/2009/11/09/convert-any-video-file-to-dvd/</link>
<pubDate>Mon, 09 Nov 2009 21:07:50 +0000</pubDate>
<dc:creator>Rix</dc:creator>
<guid>http://rixbuntu.wordpress.com/2009/11/09/convert-any-video-file-to-dvd/</guid>
<description><![CDATA[Previously I posted, pointing to a tutorial on converting AVI files to DVD. The tutorial below build]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Previously I posted,  <a title="AVI to DVD" href="http://rixbuntu.wordpress.com/2008/10/04/avi-to-dvd/">pointing to a tutorial on converting AVI files to DVD</a>.  The tutorial below builds on that one, using different tools for the conversion of the input file to an MPG format.  Please be aware that the DVD created by following these steps will not have a menu.</p>
<p><!--more--></p>
<h3>Step 1: Convert the file to MPG</h3>
<p>Instead of using <strong>transcode</strong> to rip apart the input file and then multiplexing the new files back together with <strong>mplex</strong>, you can use <strong>ffmpeg</strong> to do the full conversion.  It should work for any video file.  I have had success using it on AVI, MKV and FLV files, regardless of the codecs inside the wrapper.</p>
<p>For the sake of this tutorial, we will generate an output file with the name &#8220;output.mpg&#8221; that we will then reference in other commands.  Change &#8220;input.file&#8221; to the name of the file that you want to convert.</p>
<p><code>ffmpeg -i input.file -target dvd -copyts -aspect 16:9 output.mpg</code></p>
<blockquote><p>Note: if your file&#8217;s aspect ration is 4:3, use that ratio instead of 16:9.  Also, if you need PAL instead of NTSC, change the <code>-target dvd</code> to <code>-target pal-dvd</code>.</p></blockquote>
<p>Now if you get an error (like many Ubuntu 9.04 users have) indicating “Unknown encoder ‘mpeg2video’”, try this trick that I found at <a title="ffmpeg Unknown encoder 'mpeg2video'" href="http://www.somekindofpaper.info/articles/2009/08/18/ffmpeg-unknown-encoder-mpeg2video.html" target="_blank">the Paper Inside blog</a>.  Basically, it wipes out the <strong>ffmpeg</strong> that you currently have (with stripped libraries) and reinstalls it with the unstripped libraries.  Be sure to capture the full line on the last command, as it goes on for quite a bit.</p>
<p><code>sudo apt-get purge ffmpeg</code></p>
<p><code>sudo apt-get update</code></p>
<p><code>sudo apt-get install libavcodec-unstripped-52 libavdevice-unstripped-52 libavformat-unstripped-52 libavutil-unstripped-49 libpostproc-unstripped-51 libswscale-unstripped-0 ffmpeg</code></p>
<blockquote><p>Note: Paper Inside&#8217;s command installs <code>libavcodec-unstripped-<strong>51</strong></code> and mine installs <code>libavcodec-unstripped-<strong>52</strong></code>.  I guess the repos must have changed since his post, as I couldn&#8217;t find 51.  The 52 library worked perfectly for me, though.</p></blockquote>
<h3>Step 2: Make a folder for your your titlesets to go into</h3>
<p>The folder needs to be in the same location as your MPG file you just made.  For this example, we&#8217;ll create a folder called DVD:</p>
<p><code>mkdir DVD</code></p>
<h3>Step 3: Make an XML file</h3>
<p>Again, in the same location as the file and folder you just made, create a text file called dvdauthor.xml:</p>
<p><code>touch dvdauthor.xml</code></p>
<p>And then populate that file with the following content, using your favorite text editor:</p>
<p><code>&#60;dvdauthor dest="DVD"&#62;<br />
&#60;vmgm /&#62;<br />
&#60;titleset&#62;<br />
&#60;titles&#62;<br />
&#60;pgc&#62;<br />
&#60;vob file="output.mpg" chapters="0,5:00,10:00,15:00,20:00"/&#62;<br />
&#60;/pgc&#62;<br />
&#60;/titles&#62;<br />
&#60;/titleset&#62;<br />
&#60;/dvdauthor&#62;<br />
</code></p>
<blockquote><p>Note the double quotes around the name of your MPG file.  You can make the chapters at whatever increments you want by editing the time values.  Also, if you want your finished DVD to play more than one video, just add a second pgc section to you dvdauthor.xml file like this:<br />
<code>&#60;dvdauthor dest="DVD"&#62;<br />
&#60;vmgm /&#62;<br />
&#60;titleset&#62;<br />
&#60;titles&#62;<br />
&#60;pgc&#62;<br />
&#60;vob file="output.mpg" chapters="0,5:00,10:00,15:00,20:00"/&#62;<br />
&#60;/pgc&#62;<strong><br />
&#60;pgc&#62;<br />
&#60;vob file="output2.mpg" chapters="0,5:00,10:00,15:00,20:00"/&#62;<br />
&#60;/pgc&#62;</strong><br />
&#60;/titles&#62;<br />
&#60;/titleset&#62;<br />
&#60;/dvdauthor&#62;<br />
</code></p></blockquote>
<h3>Step 4: Convert the MPG file to DVD titlesets</h3>
<p>This <strong>dvdauthor</strong> command will populate the DVD folder you made with an AUDIO_TS and VIDEO_TS folder and populate the VIDEO_TS folder with the .vob and other files necessary for DVD playback.<br />
<code><br />
dvdauthor -x dvdauthor.xml<br />
</code></p>
<h3>Step 5: Convert the titlesets into an ISO</h3>
<p>This <strong>mkisofs</strong> command will take the DVD titleset folder you just made and copy it over to an ISO file that will be ready to burn to a DVD.  The syntax for <strong>mkisofs</strong> is pretty straightforward, though different from some other input/output tools.  In order to generate my .iso files, I use the following options in <strong>mkisofs</strong>:</p>
<ul>
<li><strong>-o</strong> to indicate the output file location and name</li>
<li><strong>-V</strong> to set the volume label on the .iso file (which some DVD players and media players will display when they begin playing the DVD or ISO file)</li>
<li><strong>-dvd-video</strong> to generate a DVD-Video compliant UDF file system</li>
</ul>
<p>In the command below, change the output argument (after the <strong>-o</strong>) to whatever you want the ISO file to be called and the volume label argument (after the <strong>-V</strong>) to whatever you want the volume label to read. The final argument is the input, and it references the DVD folder that we made above (the one we populated with our titlesets,) so leave it the same unless you put your titlesets somewhere else.  If so, remember that the input for <strong>mkisofs</strong> should reference the folder that <em>contains</em> the AUDIO_TS and VIDEO_TS folders.</p>
<p><code>mkisofs -dvd-video -o mydvd.iso -V MYDVD DVD</code></p>
<h3>Step 6: Burn the ISO file to a disc</h3>
<p>Now you have a DVD image ready to be burned to a DVD disc.  You can check the image before burning by opening it with VLC.  It should play in VLC just like any other video file.  And while there are probably command line tools for burning to DVD, I always use Brasero&#8217;s &#8220;burn image&#8221; option.  You can burn the ISO to a DVD-RW disc to try it out in your DVD player before committing the image to a DVD-R.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[swf2avi conversion project]]></title>
<link>http://dragkh.wordpress.com/2009/11/04/swf2avi-conversion-project/</link>
<pubDate>Wed, 04 Nov 2009 17:52:10 +0000</pubDate>
<dc:creator>dragkh</dc:creator>
<guid>http://dragkh.wordpress.com/2009/11/04/swf2avi-conversion-project/</guid>
<description><![CDATA[SWF2AVI &#8211; stable on Slackware 12.2, source: swf + xml + pics info via mysql : result : movie w]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>SWF2AVI &#8211; stable on Slackware 12.2,<br />
source: swf + xml + pics info via mysql : result : movie with codec Microsoft MPEG-4 V2  ,</p>
<p>conversion via oficial Adobe Flash player 10,0,32,18<br />
project considered closed</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Screen Recording dengan FFmpeg]]></title>
<link>http://linuxrunway.wordpress.com/2009/11/03/screen-recording-dengan-ffmpeg/</link>
<pubDate>Tue, 03 Nov 2009 15:32:31 +0000</pubDate>
<dc:creator>azhar</dc:creator>
<guid>http://linuxrunway.wordpress.com/2009/11/03/screen-recording-dengan-ffmpeg/</guid>
<description><![CDATA[Sudah kenal ffmpeg? Aplikasi yang sering digunakan untuk menkonversi video dan audio ini begitu powe]]></description>
<content:encoded><![CDATA[Sudah kenal ffmpeg? Aplikasi yang sering digunakan untuk menkonversi video dan audio ini begitu powe]]></content:encoded>
</item>

</channel>
</rss>
