View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 37 posts ] 
Go to page 1, 2, 3  Next

Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Wed Jan 17, 2007 1:11 pm 
Offline
Joined: Fri Dec 29, 2006 12:37 pm
Posts: 11
Hi,

I installed Knoppmyth R5E50 on a system with an AthlonXP 2600+ processor, 1 GB RAM, 110 GB hard drive and a Hauppauge PVR-500 encoder card. Both the backend and frontend are on this same box, which is connected to my LAN. This is my first experience attempting to provide streaming video.

The install of the OS appeared to go fine. I think I set up MythTV correctly. I can stream, record and play recordings on the frontend box. The MythWeb page loads on a client browser within my LAN. The virtual remote does not work, but that is OK for now.

There are a few issues that have me vexed and that I have not be able to find an answer to on this board.

First: When I click the thumb nail picture of a program I recorded, I get the following output on firefox:
Code:
'; echo ''; if(!isset($_GET['play'])){ echo ''; } echo ''; echo ''; echo ''; // Set the desired page title $page_title = 'MythWeb - Stream recording'; // Print the page header require 'modules/_shared/tmpl/default/header.php'; if(!isset($_GET['file'])){ print"

You can not access this page directly!
"; die; } if(!isset($_GET['width'])){ $width = '300'; } else { $width = $_GET['width']; } if(!isset($_GET['title'])){ $title = 'Unknown Title'; } else { $title = $_GET['title']; } if(!isset($_GET['subtitle'])){ $subtitle = ''; } else { $subtitle = $_GET['subtitle']; } if(!isset($_GET['description'])){ $description = ''; } else { $description = $_GET['description']; } if(!isset($_GET['height'])){ $height = '220'; //accounts for toolbar at bottom } else { $height = $_GET['height']; } $toplay = $_GET['file']; if(!isset($_GET['play'])){ system ("bash -c \"exec nohup setsid /var/www/mythweb/data/serverecording $toplay 1> /dev/null 2> /dev/null &\""); } ?>
Loading, Please wait... Click here if refresh fails after 10 seconds.    


In Internet Explorer, when I click on the same thumbnail of a recording, I get the "Page cannot be found. HTTP 400 Bad Request" error.

If I was to click on the Title or Subtitle link to a recording, Windows Media player would launch, try to connect then I would get the following error:
Code:
"connecting to media"   "Windows media player cannot play the file because a network error occurred. The server might not be available. Verify that you are connected to the network and that your proxy settings are correct.

I am not using a proxy server, so this is not an issue.

I locked down the settings on my ethernet card to 100-FD, and did the same in the switch the KnoppMyth box is connected through. There have been no errors reported through this port on my switch.

