View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 12 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Wed Jan 06, 2010 10:18 pm 
Offline
Joined: Sun Nov 20, 2005 10:07 pm
Posts: 116
Ok, I know the flash based streaming is still experimental...

but what about the ASX streaming?

I try it with a recorded program in HDtv and it's about 5.5GB on the disk.

When I click on ASX and then open with VLC, lighttpd goes bonkers and
sucks up all RAM and SWAP and puts the machine in slog mode.

Should I not expect this to work yet? or do something different to watch via the web interface over my LAN?

Thanks,

-Ben


Last edited by bkamen on Wed Jan 13, 2010 6:14 pm, edited 1 time in total.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 10, 2010 5:47 pm 
Offline
Joined: Wed Jun 06, 2007 3:29 am
Posts: 38
Location: Australia
Quote:
lighttpd goes bonkers and sucks up all RAM and SWAP and puts the machine in slog mode.

I've noticed that behaviour too when copying recordings over my network from Mythweb via Firefox. Maybe file a bug report??


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 10, 2010 6:03 pm 
Offline
Joined: Sun Nov 20, 2005 10:07 pm
Posts: 116
I would - but I don't know if it's a bug yet.

I have notices if I transcode the video down to something smaller in size < 1GB (like 700-800MB), then streaming is no problem.

-Ben


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 12, 2010 2:30 am 
Offline
Joined: Mon Feb 06, 2006 5:11 pm
Posts: 353
Location: Brisbane, Australia
Hi,

I'm noticing that lighttpd likes to hold the entire file in ram while it services it out. I'm trying to work out if this behaviour can be changed, but i think reverting back to apache might be in order.

When you get your file down to 700MB, have a look at the amount of ram lighttpd uses when you download the recording.

BigB.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 12, 2010 11:45 am 
Offline
Joined: Sun Nov 20, 2005 10:07 pm
Posts: 116
bigB wrote:
Hi,

I'm noticing that lighttpd likes to hold the entire file in ram while it services it out. I'm trying to work out if this behaviour can be changed, but i think reverting back to apache might be in order.

When you get your file down to 700MB, have a look at the amount of ram lighttpd uses when you download the recording.



Yep!

And I've also discovered (although probably not news to readers here) that if you break the stream (close the ffmpeg flash playback or an ASX stream to VLC (which looks great after transcoding)) ffmpeg doesn't die off (not surprising) and lighttpd doesn't give up the file and go idle.

If you try and reload another ASX stream (I only did the same stream), a server 500 error occurs.

What would switching back to apache gain? (not being updated on such details)

-Ben


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 12, 2010 8:14 pm 
Offline
Joined: Mon Feb 06, 2006 5:11 pm
Posts: 353
Location: Brisbane, Australia
Hi Ben,

to make mythweb kill ffmpeg when the streaming is stopped by the user i edited mythweb/modules/stream/stream_flv.pl, and made the start of the file look like this

Code:
# Shutdown cleanup, of various types
    our $pgid = setpgrp(0,0);

    $SIG{'TERM'} = \&shutdown_handler;
    $SIG{'PIPE'} = \&shutdown_handler;
    END {
        shutdown_handler();
    }
    sub shutdown_handler {
        kill(-1, $pgid) if ($ffmpeg_pid);
    }
# Find ffmpeg


specifically the "setpgrp" and the "kill" lines

BigB.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 13, 2010 1:05 am 
Offline
Joined: Sun Nov 20, 2005 10:07 pm
Posts: 116
I don't have such a file.

looking in /data/srv/httpd/htdocs/mythweb/modules/stream:

I have:

handler.pl
init.php
set_protocol.php
(dir) tmpl


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 13, 2010 4:21 pm 
Offline
Joined: Mon Feb 06, 2006 5:11 pm
Posts: 353
Location: Brisbane, Australia
Hi Ben,

Sorry, that was for 0.22. You should be able to find something similar in handler.pl

BigB.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 13, 2010 6:00 pm 
Offline
Joined: Sun Nov 20, 2005 10:07 pm
Posts: 116
Ahhh, ok..

so what's in there (handler.pl) now is:

Code:
# Shutdown cleanup, of various types
    $SIG{'TERM'} = \&shutdown_handler;
    $SIG{'PIPE'} = \&shutdown_handler;
    END {
        shutdown_handler();
    }
    sub shutdown_handler {
        kill(1, $ffmpeg_pid) if ($ffmpeg_pid);
    }


You're saying I should add the line:

our $pgid = setpgrp(0,0);

and change the kil line to:

kill(-1, $pgid) if ($ffmpeg_pid);

??


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 13, 2010 6:02 pm 
Offline
Joined: Mon Feb 06, 2006 5:11 pm
Posts: 353
Location: Brisbane, Australia
Thats correct.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 13, 2010 6:10 pm 
Offline
Joined: Sun Nov 20, 2005 10:07 pm
Posts: 116
Fabulous. Works like a charm!

What does that do exactly? Kill off as root instead of something else?

Thanks!

-Ben


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 13, 2010 6:11 pm 
Offline
Joined: Mon Feb 06, 2006 5:11 pm
Posts: 353
Location: Brisbane, Australia
Excelent,

In the mean time, i've managed to break mythweb completely :-( But i won't trouble this thread with those issues :)

BigB.


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu