Go Back   Savage 2: A Tortured Soul Forum > Tips & Strategies

Notices

Tips & Strategies A place to share tips and strategies with other players.

Reply
 
Thread Tools Display Modes
Old 05-24-2010, 07:39 AM   #31
Verith

 
Join Date: May 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Great post, extremely informative. I got this working perfectly, and frankly I'm amazed at how well it runs. That said, there is a bit of a performance hit, and I was thinking it would be neat if I could offload the encoding to my server: only problem is I have no idea how.

I don't really understand the named pipe, but it seems to me that computer 2 can't access a named pipe that I made and am using on computer 1.

Here's what I ended up trying:

Quote:
glc-capture -s -f 15 -r 0.5 --disable-audio -o /dev/stdout ./hon-x86_64 | ssh meyer@192.168.0.7 glc-play /dev/stdin -y 1 -o - | mencoder -demuxer y4m -nosound - -ovc lavc -o gl-capture.mpeg
and it seemed like it was working, but then it gets some errors:

Quote:
[ 10.58s file error ] Bad message (74)in 0mb A-V:0.000 [49:0]
exporting yuv4mpeg failed: Bad message (74)
Pos: 1.7s 26f ( 0%) 2.96fps Trem: 0min 0mb A-V:0.000 [162:0]
Flushing video frames.
Writing index...
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.

Video stream: 162.065 kbit/s (20258 B/s) size: 35114 bytes 1.733 secs 26 frames
[ 10.61s file error ] Success (0)
[ 10.72s file error ] Broken pipe (32)
[ 10.72s glc_thread error ] Broken pipe (32)
[ 10.72s file error ] Broken pipe (32)
That was about as far as my expertise went, and I'm afraid I have no idea what to do. If anybody has ideas I would really appreciate it (keep in mind I'm a moron when you reply), thanks!

Edit:

Well I tried something that actually made a modicrum of sense. My new method is running this on the machine that is capturing the video:

Quote:
glc-capture -s -f 15 -r 0.5 --disable-audio -o /dev/stdout ./hon-x86_64 | nc 192.168.0.7 6800
And then I listen (again with nc) on the server doing the encoding with this:

Quote:
nc -l -p 6800 | tee -a fifo.glc
glc-play fifo.glc -y 1 -o - | mencoder -demuxer y4m -nosound - -ovc lavc -o gl-capture.mpeg
No idea what the problem is here, it makes sense to me. Any input is appreciated.

Last edited by Verith; 05-24-2010 at 08:51 AM.
Verith is offline   Reply With Quote
Old 05-24-2010, 10:04 AM   #32
booiiing

booiiing's Avatar
 
Join Date: Nov 2007
Location: DE, EU
Posts: 1,331
Thanks: 23
Thanked 65 Times in 59 Posts
Default

your second approach is better, i will into the details why it might still fail later.

i guess you put the pipe on an nfs-filesystem in the first approach? that is a very bad idea

if you have an untrusted network between your pc and server, then you should use ssh to transfer the data.
__________________
SoNs Of Newerth
CYOA-Characters:
Alvark (CYOA3, Lieutenant Colonel of the free army of Adkarna), Starler (CYOA3.5, survived and scored first), Bjorg (CYOA4, Wayfaring runemaster), Xico (Arthropoda Summoner, CYOA5)
Other Games: Katsuro (winner of the Lost Ronin Tournament)
Quotes:
IsSuE: Stat whores
Tjuh: Since I am a dude, I prefer the term statgigolo!

Hurdy: one of the finest comms on the european servers
<raw> booiiing: everyone else is completely and utterly irrelevant!
booiiing is offline   Reply With Quote
Old 05-24-2010, 07:12 PM   #33
Verith

 
Join Date: May 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by booiiing View Post
your second approach is better, i will into the details why it might still fail later.

i guess you put the pipe on an nfs-filesystem in the first approach? that is a very bad idea

if you have an untrusted network between your pc and server, then you should use ssh to transfer the data.
I do have an untrusted network, but I can't quite make it work using SSH either. I'm way way out of my field of expertise here, was just hoping it might not be too difficult. Let me know if you know how this would be done; I can't really handle any more tinkering for now.

Here's the error I get doing it both ways:

Quote:
MEncoder SVN-r29978-4.4.1 (C) 2000-2009 MPlayer Team