If I scp one of the mpg recordings to my client PC, I can play it on the VLC media player, but it craps out Windows media player. If i copy the link mms://xxx.xxx.xx.xxx/xxxx.mpg into either the VLC or Windows media player, I get network errors. VLC reports:
Code:
main debug: select timed out
main error: Connection to xxx.xxx.xx.xxx port 8001 failed: Connection timed out
access_mms error: failed to open a connection (tcp)
access_mms debug: waiting for connection...
main debug: net: connecting to xxx.xxx.xx.xxx port 8001
main debug: connection in progress
main debug: select timed out
main error: Connection to xxx.xxx.xx.xxx port 8001 failed: Connection timed out
access_mms error: failed to open a connection (tcp)
access_mms error: cannot connect to server
main debug: net: connecting to xxx.xxx.xx.xxx port 8001
main debug: connection in progress
main debug: select timed out
main error: Connection to xxx.xxx.xx.xxx port 8001 failed: Connection timed out
access_mms error: cannot connect to xxx.xxx.xx.xxx:8001
vcd debug: trying .cue file: xxx.xxx.xx.xxx:8001/1002_20070112142700.cue
vcd debug: could not find .cue file
access_file warning: xxx.xxx.xx.xxx:8001/1002_20070112142700.mpg: No such file or directory
cdda debug: trying .cue file: xxx.xxx.xx.xxx:8001/1002_20070112142700.cue
cdda debug: could not find .cue file
cdda warning: could not open xxx.xxx.xx.xxx:8001/1002_20070112142700.mpg
main warning: no access2 module matching "mms" could be loaded
main error: no suitable access module for `mms://xxx.xxx.xx.xxx:8001/1002_20070112142700.mpg'
main debug: thread times: real 0m15.406250s, kernel 0m0.046875s, user 0m0.000000s
main debug: thread 4056 joined (input/input.c:412)
main: nothing to play


There are some odd network issues I think because I am not always able to scp these files (after about 3 minutes and very little progress, I usually cancel the file copy). Also, VNC is ridiculously slow to load and refresh pages.

I also cannot stream live audio.

I hope I included enough information here. If not, let me know. Any help would be greatly appreciated.

Thanks,
Ken[/code]


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 17, 2007 9:58 pm 
Offline
Joined: Mon Feb 06, 2006 5:11 pm
Posts: 353
Location: Brisbane, Australia
Hi Ken,

I'm responsible for the first list of errors you posted, where you are clicking on the thumbnail. This is ment to give flash streaming of that recording, but you don't even get the play back screen.

Is the text you posted appearing in a new blank screen with black text?

There maybe an issue with some of the files in the R5E50 distro, I wonder if anyone else is having these issues.

This is the full HOWTO on the wiki to get this 'feature' going in R5D1 Myth0.20, i wonder if some of the files have errors. Find the section on that page that relating to '/var/www/mythweb/modules/tv/tmpl/default/streamrecording.php' and do a compare with the version on your system. It could be a line wrap issue.

http://knoppmythwiki.org/index.php?page=MythWebFlash

Let me know how you go.

BigB.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 18, 2007 8:04 am 
Offline
Joined: Fri Dec 29, 2006 12:37 pm
Posts: 11
bigB wrote:
Is the text you posted appearing in a new blank screen with black text?

Yes, a new window opens, the text is in black, then the screen refreshes to the program listing page.

There is one difference between my version of /var/www/mythweb/modules/tv/tmpl/default/streamrecording.php and the version posted on the link you provided.

The last line of my version (line # 111) reads:
Code:
</body></html>/body></html>

Appears there is too many sets of tags, and the second body tag is off.

I changed this line to:
Quote:
</body></html>

Which is how it is on the version on the howto page.

However, I still get the same result (a new window opening with the same black text). I am going to assure the other files referenced in the howto page are correct on my system as well.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 18, 2007 4:39 pm 
Offline
Joined: Sat Feb 04, 2006 1:50 pm
Posts: 24
I'm having the same problem with the flash streaming in R5E50. The page refreshes but the .flv does not load. It does not even seem to exist according to the stat.html page. The link on there to the .flv does not work.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 18, 2007 4:52 pm 
Offline
Joined: Mon Feb 06, 2006 5:11 pm
Posts: 353
Location: Brisbane, Australia
Hi,

What version of ffmpeg is in R5E50? If it is 0.4.9 pre1 then streaming appears to be broken in this version. In R5D1 I used APT to 'update' mine. I find that i only get reasonable results when the source file is an MPEG file, nuv appears to stop streaming after a short time.

kenapp, not sure where to go with you. I may have to grab a copy of R5E50 and check the php source.

Sorry about this, I believe it is such a good feature, but out of the 5 or so people i have spoken too, only 1 has had success. :-(

There is more talks in this thread
http://mysettopbox.tv/phpBB2/viewtopic.php?t=12839

BigB.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 19, 2007 1:48 pm 
Offline
Joined: Fri Dec 29, 2006 12:37 pm
Posts: 11
Hi BigB,

I found one other error in the /var/www/mythweb/modules/tv/tmpl/default/streamrecording.php file on my system (I missed this one yesterday).

The first lines read:
Code:
<ge for Mythwebflash
 * Date: 2006-12-06 23:50:00 +1000
 * Version: 1.02
 * Auther: BigB
 *
/**/

I changed this to:
Code:
<?php
/**
 * Themed page for Mythwebflash
 * Date: 2006-12-06 23:50:00 +1000
 * Version: 1.02
 * Auther: BigB
 *
/**/

When I click on the thumbnail of a recording, I new get the proper page (the mythtv interface, blue background ....). But the stream never does load into the section of the page where it looks like it belongs. Guess thats the next challenge. But like i said, been having other issues also.

Thanks for your assistance!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 19, 2007 3:03 pm 
Offline
Joined: Mon Jan 01, 2007 2:59 pm
Posts: 9
Wow, thanks for that kenapp! I now get the proper page as well!

Of course, my actual streaming doesn't work either, but it looks way nicer than that ugly error page we were getting before! :P

Thanks again! Keep us posted on your progress!


Top
 Profile  
 
 Post subject: It worked
PostPosted: Fri Jan 19, 2007 3:43 pm 
Offline
Joined: Tue Jun 21, 2005 6:09 pm
Posts: 57
I can't believe it this worked instantly I have always had this problem with the web interface in all of the KM versions. This is the first time it worked thanks. :P


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 23, 2007 10:29 am 
Offline
Joined: Fri Dec 29, 2006 12:37 pm
Posts: 11
OK, I have tried working on getting the stream to work now that the page loads properly. Following instructions from Live Flash Streaming in MythWeb I set up files to capture the stderr and stdout for ffserver and ffmpeg. Here are the results:
Code:
root@rocmythtv:/var/www/mythweb/data# cat ffmpeg.stderr
FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2004 Fabrice Bellard
  configuration:  --prefix=/usr --libdir=${prefix}/lib --shlibdir=${prefix}/lib --incdir=${prefix}/include/ffmpeg --enable-shared --enable-mp3lame --enable-gpl --enable-faad --mandir=${prefix}/share/man --enable-vorbis --enable-pthreads --enable-faac --enable-xvid --enable-dts --enable-amr_nb --enable-amr_wb --enable-pp --enable-libogg --enable-libgsm --enable-x264 --enable-a52 --extra-cflags=-Wall -g -fPIC -DPIC
  libavutil version: 49.0.0
  libavcodec version: 51.11.0
  libavformat version: 50.5.0
  built on Oct 14 2006 21:20:45, gcc: 4.1.2 20061007 (prerelease) (Debian 4.1.1-16)
Input #0, mpeg, from '/myth/tv/1002_20070112142700.mpg':
  Duration: 00:04:56.3, start: 0.289356, bitrate: 5231 kb/s
  Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 480x480, 6000 kb/s, 29.97 fps(r)
  Stream #0.1[0x1c0]: Audio: mp2, 48000 Hz, stereo, 384 kb/s
Could not read stream parameters from 'http://localhost:8090/feed1.ffm'


Code:
root@rocmythtv:/var/www/mythweb/data# cat ffserver.stderr
/etc/ffserver.conf:149: ACL found not in <stream> or <feed>
Incorrect config file - exiting.


I found that adding my workstation IP to line 149 in ffserver.conf was preventing my being able to view the stream, so I just left the line as it was in the original file (no ACL ALLOW statement). It is real choppy, but I do have video and audio.

If I stream a recorded program, the recording plays through. If I stream live TV, it quits about 1 minute into the stream. Here is the output from ffmpeg.stderr:
Code:
FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2004 Fabrice Bellard
  configuration:  --prefix=/usr --libdir=${prefix}/lib --shlibdir=${prefix}/lib --incdir=${prefix}/include/ffmpeg --enable-shared --enable-mp3lame --enable-gpl --enable-faad --mandir=${prefix}/share/man --enable-vorbis --enable-pthreads --enable-faac --enable-xvid --enable-dts --enable-amr_nb --enable-amr_wb --enable-pp --enable-libogg --enable-libgsm --enable-x264 --enable-a52 --extra-cflags=-Wall -g -fPIC -DPIC
  libavutil version: 49.0.0
  libavcodec version: 51.11.0
  libavformat version: 50.5.0
  built on Oct 14 2006 21:20:45, gcc: 4.1.2 20061007 (prerelease) (Debian 4.1.1-16)
Input #0, mpeg, from '/myth/tv/1002_20070123150000.mpg':
  Duration: 00:00:53.4, start: 99.049356, bitrate: 5224 kb/s
  Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 480x480, 6000 kb/s, 29.97 fps(r)
  Stream #0.1[0x1c0]: Audio: mp2, 48000 Hz, stereo, 384 kb/s
Output #0, ffm, to 'http://localhost:8090/feed1.ffm':
  Stream #0.0: Audio: mp3, 11025 Hz, mono, 8 kb/s
  Stream #0.1: Video: flv, yuv420p, 128x96, q=3-31, 96 kb/s,  2.00 fps(c)
Stream mapping:
  Stream #0.1 -> #0.0
  Stream #0.0 -> #0.1
[flv @ 0xb7e20ee8]removing common factors from framerate
Press [q] to stop encoding
[flv @ 0xb7e20ee8]rc buffer underflow
[mpeg2video @ 0xb7e20ee8]ac-tex damaged at 17 28ate=  25.2kbits/s
[mpeg2video @ 0xb7e20ee8]Warning MVs not available
[mpeg2video @ 0xb7e20ee8]concealing 60 DC, 60 AC, 60 MV errors
frame=  158 q=2.0 Lsize=     240kB time=78.1 bitrate=  25.2kbits/s
video:145kB audio:76kB global headers:0kB muxing overhead 8.229512%


Any ideas why live TV viewing freezes up? I would think the last 6 lines of the above output holds a clue.

Thanks again,
Ken


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 23, 2007 4:47 pm 
Offline
Joined: Mon Feb 06, 2006 5:11 pm
Posts: 353
Location: Brisbane, Australia
Hi Ken,

It is great that you got it working. You can adjust the quality of the stream by adjusting the stream settings in the ffserver.conf file.

Code:
<Stream flash_128.swf>
Feed feed1.ffm
Format swf
AudioBitRate 8
AudioChannels 1
AudioSampleRate 11025
AudioCodec mp3
VideoBitRate 96
VideoFrameRate 2
VideoSize 144x80
VideoGopSize 10
VideoCodec flv


Leave the first line, listed above, the same, and adjust the other values as you desire. There are some examples below that section for higher qualities.

Regarding live TV, if you look at the log you will see that the recording length is only 53 seconds, this is because ffmpeg only checks the length of the file once at the start, so growing files won't work.

I do have plans in the future to add live tv flash streaming, just wanted to iron out all the bugs in the basic section first.

Some people are having trouble getting this going under R5E50, would you mind posting a brief sumary to what you did to get this going. I'm interested to see the changes to the conf file you made.

Cheers
BigB.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 25, 2007 10:05 am 
Offline
Joined: Tue Apr 11, 2006 7:44 am
Posts: 287
Location: Los Angeles, CA
Yes, I would find this helpful as well. I have been trying to get this working but so far have not succeeded in getting anything going. Maybe I am completely confused about how this should be working.

From what I have gathered, once this is all working, I sould be able to open MythWeb, go to the "Recorded Programs" page, and click on the thumbnail or title to start the flash streaming. Is this correct? Or am I supposed to be going through the "StreamTV" page?

Currently, when I click on either the thumbnail or the program title the URL goes to "http://servername/mythweb/pl/stream/7062/1169713800" with the final numbers corresponding to the channel and program information. When I click on that link, it just starts the normal process of downloading the full mpg file. What should the link format look like?

Once I correct the files listed above, and edited the ffserve.conf to comment out the ACL lines, do I need to do something to make those changes take effect? Restart some process, or the whole PC? Or should the changes just start working?

Right now I've even just been trying to get this running on the Myth PC, using FireFox. So I'm not even trying to access from any other PC yet. When I try to access http://localhost:8090/stat.html I just get the FireFox error that it couldn't establish a connection.

I am running R5E50, without any upgrades.

_________________
Tim

LinHES 8.4
HDHR3
BioStar A770, AMD X2 4050e, 2GB RAM
GigaByte GeForce 8400, Chaintech AV710
USB-UIRT


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 25, 2007 2:14 pm 
Offline
Joined: Fri Dec 29, 2006 12:37 pm
Posts: 11
Hi,

Well, I am getting mixed results streaming flash video. Just to get it to work, I made the following changes to ffserver.conf.

I couldn't even start to stream a video longer than a few minutes without changing the 'FileMaxSize 2000k' parameter in the "Definition of live feeds" section as shown below:
Code:
# ffserver can also do time shifting. It means that it can stream any
# previously recorded live stream. The request should contain:
# "http://xxxx?date=[YYYY-MM-DDT][[HH:]MM:]SS[.m...]".You must specify
# a path where the feed is stored on disk. You also specify the
# maximum size of the feed, where zero means unlimited. Default:
# File=/tmp/feed_name.ffm FileMaxSize=5M
File /var/www/mythweb/data/feed1.ffm
FileMaxSize 0


In this same section of the file, I added the following line (xxx indicating the IP address of the workstation I am accessing the feed from. I should mention that this is streaming within a LAN, through a managed switch at 100MPS FD. The NIC on my backend server is locked down at 100FD, as is the port on the switch which this box is connected):
Code:
# Only allow connections from localhost to the feed.
ACL allow 127.0.0.1
ACL allow xxx.xxx.xx.xxx


Under the section where you define each stream which will be generated, I had put a range of IP addresses in the "ACL ALLOW" parameter. It is when I took this range out, that the stream actually started to, well stream:
Code:
# Now you can define each stream which will be generated from the
# original audio and video stream. Each format has a filename (here
# 'test1.mpg'). FFServer will send this stream when answering a
# request containing this filename.


# ACL:

# You can allow ranges of addresses (or single addresses)
#ACL ALLOW <first address> <last address>

# You can deny ranges of addresses (or single addresses)
#ACL DENY <first address> <last address>

# You can repeat the ACL allow/deny as often as you like. It is on a per
# stream basis. The first match defines the action. If there are no matches,
# then the default is the inverse of the last ACL statement.
#
# Thus 'ACL allow localhost' only allows access from localhost.
# 'ACL deny 1.0.0.0 1.255.255.255' would deny the whole of network 1 and
# allow everybody else.

##</Stream>


This is the current definition of my flash stream:
Code:
# Flash

<Stream flash_128.swf>
Feed feed1.ffm
Format swf
AudioBitRate 16
AudioChannels 1
AudioSampleRate 11025
AudioCodec mp3
VideoBitRate 164
VideoFrameRate 5
VideoSize qcif
VideoGopSize 10
VideoCodec flv
</Stream>


I need to keep all the parameters this low in order to stream video that is more than just a few minutes long, but even with this configuration, there is a bit of stop and go with the video. With the short 3 - 5 minute streams I have been testing with, I can boost up the AudioBitRate to 32, AudioChannels to 2, VideoBitRate to 400, VideoFramRate to 9 and VideoGopSize to 40.

That said, the quality even at those settings is fairly poor. Even short streams don't play if the VideoFrameRate is set as high as 10, or the VideoSize set to cif.

I found that the one setting that greatly increased the video quality was that "VideoSize cif" setting, but the stream just loads and locks up in a few seconds.

Well, as I am typing, my 90 recording just froze up about 15 minutes into it, so back to the drawing board.

I have had no luck getting the stat.html page to load.

Still no luck with the mms stream to a media player (network errors).

The MythWeb site works fine in Firefox, but as I navigate some of the various pages in Internet Explorer, or try to stream a video in IE, I get the "The page cannot be found, HTTP 400 - Bad Request error."

So, to sum up, I have a lot of work ahead of me to get MythWeb working properly. Everything is working fine on the box that runs my backend/frontend (same box). I am thinking of taking this off the network and connecting directly to another PC with a switch or cross over cable to rule out possible network issues with the stream to a media player. Using Windows media player is ultimately the way I want it to work.

I wish KnoppMyth had Firefox on it, I would try to stream via the web browser on my backend/frontend box just to see if it would work well without having to travel across a wire.

Thanks for everyone's feedback and encouragement. This is the first time I have tried video capture, and I am by no way a linux expert.

Ken


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 26, 2007 2:26 pm 
Offline
Joined: Fri Dec 29, 2006 12:37 pm
Posts: 11
A quick update:

I connected my Myth box directly to another PC via a cross over cable. I have none of the network issues with streaming recordings using Firefox with the Stream flash_384 settings in ffserver.conf. Looks great, works great, even with large recordings.

Still get site not found errors in IE when I want to stream a recording or change to another set of recordings via the drop down menu.

VNC also runs well, so there must be some other network issues I had been dealing with. I need to move the Myth box to an area with newer network runs and see if that resolves the issue.

Still can't get Windows Media Player to work with recordings.

Will update again when I have something new to report.

Anyone able to stream a recording using Windows Media Player with either mms or http protocols?

Ken


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 26, 2007 6:32 pm 
Offline
Joined: Mon Feb 06, 2006 5:11 pm
Posts: 353
Location: Brisbane, Australia
Good to hear some success.

Just a small note, Internet explorer has some issues with how mythweb passes variables via HTTP. So if a hyperlink has "?blahblah=not-so-blah" then IE may not like it.

BigB


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 28, 2007 9:27 pm 
Offline
Joined: Sun Feb 05, 2006 9:00 pm
Posts: 8
I was able to use MythStream after applying all the changes from kenapp, however, I did run into one complication which I would like to contribute to the discussion. I am not allowed to run a webserver on port 80 due to ISP restrictions. I get around this by port forwarding over a different port. This causes me problems in that the path to the video object contains the following:

Code:
http://xxxx.tld:8000:8090/...


This is the result of simply concatenating the path to the HTTP_HOST environment variable. My line numbers will be different because I have applied kenapp's changes to streamrecording.php, however, if you are running apache over a non-standard port, you will need to apply this patch as well. In streamrecording.php (Directory: /var/www/mythweb/modules/tv/tmpl/default), you will need to change HTTP_HOST to SERVER_NAME near lines 77 and 82.

_________________
KnoppMyth R5F27
ECS nForce3-A
Sempron 1800+
Hauppauge PVR-350

/myth: 1.4 Tb using LVM


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 37 posts ] 
Go to page 1, 2, 3  Next



All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 13 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