Page 1 of 4
LUMIX GX80 UDP Streaming
Posted: Thu Oct 15, 2020 5:06 pm
by sinisrus
Hello,
I have a LUMIX GX80 i Use Wifi for send streaming vidéo on my Amiga
I would like to play the video stream which uses UDP protocol but I can't find a simple solution
HTTPStreamer > not support UDP

AVcodec > not support UDP
With
ReceiveUDPData() and
SendUDPData() I can't extract the information it's too hard for me
Can you help me ?
Re: LUMIX GX80 UDP Streaming
Posted: Thu Oct 15, 2020 11:42 pm
by plouf
what you need is the hURL plugin, but it is not that simple..
Re: LUMIX GX80 UDP Streaming
Posted: Fri Oct 16, 2020 3:26 pm
by sinisrus
Hurl with udp??
Re: LUMIX GX80 UDP Streaming
Posted: Sun Oct 18, 2020 5:35 pm
by sinisrus
I use
ReceiveUDPData()
I just need to know which function to use to extract the information
Re: LUMIX GX80 UDP Streaming
Posted: Sun Oct 18, 2020 7:34 pm
by plouf
data$ = REceveiUDPDAta(id)
unload all data (max 8kb) to data$ string, from there you have to know a bit more infromation on what this camera send for
you have to know exact protocol camera send's in order to see if there an "easy" way in hollywood
for example does your camera send a jpg image ?, does it stream ? ... etc
Re: LUMIX GX80 UDP Streaming
Posted: Sun Oct 18, 2020 11:15 pm
by airsoftsoftwair
plouf wrote: ↑Thu Oct 15, 2020 11:42 pm
what you need is the hURL plugin, but it is not that simple..
...but very powerful!
"Live" streaming from your camera probably won't work, though. I guess you have to save the data you get from your camera somewhere first and then play this stream with Hollywood.
Re: LUMIX GX80 UDP Streaming
Posted: Mon Oct 19, 2020 12:25 am
by sinisrus
Re: LUMIX GX80 UDP Streaming
Posted: Mon Oct 19, 2020 6:23 am
by plouf
the above link says it simple enough, but you have to work it
according to this guy camera send mjpeg, ffmpeg can play mjpeg so avcodec most probably can decode it(untested in hollywood but its the simplest out there)
so you have to work out how each frame (a single jpeg image is the one frame in mjpeg) and construct it.
the guy in this link has reverse enough protocol so it points out where the length of the image begin, so you can calculate
The length of the header is given in the header; there's a 16-bit integer starting at index 30; add 32 to that and you've got the index of the first byte of the JPEG data.
so in general have to decode data$ = REceiveUDPdata(id) , check out the lengh of jpeg image, receive all data frames of iamge
build image (in RAM: for example), and display it
Re: LUMIX GX80 UDP Streaming
Posted: Mon Oct 19, 2020 1:50 pm
by sinisrus
The problem is, I don't know which function to use
Re: LUMIX GX80 UDP Streaming
Posted: Mon Oct 19, 2020 9:23 pm
by plouf
which function for which part. wher have you stuck ?
as said
data$ = receiveudpdata(af) return data , the data there have to add them by yourself
the following command add data
data$ = data$..data$
but how much data consist a single jpeg image ?! uknown. !
According to the link you provide, this guy has found that bytes 30+31 have the length of the jpeg image follows
so you have to work a bit in order to construct a single jpeg image
first you have to gather enought data$ then compare header if its has "Content-Type: image/jpeg" then its the header exactly after that its the lenght of the jpeg file its after "Content-Length :" there are 2 bytes saying the exact length of the jpeg image follows.
the fact that hollywood consider all mem as "string" is helpfull to you since you have to use FindStr to search for header above.
then with MidStr (or CopyMem) copy the exact part of the jpeg image in RAM: