1 registered members (AndrewAMD),
678
guests, and 6
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Screen streaming
[Re: Ch40zzC0d3r]
#456018
11/05/15 22:22
11/05/15 22:22
|
Joined: Jan 2006
Posts: 968
EpsiloN
OP
User
|
OP
User
Joined: Jan 2006
Posts: 968
|
Oh, I got past that point (accessing the screen). I'm now on the 'send 160mbps over lan' problem. I'm trying to learn how to encode/decode the data, and I think I got it today, so tommorow is the time I'm gonna start coding. I was a little busy (ill, and got a new car...). Also, I remember someone mentioning that conversion is usually slow, from RGB to YCbCr, so, that might give a problem too, but I'll report after first tests. I just hope everything works out as in theory tommorow, if my daily job doesn't get in the way... Until then, any guidelines for sending data from a buffer from Life-C to Debian Phyton? Thank you all, again. I'm extremely excited about this project.
Last edited by EpsiloN; 11/05/15 22:25.
|
|
|
Re: Screen streaming
[Re: EpsiloN]
#456019
11/05/15 22:54
11/05/15 22:54
|
Joined: Oct 2011
Posts: 1,082 Germany
Ch40zzC0d3r
Serious User
|
Serious User
Joined: Oct 2011
Posts: 1,082
Germany
|
Just use winsock and dont use TCP. Simply use UDP and compress the pics as JPEG and you will have some nice speed for the start. If your protocol is stable enough you can try to play with multithreading and using different libraries/methods to shrink your byte array as much as possible. Do it like twitch and add a delay which is usually used for compression time compensation.
How many FPS do you want to stream btw?
Last edited by Ch40zzC0d3r; 11/05/15 22:55.
|
|
|
Re: Screen streaming
[Re: Ch40zzC0d3r]
#456070
11/08/15 08:56
11/08/15 08:56
|
Joined: Jan 2006
Posts: 968
EpsiloN
OP
User
|
OP
User
Joined: Jan 2006
Posts: 968
|
Well, I'd prefer something over 30, because it looks laggish to me when the engine drops to 30. But if it looks like a movie, on the other hand, from what I know movies play at 25fps, but it looks smooth... I'm extremely ill, so I cant think straight, but I tried a couple of times and the only method that worked right off the shelf was some code from Microsoft that captures a screenshot into a bmp file. (and by the way, capturing 600 of those each time into the same bmp file didn't drop my frame rate at all, but my level is extremely simple without any shaders or effects ) Before going any further, I'll try making a socket connection to the raspy and try to display a single frame every second (the conversion is bothering me, although it should be in the same format, eg. bits, data from my laptop's backbuffer to a dc in wxpython on the raspy). After I have something going, I'll try compressing and sending more fps.
|
|
|
Re: Screen streaming
[Re: EpsiloN]
#456123
11/11/15 12:28
11/11/15 12:28
|
Joined: Jan 2006
Posts: 968
EpsiloN
OP
User
|
OP
User
Joined: Jan 2006
Posts: 968
|
In need of help again I managed to get a socket connection between Acknex and a Python script. UDP didn't work, for some reason... I successfully ran an example from some Microsoft page that captures the backbuffer into a bmp file at 60fps with no fps drop...I added the structs for BITMAP, HBITMAP, HBITMAPINFO and a lot of other structs to bypass the errors I was getting and it worked. Now the problem... I tried using the FFMPEG library and JPEG library (with examples I found), but its failing to compile... After 100's of missing files errors I downloaded the libstdc++-v3 and the standard C library and tried adding files from wherever I find them (multiple different files with the same name existed in different folders) but I started getting this error: ... Error in 'features.h' line 173: < #if (!defined __STRICT_ANSI__ && !defined _ISOC99_SOURCE && \ > .. 0.436 sec Error compiling... That's after I deleted a whole statement like this and deleting spaces between # and ifdef statements... I feel like going mad! :| I understand those libraries come by default with IDEs, so its normal not to have them with our SED, right? How can I add them, or something? Thanks.
|
|
|
Re: Screen streaming
[Re: EpsiloN]
#456159
11/12/15 20:41
11/12/15 20:41
|
Joined: Apr 2007
Posts: 3,751 Canada
WretchedSid
Expert
|
Expert
Joined: Apr 2007
Posts: 3,751
Canada
|
I understand those libraries come by default with IDEs, so its normal not to have them with our SED, right? How can I add them, or something? IDEs very rarely ship with anything more than a handful of default and compiler/platform dependent libraries. I'm not aware of an IDE shipping with ffmpeg. You won't get ffmpeg to compile with the Lite-C compiler, because it simply is not capable of that. You'll need a real compiler to get that going, so a plugin is what you will have to go for.
Shitlord by trade and passion. Graphics programmer at Laminar Research. I write blog posts at feresignum.com
|
|
|
Re: Screen streaming
[Re: WretchedSid]
#456174
11/13/15 08:08
11/13/15 08:08
|
Joined: Jan 2006
Posts: 968
EpsiloN
OP
User
|
OP
User
Joined: Jan 2006
Posts: 968
|
Thought so I already tried to compile the screenshot function I got from Microsoft into a dll, but I ran into a problem (no wait(1) in C++). And I don't understand the syntax that much, so I'll be reading for a few days. I'll try to make 3 functions, one for locking, one for copying the bits and one for unlocking, and I'll call the copying every frame. I'll post when I have any results... Thanks.
|
|
|
|