<?xml version="1.0" encoding="UTF-8"?> <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/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
> <channel><title>Autarchy of the Private Cavelibmp3lame &#187;</title> <atom:link href="http://bogdan.org.ua/tags/libmp3lame/feed" rel="self" type="application/rss+xml" /><link>http://bogdan.org.ua</link> <description>Tiny bits of bioinformatics, [web-]programming etc</description> <lastBuildDate>Tue, 15 May 2012 21:56:55 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.2</generator> <item><title>How to use ffmpeg if libmp3lame support is not present</title><link>http://bogdan.org.ua/2008/04/12/how-to-use-ffmpeg-if-libmp3lame-support-is-not-present.html</link> <comments>http://bogdan.org.ua/2008/04/12/how-to-use-ffmpeg-if-libmp3lame-support-is-not-present.html#comments</comments> <pubDate>Sat, 12 Apr 2008 20:41:07 +0000</pubDate> <dc:creator>Bogdan</dc:creator> <category><![CDATA[Software]]></category> <category><![CDATA[direct stream copy]]></category> <category><![CDATA[example]]></category> <category><![CDATA[ffmpeg]]></category> <category><![CDATA[libmp3lame]]></category> <category><![CDATA[sample command]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/?p=291</guid> <description><![CDATA[I&#8217;m providing regularly updated compiled linux and freebsd ffmpeg binaries, and also described how to use ffmpeg on shared hostings if not all the required libraries (like libmp3lame) are present. However, the solution recommended might not &#8220;fit all&#8221;, so here is another one &#8211; simpler and even more portable/universal than setting LD_LIBRARY_PATH. The solution is [...]]]></description> <content:encoded><![CDATA[<p>I&#8217;m providing <a
href="http://bogdan.org.ua/2007/06/28/compiled-linux-ffmpeg-binary-for-gallery2-download.html">regularly updated compiled linux and freebsd ffmpeg binaries</a>, and also <a
href="http://bogdan.org.ua/2008/03/12/instructions-on-installing-libmp3lame-enabled-ffmpeg-on-shared-linux-hosting.html">described how to use ffmpeg on shared hostings if not all the required libraries (like libmp3lame) are present</a>. However, the solution recommended might not &#8220;fit all&#8221;, so here is another one &#8211; simpler and even more portable/universal than setting LD_LIBRARY_PATH.<br
/> <span
id="more-291"></span><br
/> The solution is simple &#8211; I first proposed it in the <a
href="http://drupal.org/node/137203#comment-802272">Getting ffmpeg working with flashvideo on various platforms</a> issue page on <a
href="http://drupal.org/">Drupal.org</a>.</p><p>The idea is: if the original audio stream in the file is already compressed (most of the time it is), then you do not need to recompress it &#8211; and do not need libmp3lame or any other audio codec! To achieve the &#8220;ffmpeg direct stream copy&#8221; functionality, you can add one of the two options:<br
/> <strong>-vcodec copy</strong> will direct-stream-copy video (no re-compression),<br
/> <strong>-acodec copy</strong> will direct-stream-copy audio (no re-compression).</p><p>In other words, ffmpeg option <strong>-acodec copy</strong> should just copy the original audio from input file to output file without alteration, and will not require any audio codecs support.</p><p>Sample command line could be (in the example, a 1-minute fragment of the input file is just copied into the output file):</p><p><strong>ffmpeg -t 00:01:00 -i movie.avi -vcodec copy -acodec copy preview.avi</strong></p><p>This tip is based on the information initially obtained from the ffmpeg-user mailing list archive for June of 2005.</p><p><a
class="a2a_button_google_plusone addtoany_special_service" data-href="http://bogdan.org.ua/2008/04/12/how-to-use-ffmpeg-if-libmp3lame-support-is-not-present.html"></a><a
class="a2a_button_facebook_like addtoany_special_service" data-href="http://bogdan.org.ua/2008/04/12/how-to-use-ffmpeg-if-libmp3lame-support-is-not-present.html"></a><a
class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbogdan.org.ua%2F2008%2F04%2F12%2Fhow-to-use-ffmpeg-if-libmp3lame-support-is-not-present.html&amp;title=How%20to%20use%20ffmpeg%20if%20libmp3lame%20support%20is%20not%20present" id="wpa2a_4"><img
src="http://bogdan.org.ua/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share"/></a></p>]]></content:encoded> <wfw:commentRss>http://bogdan.org.ua/2008/04/12/how-to-use-ffmpeg-if-libmp3lame-support-is-not-present.html/feed</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>Instructions on installing libmp3lame-enabled ffmpeg on shared linux hosting</title><link>http://bogdan.org.ua/2008/03/12/instructions-on-installing-libmp3lame-enabled-ffmpeg-on-shared-linux-hosting.html</link> <comments>http://bogdan.org.ua/2008/03/12/instructions-on-installing-libmp3lame-enabled-ffmpeg-on-shared-linux-hosting.html#comments</comments> <pubDate>Wed, 12 Mar 2008 06:25:54 +0000</pubDate> <dc:creator>Bogdan</dc:creator> <category><![CDATA[*nix]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Web]]></category> <category><![CDATA[ffmpeg]]></category> <category><![CDATA[install]]></category> <category><![CDATA[libmp3lame]]></category> <category><![CDATA[linux]]></category> <category><![CDATA[shared hosting]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/2008/03/12/instructions-on-installing-libmp3lame-enabled-ffmpeg-on-shared-linux-hosting.html</guid> <description><![CDATA[Note: this post is based on the comment by Simon, who generously shared his experience. Step-by-step: Download the compiled ffmpeg with libmp3lame support (direct download links: older version ffmpeg.with.lame and newer version ffmpeg.2007-10-28.with-libmp3lame-support). Rename the downloaded executable file to "ffmpeg" (no extension), upload it to the directory on your server (in this example /home/myusername/). Download [...]]]></description> <content:encoded><![CDATA[<p><em>Note:</em> this post is based on the <a
href="http://bogdan.org.ua/2007/10/25/using-libmp3lame-enabled-ffmpeg-on-shared-hosting.html#comment-59670">comment by Simon</a>, who generously shared his experience.</p><p>Step-by-step:</p><ul><li>Download the <a
title="this page will be irregularly updated with new compiled binaries of ffmpeg" href="http://bogdan.org.ua/2007/06/28/compiled-linux-ffmpeg-binary-for-gallery2-download.html">compiled ffmpeg with libmp3lame support</a> (direct download links: older version <a
href="http://bogdan.org.ua/wp-content/uploads/2007/06/ffmpeg.with.lame">ffmpeg.with.lame</a> and newer version <a
href="http://bogdan.org.ua/wp-content/uploads/2007/10/ffmpeg.2007-10-28.with-libmp3lame-support">ffmpeg.2007-10-28.with-libmp3lame-support</a>).</li><li>Rename the downloaded executable file to "ffmpeg" (no extension), upload it to the directory on your server (in this example /home/myusername/).</li><li>Download <a
href="http://bogdan.org.ua/wp-content/uploads/2008/03/libmp3lame.so.0">libmp3lame.so.0</a>.</li><li>Upload libmp3lame.so.0 to the same directory where you placed ffmpeg in.</li><li>Create a php file with the following code (remember to change the paths to your own, where you actually uploaded binaries in previous steps):<div
class="igBar"><span
id="lphp-3"><a
href="#" onclick="javascript:showPlainTxt('php-3'); return false;">PLAIN TEXT</a></span></div><div
class="syntax_hilite"><span
class="langName">PHP:</span><div
id="php-3"><div
class="php"><ol><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span
style="color:#000000; font-weight:bold;">&lt;?php</span></div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a
href="http://www.php.net/exec"><span
style="color:#000066;">exec</span></a><span
style="color:#006600; font-weight:bold;">&#40;</span><span
style="color:#FF0000;">"export LD_LIBRARY_PATH=/home/myusername/"</span><span
style="color:#006600; font-weight:bold;">&#41;</span>;</div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a
href="http://www.php.net/echo"><span
style="color:#000066;">echo</span></a> <a
href="http://www.php.net/passthru"><span
style="color:#000066;">passthru</span></a><span
style="color:#006600; font-weight:bold;">&#40;</span><span
style="color:#FF0000;">"/home/myusername/ffmpeg -formats"</span><span
style="color:#006600; font-weight:bold;">&#41;</span>;</div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span
style="color:#000000; font-weight:bold;">?&gt;</span></div></li></ol></div></div></div><p></li><li>If you access that PHP file with your browser, you should be able to see a list of formats which are supported by ffmpeg, and if you find "EA libmp3lame" somewhere in the output, then it means you now can Encode Audio in libmp3lame!</li><li>If that doesn't work for you: LD_LIBRARY_PATH can be a protected variable in PHP (you can check for this by searching for the "safe_mode_protected_env_vars" value in phpinfo() output). The workaround here can be to write your commands to a file from php, then <strong>chmod</strong> that file with 0755 permissions (rwx-rx-rx), and run the file through <strong>exec()</strong>. In this way, PHP is not changing the LD_LIBRARY_PATH, but telling the server to run a file, which tells the server to change it. This method worked for the original author of these instructions.</li></ul><p>For passing arguments to the PHP wrapper script - check out PHP's $argv variable (more on this <a
href="http://www.php.net/features.commandline">here</a>). If you decided to use shell-script as a wrapper for "export LD_LIBRARY_PATH", then using $1, $2 etc will allow you to pass parameters to the shell script, e.g. in the example below</p><div
class="igBar"><span
id="lcode-4"><a
href="#" onclick="javascript:showPlainTxt('code-4'); return false;">PLAIN TEXT</a></span></div><div
class="syntax_hilite"><span
class="langName">CODE:</span><div
id="code-4"><div
class="code"><ol><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#!/bin/bash</div></li><li
style="font-weight: bold;color:#26536A;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">export LD_LIBRARY_PATH=/home/myusername/</div></li><li
style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><div
style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">/home/myusername/ffmpeg -i /home/myusername/$<span
style="color:#800000;color:#800000;">1</span> $<span
style="color:#800000;color:#800000;">2</span> /home/myusername/$<span
style="color:#800000;color:#800000;">3</span></div></li></ol></div></div></div><p> you could pass "input file" as first argument, "parameters" as second and "output file" as third to make such a wrapper script work.</p><p><a
class="a2a_button_google_plusone addtoany_special_service" data-href="http://bogdan.org.ua/2008/03/12/instructions-on-installing-libmp3lame-enabled-ffmpeg-on-shared-linux-hosting.html"></a><a
class="a2a_button_facebook_like addtoany_special_service" data-href="http://bogdan.org.ua/2008/03/12/instructions-on-installing-libmp3lame-enabled-ffmpeg-on-shared-linux-hosting.html"></a><a
class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbogdan.org.ua%2F2008%2F03%2F12%2Finstructions-on-installing-libmp3lame-enabled-ffmpeg-on-shared-linux-hosting.html&amp;title=Instructions%20on%20installing%20libmp3lame-enabled%20ffmpeg%20on%20shared%20linux%20hosting" id="wpa2a_8"><img
src="http://bogdan.org.ua/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share"/></a></p>]]></content:encoded> <wfw:commentRss>http://bogdan.org.ua/2008/03/12/instructions-on-installing-libmp3lame-enabled-ffmpeg-on-shared-linux-hosting.html/feed</wfw:commentRss> <slash:comments>16</slash:comments> </item> <item><title>Using libmp3lame-enabled ffmpeg on shared hosting</title><link>http://bogdan.org.ua/2007/10/25/using-libmp3lame-enabled-ffmpeg-on-shared-hosting.html</link> <comments>http://bogdan.org.ua/2007/10/25/using-libmp3lame-enabled-ffmpeg-on-shared-hosting.html#comments</comments> <pubDate>Thu, 25 Oct 2007 21:09:27 +0000</pubDate> <dc:creator>Bogdan</dc:creator> <category><![CDATA[*nix]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Web]]></category> <category><![CDATA[ffmpeg]]></category> <category><![CDATA[lame]]></category> <category><![CDATA[libmp3lame]]></category> <category><![CDATA[shared hosting]]></category> <guid
isPermaLink="false">http://bogdan.org.ua/2007/10/25/using-libmp3lame-enabled-ffmpeg-on-shared-hosting.html</guid> <description><![CDATA[Update: there's now a much more recent post on how to install libmp3lame-enabled ffmpeg on shared linux hosting. As Gabe pointed out in my post with compiled ffmpeg Linux binaries, there is a relatively simple method of adding libmp3lame.so.0 file to your shared hosting so that ffmpeg executable will see the library: You can upload [...]]]></description> <content:encoded><![CDATA[<p><ins
datetime="2008-03-12T06:35:24+00:00">Update:</ins> there's now a much more recent post on <a
href="http://bogdan.org.ua/2008/03/12/instructions-on-installing-libmp3lame-enabled-ffmpeg-on-shared-linux-hosting.html">how to install libmp3lame-enabled ffmpeg on shared linux hosting</a>.</p><p>As Gabe <a
href="http://bogdan.org.ua/2007/06/28/compiled-linux-ffmpeg-binary-for-gallery2-download.html#comment-31359">pointed out</a> in my post with <a
href="http://bogdan.org.ua/2007/06/28/compiled-linux-ffmpeg-binary-for-gallery2-download.html">compiled ffmpeg Linux binaries</a>, there is a relatively simple method of adding libmp3lame.so.0 file to your shared hosting so that ffmpeg executable will see the library:</p><blockquote><p>You can upload libmp4lame.so as well to the shared hosting site and when you call ffmpeg, call something to set an environment variable right before the call to ffmpeg i.e. in php I’d do exec(”export LD_LIBRARY_PATH=/path/to/lib/with/lame; /path/to/ffmpeg [ffmpegargs]”); That way you can use the uploaded lame. I hope that helps someone as I have been unable to find any info on how to use an uploaded lame. I’ve tried it and it works on godaddy.</p></blockquote><p>Hope this helps.</p><p><ins
datetime="2008-03-11T06:35:03+00:00">Update:</ins> here's <a
href="http://bogdan.org.ua/wp-content/uploads/2008/03/libmp3lame.so.0" title="libmp3lame.so.0 (from slackware 2.4.x, lame-3.97)">libmp3lame.so.0.0.0 (from slackware 2.4.x, lame-3.97)</a>. I have no idea if it'll work in your (shared hosting) environment; it is provided AS IS, use at your own risk etc. I can only state that the archived binary file at the moment of upload was indeed libmp3lame.so.0.0.0 from my elderly Slackware with 2.4.x kernel.</p><p><a
class="a2a_button_google_plusone addtoany_special_service" data-href="http://bogdan.org.ua/2007/10/25/using-libmp3lame-enabled-ffmpeg-on-shared-hosting.html"></a><a
class="a2a_button_facebook_like addtoany_special_service" data-href="http://bogdan.org.ua/2007/10/25/using-libmp3lame-enabled-ffmpeg-on-shared-hosting.html"></a><a
class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbogdan.org.ua%2F2007%2F10%2F25%2Fusing-libmp3lame-enabled-ffmpeg-on-shared-hosting.html&amp;title=Using%20libmp3lame-enabled%20ffmpeg%20on%20shared%20hosting" id="wpa2a_12"><img
src="http://bogdan.org.ua/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share"/></a></p>]]></content:encoded> <wfw:commentRss>http://bogdan.org.ua/2007/10/25/using-libmp3lame-enabled-ffmpeg-on-shared-hosting.html/feed</wfw:commentRss> <slash:comments>9</slash:comments> </item> </channel> </rss>
