View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 13 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Sat Oct 14, 2006 7:56 pm 
Offline
Joined: Wed Dec 14, 2005 4:42 pm
Posts: 59
Tonight was the first time I tried to use Mythstream TV.

This is the error:
[code]

VLC already alive, I'm going to whack it. THE PROCESS I MEAN!
Starting Stream of /myth/tv/1034_20060904170000.mpg
VLC media player 0.8.1 Janus
[00000214] main interface: creating httpd
[00000214] main interface error: cannot bind socket
[00000214] main interface error: cannot bind socket
[00000214] http interface error: cannot listen on :8002
[00000214] main interface error: no suitable intf modul/myth/stream/mythstreamtv.sh: line 58: 7437 Terminated /usr/local/bin/vlc -I http --http-host=:8002 --sout-transcode-fps=$FPS --sout-transcode-deinterlace $1 ":sout=#transcode{vcodec=$VCODEC,acodec=$ACODEC,vb=$VB,ab=$AB,scale=$SIZE}:std{access=http{user=$HTTP_USER,pwd=$HTTP_PWD,mime=video/x-ms-asf},mux=asf,url=:8001}"

[/code]

Any help appreciated.

_________________
Knoppmyth R5F27


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 16, 2006 4:08 am 
Offline
Joined: Tue Apr 13, 2004 6:51 pm
Posts: 890
Location: Groton, MA
cant bind in socket.

maybe and old instance is running. the log seems to show that it it trying ot kill it. assure that there are no other vlc processes running

_________________
R5F1 - Dell P4 2.4Ghz 500MB - PVR250 x 2 - GeForce FX 5200 - Onboard sound/NIC 80GB ATA/250GB ATA/400GB SATA


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 23, 2006 7:07 pm 
Offline
Joined: Wed Dec 14, 2005 4:42 pm
Posts: 59
Sorry, been a while since I have had time to look at this more... There are no instances of vlc running. Still get the same error...

At the command prompt of that box I can type vlc and it seems to run fine.

_________________
Knoppmyth R5F27


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 23, 2006 8:52 pm 
Offline
Joined: Tue Apr 13, 2004 6:51 pm
Posts: 890
Location: Groton, MA
well, simply running vlc on the command line will start it in client/player mode. client mode will not try to listen on any ports. try running the command line that mythstreamtv is executing. you can see the command line in mythweb after the stream is started. it will be on the screen next to 'Command:'

_________________
R5F1 - Dell P4 2.4Ghz 500MB - PVR250 x 2 - GeForce FX 5200 - Onboard sound/NIC 80GB ATA/250GB ATA/400GB SATA


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 27, 2006 2:10 pm 
Offline
Joined: Wed Dec 14, 2005 4:42 pm
Posts: 59
Ok here is the command listed on the page.
/myth/stream/mythstreamtv.sh 'WMV2' 'mp3' '500' '128' '1' '25' 'http' '' '' '/myth/tv/1011_20061027090000.mpg' > /myth/stream/log.txt 2>&1 &

If I delete everything past ">" and run that command from the box, it works great.. So where can I change that command on the mythweb interface???

Thanks

_________________
Knoppmyth R5F27


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 27, 2006 3:58 pm 
Offline
Joined: Wed Aug 23, 2006 3:07 pm
Posts: 339
scanman717 wrote:
Ok here is the command listed on the page.
/myth/stream/mythstreamtv.sh 'WMV2' 'mp3' '500' '128' '1' '25' 'http' '' '' '/myth/tv/1011_20061027090000.mpg' > /myth/stream/log.txt 2>&1 &

If I delete everything past ">" and run that command from the box, it works great.. So where can I change that command on the mythweb interface???

Thanks


Why in the heck is it outputting the text first into log.txt and then into something else?

I'm not that familiar with linux, but "echo text >junk.log >junk2.log" doesn't strike me as a properly formatted command.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 27, 2006 6:18 pm 
Offline
Joined: Tue Nov 08, 2005 7:31 am
Posts: 195
Location: Secret Lair
It's redirecting stdout (1 implicit) to the file and redirecting stderr (2) to the same place (>&) as stdout (1). Check if the destination directory for the log file exists, and that the user running the command has write privileges there... (Check the user and group ownership first).


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 27, 2006 6:37 pm 
Offline
Joined: Tue Apr 13, 2004 6:51 pm
Posts: 890
Location: Groton, MA
EvillTwin, thanx for helping out....

to simplify what ET said

"2>&1" is common syntax used to merge error outout (stream 2) with non-error output into a single file. (ill comment on this in a second response below)

As for the mythstreamtv issue.

<Disclaimer>
I appologize again, but I am running a very stable OLD version of knoppmyth and do not have direct access to newer mythweb and the related myhtstreamtv issues.
</Disclaimer>

great news that vlc is working via command line, that truely is the hard part. Back in the early stages it took complicated compiles of ffmpeg and vld to get theat far.

So, there must be an environmental issue between the command line/shell env you hadd success with and the apache env.

here are some things to check.

the inital error clearly was using /usr/local/bin/vlc. in a shell that runs vls successfully run the command 'which vlc' and assure it is running the same vlc binary.