WARNING: OUTPUT FILE FORMAT IS _AVI_. See -of help.
Reading from stdin...
success: format: 0 data: 0x0 - 0x0
[ 33.45s file error ] Bad message (74)
exporting yuv4mpeg failed: Bad message (74)
YUV4MPEG2 file format detected.
YUV4MPEG2 Video stream 0 size: display: 840x524, codec: 840x524
VIDEO: [YV12] 840x524 12bpp 15.000 fps 0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:12 fourcc:0x32315659 size:840x524 fps:15.000 ftime:=0.0667
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
================================================== ========================
Opening video decoder: [raw] RAW Uncompressed Video
VDec: vo config request - 840 x 524 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
videocodec: libavcodec (840x524 fourcc=34504d46 [FMP4])
Selected video codec: [rawyv12] vfm: raw (RAW YV12)
================================================== ========================

Flushing video frames.
Writing index...
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.

Video stream: nan kbit/s (-2147483648 B/s) size: 0 bytes 0.000 secs 0 frames
Edit: I GOT IT WORKING! I'll go ahead and post it here for anybody that's interested, but it's really very simple and I don't know why I didn't do it like this in the first place. If you want to offload the encoding to another computer here's how:

glc-capture blah blah blah -o fifo.glc
glc-play fifo.glc -o - | ssh username@server mencoder - blah blah -o filename

Like I said, it's very simple and I don't understand why it took me so long to figure that out. I'm working on streaming as well now, and things are looking good so far. Thanks for the post, it was very helpful.

Last edited by Verith; 05-26-2010 at 12:11 AM.
Verith is offline   Reply With Quote
Old 05-26-2010, 07:14 AM   #34
booiiing

booiiing's Avatar
 
Join Date: Nov 2007
Location: DE, EU
Posts: 1,331
Thanks: 23
Thanked 65 Times in 59 Posts
Default

di you try playing around with the "-y 1" on glc-play?
as i wrote in the OP, you might need to use another number there. try 0 first and higher numbers if you switch recording on and off often.
__________________
SoNs Of Newerth
CYOA-Characters:
Alvark (CYOA3, Lieutenant Colonel of the free army of Adkarna), Starler (CYOA3.5, survived and scored first), Bjorg (CYOA4, Wayfaring runemaster), Xico (Arthropoda Summoner, CYOA5)
Other Games: Katsuro (winner of the Lost Ronin Tournament)
Quotes:
IsSuE: Stat whores
Tjuh: Since I am a dude, I prefer the term statgigolo!

Hurdy: one of the finest comms on the european servers
<raw> booiiing: everyone else is completely and utterly irrelevant!
booiiing is offline   Reply With Quote
Old 05-26-2010, 09:09 PM   #35
Verith

 
Join Date: May 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by booiiing View Post
di you try playing around with the "-y 1" on glc-play?
as i wrote in the OP, you might need to use another number there. try 0 first and higher numbers if you switch recording on and off often.
Yeah I checked. It's fine though, the current way I'm doing it is working out for me.

I'm wondering if anybody here has experience streaming, to justin.tv or any other site? I've managed to do it, but it wasn't very pretty and didn't work well.
Verith is offline   Reply With Quote
Old 08-12-2010, 08:33 AM   #36
S2stony
S2 Junior Staff Member

S2stony's Avatar
 
Join Date: Dec 2008
Location: Newerth Valley
Posts: 6,940
Thanks: 61
Thanked 298 Times in 142 Posts
Default

*edit* forget it - answer is in this thread
__________________

Donations are still welcome - please go to www.PlaySavage2.com and click on the "Donate" button. TY


Last edited by stony; 08-12-2010 at 08:41 AM.
S2stony is offline   Reply With Quote
Old 08-12-2010, 09:13 AM   #37
weasel92

weasel92's Avatar
 
Join Date: Jan 2009
Location: Earth
Posts: 957
Thanks: 2
Thanked 16 Times in 15 Posts
Default

how about mac??
weasel92 is offline   Reply With Quote
Old 01-11-2011, 01:06 PM   #38
quandasim

quandasim's Avatar
 
Join Date: Nov 2008
Posts: 49
Thanks: 0
Thanked 2 Times in 2 Posts
Default how to encode to youtube

hi, i encode the video to flv and upload it to youtube, but youtube encoded it again, so the quality is wery bad (as u can se here: http://www.youtube.com/watch?v=RtLsOy5WZ2s )

its possible directly encode to format, which youtube dont encode again?

or i must always upload the hudge uncompresed files?
__________________
First Fun member, sorry for my bad english

Last edited by quandasim; 02-28-2011 at 06:28 PM.
quandasim is offline   Reply With Quote
Old 02-28-2011, 01:52 AM   #39
example508

 
Join Date: Mar 2010
Location: New Yawk
Posts: 24
Thanks: 0
Thanked 1 Time in 1 Post
Default

how about on windows?
example508 is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 12:37 AM.