[mythtv-users] ffmpeg quality for Flash Files

Michael T. Dean mtdean at thirdcontact.com
Tue Jun 5 20:11:40 UTC 2007


On 06/05/2007 02:57 PM, Bob Cottingham wrote:
> On 6/5/07, Bob Cottingham <bobnvic at gmail.com> wrote:
>   
>> On 6/5/07, Michael T. Dean <mtdean at thirdcontact.com> wrote:
>>     
>>> On 06/04/2007 08:12 PM, Bob Cottingham wrote:
>>>       
>>>> I updated to the latest svn and removed the "2>/dev/null" to try to
>>>> troubleshoot my setup and found the following error in the logs:
>>>>
>>>> [Mon Jun 04 17:24:47 2007] [error] ModPerl::Util::exit: (120000) exit
>>>> was called at modules/stream/handler.pl line 137Compilation failed in
>>>> require at /var/www/mythweb/mythweb.pl line 60.\n
>>>>         
>>> That error would be output (on some systems--like yours and mine--at
>>> least) because line 137 uses "exit" rather than "CORE::exit".  However,
>>> line 137 is only executed if the ffmpeg call fails.  The error message
>>> you should have gotten is "Can't do ffmpeg: /usr/bin/ffmpeg -y -i
>>> <recording filename> -s 320x240 -r 24 -f flv -ac 2 -ar 11025 -ab 64k -b
>>> 256k /dev/stdout |".
>>>
>>> So, reasons you may get that include:
>>>    a) Your ffmpeg is installed in /usr/local/bin.  If so, "ln -s
>>> /usr/local/bin/ffmpeg /usr/bin/ffmpeg" should fix it.
>>>    b) Your recording files are not accessible (in the proper location)
>>> on your MythWeb server
>>>    c) Your ffmpeg is expecting different arguments
>>>    d) You removed too little/too much from the ffmpeg command line.
>>>    e) Something else...  :)
>>>       
>> Thanks. You called it in a). I made the symlink and then got the same
>> error, except at line 72 of the handler.pl file, which has the
>> following line right before the exit:
>>              "$basename does not exist in any recognized storage
>> group directories for this host.";
>>
>> The problem is that I am running my webserver on a machine that is not
>> a backend.  I don't know how it is referencing the file. The directory
>> with the video recording is in the same location on the webserver (via
>> nfs) as it is on the backend (/var/mythtv/tv). I installed mythweb on
>> a backend machine temporarily and it did work. Any idea how to get
>> around this?
> I added the hostname for my webserver to the storagegroups table with
> the dirname of /var/mythtv/tv (nfs mount of my masterbackend tv
> recording directory). Now I don't get the error, but nothing happens
> and there's no error at all now.
>   

What does your ffmpeg line look like in modules/stream/handler.pl?

Have you tried running the ffmpeg command at the command line?
/usr/bin/ffmpeg -y -i <recording filename> -s 320x240 -r 24 -f flv -ac 2
-ar 11025 -ab 64k -b 256k /dev/stdout

Do you have your ffmpeg compiled with mp3 support?

> I know that this won't work for all recordings because I also have
> slave backend which has its own storagegroup, but I know that the
> recording that I am trying to play is on the master backend
> storagegroup.

You just have to make sure that the mythweb server has all the storage
groups (i.e. group names) with the appropriate directories defined.  So,
if your slave backend has a storage group that's different from the
master backend's storage groups, just create another storage group on
the mythweb server.

If you're saying that you have the same storage group on the master and
the slave and the directory path is the same on the master and the
slave, but the the master and the slave are using different physical
storage (i.e. you're not using NFS so each only sees its own
recordings), you won't be able to get it to work without unionfs or
something.  It's probably easier, though, to just use a different path
on each host (i.e. /var/mythtv/tv1 on master and /var/mythtv/tv2 on
slave).  Then, just ensure the appropriate storage group (i.e. Default)
on the mythweb server has both directories listed (and that the NFS
shares are mounted in the same locations as on the backends).

But, you're saying that it does /not/ work until you define storage
groups for the mythweb host, right?  I.e. it does /not/ pick up the
master backend's storage groups?

Mike


More information about the mythtv-users mailing list