<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: ffmpeg, the flashvideo module and testing locally on Windows</title>
	<atom:link href="http://www.canarypromo.com/birdfeed/2008/05/31/ffmpeg-the-flashvideo-module-and-testing-locally-on-windows/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.canarypromo.com/birdfeed/2008/05/31/ffmpeg-the-flashvideo-module-and-testing-locally-on-windows/</link>
	<description>Droppings from the Canary Promotion + Design Team</description>
	<pubDate>Wed, 07 Jan 2009 13:49:17 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: John Refano</title>
		<link>http://www.canarypromo.com/birdfeed/2008/05/31/ffmpeg-the-flashvideo-module-and-testing-locally-on-windows/#comment-21873</link>
		<dc:creator>John Refano</dc:creator>
		<pubDate>Wed, 27 Aug 2008 17:54:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.canarypromo.com/birdfeed/?p=124#comment-21873</guid>
		<description>Hi Randal,

Without seeing your site or knowing what it does, that's a tough question to answer exactly.  However, I can give you some insight on how we sometimes use the FlashVideo module.  

For sites where things need to be a little more tricky than FlashVideo is by default, we usually end up using FlashVideo more for its ffmpeg interface than anything (&lt;a href="http://www.drupal.org/project/media_mover" rel="nofollow"&gt;Media Mover&lt;/a&gt; with the ffmpeg wrapper may ultimately turn out to be a better solution, but I have encountered &lt;a href="http://drupal.org/node/276852" rel="nofollow"&gt;bugs&lt;/a&gt; getting it to work locally on windows -- but I digress).  I will say that lately I don't really ever use the [video] tag.

So once we have the videos converting (and in your case, storing them in their respective per-user folders, which is a whole other can of worms), I suggest just using some relatively simple php to inject the url of your node's attached FLV video into the player html code.  Then you can easily specify a path to the player relative to your drupal installation.  That way the video player files don't need to be duplicated.  For example:


&lt;code&gt;&#60;?php &lt;br /&gt;
  foreach ($node-&#62;files as $file) {&lt;br /&gt;
  &#160;&#160;&#160;&#160;&#160;$filepath=&#34;/&#34;.$file-&#62;filepath;&lt;br /&gt;
  &#160;&#160;&#160;&#160;&#160;$file_extension = substr($filepath, -3, 3);&lt;br /&gt;
  &#160;&#160;&#160;&#160;&#160;if ($file_extension == &#34;flv&#34;) {&lt;br /&gt;
  &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;$video_url=&#34;&#38;file=&#34;.$filepath;&lt;br /&gt;
  &#160;&#160;&#160;&#160;&#160;}&lt;br /&gt;
}&lt;br /&gt;
?&#62;&lt;br/&gt;&#60;script type='text/javascript' src='/files/swfobject.js'&#62;&#60;/script&#62;&lt;br /&gt;
  &#60;div id='player'&#62;Loading Video Player&#60;/div&#62;&lt;/p&gt;
&lt;br/&gt;&#60;script type='text/javascript'&#62;&lt;br /&gt;
  var s1 = new SWFObject('/files/player.swf','player','400','300','9');&lt;br /&gt;
  s1.addParam('allowfullscreen','true');&lt;br /&gt;
  s1.addParam('allowscriptaccess','always');&lt;br /&gt;
  s1.addParam('wmode','opaque');&lt;br /&gt;
  s1.addParam('flashvars','&#60;?php print $video_url; ?&#62;');&lt;br /&gt;
  s1.write('player');&lt;br /&gt;
  &#60;/script&#62;&lt;/code&gt;

 
Hopefully this helps.</description>
		<content:encoded><![CDATA[<p>Hi Randal,</p>
<p>Without seeing your site or knowing what it does, that&#8217;s a tough question to answer exactly.  However, I can give you some insight on how we sometimes use the FlashVideo module.  </p>
<p>For sites where things need to be a little more tricky than FlashVideo is by default, we usually end up using FlashVideo more for its ffmpeg interface than anything (<a href="http://www.drupal.org/project/media_mover" rel="nofollow">Media Mover</a> with the ffmpeg wrapper may ultimately turn out to be a better solution, but I have encountered <a href="http://drupal.org/node/276852" rel="nofollow">bugs</a> getting it to work locally on windows &#8212; but I digress).  I will say that lately I don&#8217;t really ever use the [video] tag.</p>
<p>So once we have the videos converting (and in your case, storing them in their respective per-user folders, which is a whole other can of worms), I suggest just using some relatively simple php to inject the url of your node&#8217;s attached FLV video into the player html code.  Then you can easily specify a path to the player relative to your drupal installation.  That way the video player files don&#8217;t need to be duplicated.  For example:</p>
<p><code>&lt;?php <br />
  foreach ($node-&gt;files as $file) {<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$filepath=&quot;/&quot;.$file-&gt;filepath;<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$file_extension = substr($filepath, -3, 3);<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if ($file_extension == &quot;flv&quot;) {<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$video_url=&quot;&amp;file=&quot;.$filepath;<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
}<br />
?&gt;<br />&lt;script type=&#8217;text/javascript&#8217; src=&#8217;/files/swfobject.js&#8217;&gt;&lt;/script&gt;<br />
  &lt;div id=&#8217;player&#8217;&gt;Loading Video Player&lt;/div&gt;<br />
<br />&lt;script type=&#8217;text/javascript&#8217;&gt;<br />
  var s1 = new SWFObject(&#8217;/files/player.swf&#8217;,'player&#8217;,'400&#8242;,&#8217;300&#8242;,&#8217;9&#8242;);<br />
  s1.addParam(&#8217;allowfullscreen&#8217;,'true&#8217;);<br />
  s1.addParam(&#8217;allowscriptaccess&#8217;,'always&#8217;);<br />
  s1.addParam(&#8217;wmode&#8217;,'opaque&#8217;);<br />
  s1.addParam(&#8217;flashvars&#8217;,'&lt;?php print $video_url; ?&gt;&#8217;);<br />
  s1.write(&#8217;player&#8217;);<br />
  &lt;/script&gt;</code></p>
<p>Hopefully this helps.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Randal</title>
		<link>http://www.canarypromo.com/birdfeed/2008/05/31/ffmpeg-the-flashvideo-module-and-testing-locally-on-windows/#comment-21871</link>
		<dc:creator>Randal</dc:creator>
		<pubDate>Wed, 27 Aug 2008 16:34:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.canarypromo.com/birdfeed/?p=124#comment-21871</guid>
		<description>Thanks for writing this.  Im writing up a similar how-to for the FlashVideo module using WampServer.  What im wondering is if we can use per-user folders for the uploaded video content ?  It seems the player would have to be copied to each folder in this case.  Any ideas or suggestions ?</description>
		<content:encoded><![CDATA[<p>Thanks for writing this.  Im writing up a similar how-to for the FlashVideo module using WampServer.  What im wondering is if we can use per-user folders for the uploaded video content ?  It seems the player would have to be copied to each folder in this case.  Any ideas or suggestions ?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