"[00000214] http interface error: cannot listen on :8002" sure does look like another program was bound to that port, are you sure another instance ov vlc was not running. assure no vlc programs are running and try via web again and report results.

_________________
R5F1 - Dell P4 2.4Ghz 500MB - PVR250 x 2 - GeForce FX 5200 - Onboard sound/NIC 80GB ATA/250GB ATA/400GB SATA


Top
 Profile  
 
 Post subject: It's Working!!!!
PostPosted: Fri Oct 27, 2006 6:54 pm 
Offline
Joined: Wed Dec 14, 2005 4:42 pm
Posts: 59
Thanks guys... I ended up chmod +777 log.txt file and now it works great!!! I will go back and figure out exactly what permissions I need to set to allow it to work....

_________________
Knoppmyth R5F27


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 27, 2006 7:09 pm 
Offline
Joined: Tue Apr 13, 2004 6:51 pm
Posts: 890
Location: Groton, MA
This is a reply that simply discribes redirecting output

All unix programs have three IO streams by default

Code:
0 - input,   formally standard input.  it is referred to as SDTIN
1 - output, formally standard output.  it is referred to as SDTOUT
2 - error,   formally standard error.  it is referred to as SDTERR


by default all input comes from the keyboard and all output (STDOUT and STRERR) goes to the screen.

Example:

Quote:
cat /tmp/file

if the file exists, the cat command will sent the contents of the file to standard out, the screen.

if the the file does not exist, cat will send an error message to standard error, still the screen


Often is is useful to redirect an output stream into a file. the output redirection operator is >.

1> redirects SDTOUT and 2> redirects STDERR

STDOUT example

Quote:
cat /tmp/file 1> newfile

if the file exists, the cat command will sent the contents of the file to standard out, newfile.

if the the file does not exist, cat will send an error message to standard error, still the screen since we did not redirect STDERR with 2>


STDERR example

Quote:
cat /tmp/file 2> newfile

if the file exists, the cat command will sent the contents of the file to standard out, the screen.

if the the file does not exist, cat will send an error message to standard error, newfile


STDERR and STDOUT example

Quote:
cat /tmp/file 1> newfile 2> errorfile

if the file exists, the cat command will sent the contents of the file to standard out, newfile .

if the the file does not exist, cat will send an error message to standard error, errorfile


STDERR and SDTOUT example (special case, both sent to same file)
In this example, we are redirecting both standard out and erro to the same file.

Read the cat command like this: send the contents of /tmp/file to STDOUT (which is newfile) and send STDERR to the same place that STDOUT is going

Quote:
cat /tmp/file 1> newfile 2>&1

if the file exists, the cat command will sent the contents of the file to standard out, newfile .

if the the file does not exist, cat will send an error message to standard error, which is the same as STDOUT, newfile.


CAREFUL!!! left to right order matters!!!

the following command line is NOT like the previous:

Quote:
cat /tmp/file 2>&1 1> newfile


read this command left to right....

while running the cat command send STDERR to where STDOUT is going (STDOUT is STILL WRITING TO THE SCREEN!!!!!) and send the contents of the file to STDOUT, which is finally send to newfile.

basically, at the time STDERR was sent to STDOUT, SDTOUT was still the screen, only later is STDOUT send to a file. STDERR is not effected by the late redirection of STDOUT

One more more note. inplace of 1> you can simply use >. > without a number is implicitly STDOUT.

STDIN is a lot simpler. many programs can take file input for STDIN reather then from keyboard. also may programs can take STDIN inplace of command line parms.

back to cat.

everyone knows that this writes the output of a file to STDOUT
Code:
cat filename

the exact same thing can be done as
Code:
cat  < filename


or it use cat to copy a file

Code:
cat < originalfile > copyOfFile


Hope this helps someone...ask questions, I can help if you need.

_________________
R5F1 - Dell P4 2.4Ghz 500MB - PVR250 x 2 - GeForce FX 5200 - Onboard sound/NIC 80GB ATA/250GB ATA/400GB SATA


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 27, 2006 7:44 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Dang! :D That's a nice little write up. You should put that up on the wiki (UnderstandingRedirection maybe?) and link to it from the LinuxTips page.

For right now I'll refrain from commenting on the use of the evil 777, even though just seeing it makes my eyes bleed.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 27, 2006 9:51 pm 
Offline
Joined: Tue Apr 13, 2004 6:51 pm
Posts: 890
Location: Groton, MA
I knew about 1/2 through that you would ask for a wiki entry.....good request, couldn't pass on the opportunity. unix and shell scripting are my profession.

text has been wiki'ized (new verb!!!)

http://knoppmythwiki.org/index.php?IORedirection

_________________
R5F1 - Dell P4 2.4Ghz 500MB - PVR250 x 2 - GeForce FX 5200 - Onboard sound/NIC 80GB ATA/250GB ATA/400GB SATA


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 28, 2006 4:40 pm 
Offline
Joined: Wed Aug 23, 2006 3:07 pm
Posts: 339
Thanks eviltwin and khrusher.

I hadn't realized (or maybe just remembered) about stdout and stderr.

It vaguely twitches in the back of my mind when I wrote programs for DOS that it had something similar.


Top
 Profile  
 

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


All times are UTC - 6 hours




Who is online

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