Streaming with ffmpeg ?

Forum for questions and support relating to the 1.24.x releases only.
Locked
timf
Posts: 132
Joined: Mon Mar 21, 2005 4:07 pm
Location: Lytham St.Annes Lancs.

Streaming with ffmpeg ?

Post by timf »

I thought I had ffmpeg working ok as it will generate files for download in mpg, wmv, avi formats just fine.

Out of interest I thought I'd try mpeg streaming - no success. found this in the logs

[Mon Feb 16 20:32:05 2009] [notice] Apache/2.2.9 (Ubuntu) PHP/5.2.6-2ubuntu4.1 with Suhosin-Patch configured -- resuming normal operations
[Mon Feb 16 20:33:36 2009] [error] [client 192.168.1.10] socket_sendto( /tmp/zms-221004s.sock ) failed: Connection refused, referer: http://192.168.1.228/html/zm/index.php?view=watch&mid=4
[Mon Feb 16 20:33:36 2009] [error] [client 192.168.1.10] array (\n 0 => \n array (\n 'file' => '/var/www/html/zm/ajax/stream.php',\n 'line' => 51,\n 'function' => 'ajaxError',\n 'args' => \n array (\n 0 => 'socket_sendto( /tmp/zms-221004s.sock ) failed: Connection refused',\n ),\n ),\n 1 => \n array (\n 'file' => '/var/www/html/zm/index.php',\n 'line' => 116,\n 'args' => \n array (\n 0 => '/var/www/html/zm/ajax/stream.php',\n ),\n 'function' => 'require_once',\n ),\n), referer: http://192.168.1.228/html/zm/index.php?view=watch&mid=4

Using latest everything - maybe a permission error ?

Tim
nuck
Posts: 148
Joined: Tue Nov 11, 2008 1:43 am
Location: Canada

Re: Streaming with ffmpeg ?

Post by nuck »

timf wrote:maybe a permission error ?
Tim
Safe bet. The log is reporting connection refused.
timf
Posts: 132
Joined: Mon Mar 21, 2005 4:07 pm
Location: Lytham St.Annes Lancs.

Permission error...

Post by timf »

that's what I thought , but the permissions for the tmp directory are ok.
So not sure where else to look for permission issues.
Will dig around a bit more - in the meantime any suggestions gratefully accepted :-)
szimszon
Posts: 26
Joined: Mon Nov 27, 2006 8:41 pm

Re: Streaming with ffmpeg ?

Post by szimszon »

timf wrote: [Mon Feb 16 20:32:05 2009] [notice] Apache/2.2.9 (Ubuntu) PHP/5.2.6-2ubuntu4.1 with Suhosin-Patch configured -- resuming normal operations
[Mon Feb 16 20:33:36 2009] [error] [client 192.168.1.10] socket_sendto( /tmp/zms-221004s.sock ) failed: Connection refused, referer: http://192.168.1.228/html/zm/index.php?view=watch&mid=4
[Mon Feb 16 20:33:36 2009] [error] [client 192.168.1.10] array (\n 0 => \n array (\n 'file' => '/var/www/html/zm/ajax/stream.php',\n 'line' => 51,\n 'function' => 'ajaxError',\n 'args' => \n array (\n 0 => 'socket_sendto( /tmp/zms-221004s.sock ) failed: Connection refused',\n ),\n ),\n 1 => \n array (\n 'file' => '/var/www/html/zm/index.php',\n 'line' => 116,\n 'args' => \n array (\n 0 => '/var/www/html/zm/ajax/stream.php',\n ),\n 'function' => 'require_once',\n ),\n), referer: http://192.168.1.228/html/zm/index.php?view=watch&mid=4
I have this issue too. I compiled 2 nights ago the latest ffmpeg and recompiled the released 1.24.0... With no luck :(
newvisionantenna
Posts: 381
Joined: Sat Jan 17, 2009 7:49 pm
Location: Germany

Post by newvisionantenna »

Timf,

Just had to wipe what I said and start over, had it confused on what you were saying. I'll get back with you if I find it works for me.

Ok, looks like the same issue here but the strange thing is I know this worked a couple builds ago on my DVD. I actually used it with IE7 and it worked fine, now it looks like something got changed up in ffmpeg or Zoneminder that's not allowing to it work.
szimszon
Posts: 26
Joined: Mon Nov 27, 2006 8:41 pm

Post by szimszon »

Now I have the latest ffmpeg (17530) and zoneminder (2785)

The video stream seems to work at least with "&format=avi" :)

But I had a lot of other trouble:

I use mediaplayerconnectivity plugin for ff and my media player was vlc. I got a message Unable to open stream. After I run vlc with the url from console I got TLS errors :) because my zoneminder is behind https :) but I didn't have a certificate to check the sites's own.

I was able to switch off the vlc's cert-checking (~/.vlc/vlcrc - tls-check-cert=0) after that the situation changed. There was stream but

Code: Select all

avi demuxer error: avi module discarded (invalid file)
So I went on by mplayer :-o

But I don't know that is it possible to play stream from https by mplayer at all.

At the end I got working streaming with:

Code: Select all

wget  --no-check-certificate "https://<domain.tld>/zm-cgi-bin/zms?mode=auto&monitor=1&scale=100&bitrate=75000&maxfps=10&format=avi" -q -O- | mplayer -cache 100 -noconsolecontrols file://-
It works for me :-D
Locked