View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 71 posts ] 
Go to page Previous  1, 2, 3, 4, 5

Print view Previous topic   Next topic  
Author Message
Search for:
 Post subject:
PostPosted: Mon Aug 06, 2007 6:34 am 
Offline
Joined: Sat May 26, 2007 9:51 pm
Posts: 130
bigB wrote:
Hi Tzoom84,

Awesome work on checking the update. At this stage, all i can think of is a permissions issue on the serverecording script (or some other file). Can you try running the script manually again under the apache user (www-data on my pc).

Can you describe the "funny video". If it is just bad quality, that can be changed using the 2nd parameter. Default is 128, 256, and 384 are also supported.

BigB.


Sorry for the very late response, been in and out of town lately.

Turns out since I created most of the files as root, they were given only root permissions. So I changed all my permissions to match what you recently listed.

Also, I do still get the "Video loading, click here if refresh fails after 10 seconds" message in the new window before the white window appears. I am guessing that is a good thing.

Lastly, I haven't been able to get an actual video lately, only that white screen after it refreshes. But when I DID get the video (when manually running as root), the video flickered a lot, went in and out of sync, and the colors were off (as in sometimes a green hue would come up over the screen, or the colors would warp). That may have been a streaming issue though.

I'll try and play around with it and get some better debugging / logging done sometime this week.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 06, 2007 4:57 pm 
Offline
Joined: Mon Feb 06, 2006 5:11 pm
Posts: 353
Location: Brisbane, Australia
Hi Tzoom84,

In the serverrecording script I make the assumption that the video is 25 FPS, I have made it check the fps of the video in a similar method it gets the width and height.

framerate=`/usr/bin/mplayer -vo dummy -identify $DIRECTORY/$file 2>&1 grep -E "ID_VIDEO_FPS" | cut -d= -f2`

and change the ffmpeg line to use "$framerate" instead of 25.

....... -f rawvideo -r "$framerate" -aspect 16:9 .....

Hopefully this should stop the strange sync and colour issue.

As for the main issue you appear to be having, try increasing the sleep period on line 115, and in the main php script.

If that fixes things, i'll try automating the wait loop.

BigB.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 06, 2007 8:33 pm 
Offline
Joined: Sat May 26, 2007 9:51 pm
Posts: 130
Thanks, that seemed to clear up video issues when running manually.
Now, I can run manually as user www-data from the console, i.e.
Code:
/var/www/mythweb/data/serverecording 1031_20070805180000.mpg 128


This works fine, except for one possible issue:
It seems that the ffmpeg process dies off as soon as mythtranscode is 100% complete (btw I raised the timeout to 10 for serverecording). This may have just been a coincidence... Yet the video seems to still run in the browser for several minutes after, possibly to the end. Has it buffered, or is this what is supposed to happen?

Secondly, if I add an ampersand to the last line of code so that the following is run:
Code:
/var/www/mythweb/data/serverecording 1031_20070805180000.mpg 128 &

then it NO LONGER works. Interestingly, only the serverecording and ffserver processes are ever run in this instance. mythtranscode and ffmpeg are never found as processes in the system.

Now since the web application uses an ampersand it doesn't work in the web unless I run from the console without that ampersand. Weird.

At this point I am guessing it is just an installation error on my part, or a configuration issue on my end. So I just wanted to report my status here, but will probably drop this for a little bit and move onto some other things for now.

Thanks for the debug help guys.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 06, 2007 8:34 pm 
Offline
Joined: Sat May 26, 2007 9:51 pm
Posts: 130
[Double Post]


Last edited by tzoom84 on Fri Aug 24, 2007 6:11 am, edited 1 time in total.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 23, 2007 10:55 pm 
Offline
Joined: Sat Jul 09, 2005 2:04 pm
Posts: 32
Does anyone know of a way to adapt this to work properly with streams that are in the process of recording?

When I've tried it, it appears to stop at the point where the stream is currently recording when I start to stream (ie the size of the mpg file when I start to stream is as far as ffmpeg will go). Is there a work-around for this?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 25, 2007 11:58 pm 
Offline
Joined: Mon Feb 06, 2006 5:11 pm
Posts: 353
Location: Brisbane, Australia
Hi Arxdb,

What you ask is possible. I have done a test run, but really don't feel like doing any work on it. If you want to give it a go I'll be more than happy to help.

If you look at the serverecording script, it uses mythtranscode to feed data to ffmpeg. To get it to work with a recording in progress, you need to use cat or tail. Both of these work differently, the later is good to watching a recording at its current position (similar to live tv). The data fed to ffmpeg will be mpeg data.

Here is a rough starting point;
tail -f -c 1000000 /myth/tv/file/to/stream.mpeg | ffmpeg -i - http://localhost:8090/feed1.ffm

The '-c 1000000' will begin by feeding 1MB of data to ffmpeg, then continue feeding data as the file grows.

NOTE: The line above replaces both the mythtranscode line, and ffmpeg line. If you use this line, you also don't need the fifos.

I hope this is enough to get you going.

BigB.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 07, 2007 3:46 am 
Offline
Joined: Tue Sep 04, 2007 7:57 pm
Posts: 12
Got this working with the new scripts on R5F1, but had to do some weird stuff. Changing all the /dev/null outputs to append to /var/log/mythtv/stream.log helped immensely.

I added a higher bitrate/resolution to data/serverecording since I am on a LAN, but it doesn't seem to work even though I also added a link in recorded.php:

Code:
else
if [ "$bitrate" -eq "576" ]; then
echo "
<Stream flash.swf>
Feed feed1.ffm
Format swf
AudioBitRate 16
AudioChannels 2
AudioSampleRate 22050
AudioCodec mp3
VideoBitRate 480
VideoFrameRate 16
VideoSize 400x224
VideoGopSize 20
VideoCodec flv
</Stream>
" >> /var/www/mythweb/data/ffserver.conf
fi


Update: found the problem I think; the metarefresh in streamrecording.php doesn't pass the bitrate parameter along to the &play url.

However, it seems that on every other playback attempt the ffserver gets killed prematurely. Try it again and it will work. Then, next playback, broken. Etc.

I changed my embed sizes to 800x450 instead of 530x300... much nicer.

It would be nice if that &play=true parameter was changed to an in-page JS update on the table contents so that copying the link or refreshing the page would work.

Finally... what would have to go down for some seek controls to happen in the flash object?

Thanks for all your excellent work so far, BigB.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 09, 2007 5:54 pm 
Offline
Joined: Mon Feb 06, 2006 5:11 pm
Posts: 353
Location: Brisbane, Australia
Hi Eweaver,

It would be great if you could change the php script to use JS instead of a refresh. I just fumbled my way though that part enough to get the job done. I like the general feel of MWF at the moment but there are a few extra features i would like to add, namely an intermediate config screen for bitrate, automatic commercial skipping, and window size.

It is a bit interesting that your additional bit rate did not work. When i get a chance i'll look at what areas need attention when a new bit rate is to be added.

Finally, mythtv developers are adding flash playback to mythweb. From what i have seen, it will have playback control etc. That implementation is not associated with me in any way.

Thanks for you comments and feedback. Believe it or not, i don't actually use this feature that much, so it's good to hear that people like it :-).

BigB.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 12, 2007 7:35 am 
Offline
Joined: Mon Feb 06, 2006 5:11 pm
Posts: 353
Location: Brisbane, Australia
Hi All,

I have made a few minor fixes to the flash scripts.

Firstly, i have tried to make the startup a bit more reliable. There is now a script that waits for the flash stream to be available before the streaming page is loaded the second time round.

Secondly, I have discovered that the mysql.txt link must be in the mythweb folder and not the mythweb/data folder.

Finally, some people have commented that the various bit rates were not working as expected. I found that if the description contained "" (double quotes) then the URL would be mel-formed, and the bit rate would never get passed. I have modified the part in recorded.php to do a global replace. I know i should do a quiery on this data, but i'm too lazy :-). Eweaver, i hope this helps you get 512kbps working.

I hope this helps out a few people.

BigB.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 12, 2007 7:24 pm 
Offline
Joined: Tue Sep 04, 2007 7:57 pm
Posts: 12
Got 512kb working a while back but it was too slow on my 811g uplink. Oh well. The problems are not related to your issue though.

If the MythTV project is adding official flash streaming I will just wait for that instead of making further improvements, I guess.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 14, 2007 9:49 pm 
Offline
Joined: Fri Dec 08, 2006 2:28 pm
Posts: 41
Location: New Orleans, LA
Very cool stuff -- seemed to work okay, using the info on http://www.knoppmythwiki.org/index.php?page=MythWebFlash except for one part.

Where it says to make a change to streamrecording.php, the line in the wiki reads like this:
Quote:
echo $_SERVER['PHP_SELF'] ."?file=".$_GET['file']."&title=".$_GET['title']."&subtitle=".$_GET['subtitle']."&description=".$$ echo '">Click here if refresh fails after 10 seconds.</a>';


But should be this:
Quote:
echo $_SERVER['PHP_SELF'] ."?file=".$_GET['file']."&title=".$_GET['title']."&subtitle=".$_GET['subtitle']."&description=".$_GET['description'].">Click here if refresh fails after 10 seconds.</a>";


Nice work! I'm curious to see what they build in to the next version of MythTV.

_________________
- Anthony
- P4/1.8GHz, 768MB RAM, PVR-150, GeForce FX 5200


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 71 posts ] 
Go to page Previous  1, 2, 3, 4, 5



All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 17 guests


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:  
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu