link89 / dlna-cast

A cross-platform command-line tool that casts screen and media file to remote DLNA device.
GNU General Public License v3.0
28 stars 1 forks source link

please, help #4

Open DENZAKIN opened 5 months ago

DENZAKIN commented 5 months ago

[

Знімок екрана 2024-01-27 194902

](url)

link89 commented 5 months ago

There is a space in your device name, so you need to quote the string: --dlna_device "Goggles 2-026F"

DENZAKIN commented 5 months ago

thanks for help but problem

Знімок екрана 2024-01-27 200151
link89 commented 5 months ago

Do you install ffmpeg.exe in D:\ffmpeg\ffmpeg.exe

DENZAKIN commented 5 months ago

Yes

link89 commented 5 months ago

What's the result of running D:\ffmpeg\ffmpeg.exe ?

DENZAKIN commented 5 months ago

opening in the command line?

DENZAKIN commented 5 months ago
Знімок екрана 2024-01-27 201606
link89 commented 5 months ago

Yep, the same place you run dlna-cast

link89 commented 5 months ago

I guess I introduce a regression bug when adding support for Linux. Please downgrade dlna-cast with pip install -U dlna-cast==0.1.5

DENZAKIN commented 5 months ago

do you need to uninstall the current version ?? if so, how can I do it?

link89 commented 5 months ago

No, just reinstall it.

DENZAKIN commented 5 months ago
Знімок екрана 2024-01-27 202901 Знімок екрана 2024-01-27 202924 Знімок екрана 2024-01-27 202938

this happens but there is no image on the device

link89 commented 5 months ago

What I can tell from the log is dlna-cast is working now, it is either a network problem, or the DLNA implementation in dlna-cast is not compatible with your device.

DENZAKIN commented 5 months ago

Is it possible to check device compatibility?

link89 commented 5 months ago

I am afraid I have no idea. I write this project to learn some fundamental knowledge of SSDP, DLNA and HLS. But I am not an expert of this domain.

DENZAKIN commented 5 months ago

This project could help many owners dji Googles 2 Because Dji Not going to work on that usage plan

pierluigizagaria commented 4 months ago

@DENZAKIN did you managee to use this project with Dji goggles 2?

DENZAKIN commented 4 months ago

@pierluigizagaria I tried but could not achieve any result, try it, maybe something will work out for you

hexxone commented 1 month ago

Mabye https://github.com/UniversalMediaServer/UniversalMediaServer could work, it at least detects the goggles.. But when I try to play something it always says the audio is not compatible and errors out.

I guess we would have to know the right codec & bitrate, then you could maybe make a custom profile with medaserver which works. Sadly I am also still searching for a solution. DJI really isnt making this easy. No documentation at all...

DENZAKIN commented 1 month ago

@hexxone This project also detects glasses as you can see from my screenshots, I will try your option later

hexxone commented 1 month ago

Ok actually I found an App which can flawlessly Stream to the DJI Goggles. Its this one https://play.google.com/store/apps/details?id=de.twokit.video.tv.cast.browser.dlna ... detects instantly and can seemingly play various video formats from multiple websites.

The problem is, aside from that the app is overloaded with ads and really not well usable...

As to my understanding UPNP / DLNA are not using encryption. One option I see now would be to capture the communication between the APP and Goggles with something like Wireshark, and then try to reverse engineer / see what differs in the packets from dlna-cast to the App. If its just a protocol problem and not the codec it should maybe be possible to figure out.

hexxone commented 1 month ago

I did some more debugging with the Goggles2, as it turns out once you start the "Wireless Streaming" on the Goggles 2 and connect to your wifi network, you can simply access its DLNA service definitions via the webserver in LAN.

In these definitions, you can see the Goggles provide a ConnectionManager::GetProtocolInfo() function, which actually returns the list of codes which the goggles support.

Audio Codecs: mpeg, mpeg3, mp3, mp4, basic, midi, ulaw, ogg, DVI4, G722, G723, G726-16, G726-24, G726-32, G726-40, G728, G729, G729D, G729E, GSM, GSM-EFR, L8, L16, LPC, MPA, PCMA, PCMU, QCELP, RED, VDVI, ac3, webm, vorbis, speex, flac, x-flac, x-aiff, x-pn-realaudio,x-realaudio, x-wav, x-matroska, x-ms-wma, x-mpegurl (yes, a lot)

Video Codecs: mpeg, flv, mp4, MP2T, x-flv (not a lot)

Maybe this can help you in some regard.

I will also keep digging as I really want to use this streaming feature with my goggles to watch stuff on my pc ^^

yigithankardas commented 1 month ago

Hi @hexxone Appreciate your hard work and passion on this project. It seems that we are struggling the exact same problem here and I am bit frustrated for running out of solutions. It would be very helpful for us to exchange our findings about this topic. First, may I ask you how have you achieved to access web interface or would you provide any debugging method for Goggles 2?

hexxone commented 1 month ago

Hi @hexxone Appreciate your hard work and passion on this project. It seems that we are struggling the exact same problem here and I am bit frustrated for running out of solutions. It would be very helpful for us to exchange our findings about this topic. First, may I ask you how have you achieved to access web interface or would you provide any debugging method for Goggles 2?

Yeah, no problem :)

First off, me "debugging" was only referring to using some curl commands for sending DLNA queries. I dont have any hardware access to the goggles besides web ^^I just thre some stuff at it and watched what sticked and the ConnectionManager::GetProtocolInfo() also reffers to the UPnP specification.

I've read this article: https://shaleenjain.com/blog/vlc-dlna-support-2/ which seems to describe how VLC actually implemented the DLNA casting feature on their player... I was sceptical about first because VLC also doesnt discover the Goggles. Anyway the article contains some useful information. The commit Ids which are references at the bottom of the article can actually be found in VLC repo and contain some more interesting things:

The goggles seem to use the "Platinum/1.0.5.13" and "DLNADOC/1.50" Server for their tech stack internally. Which is probably this project https://github.com/plutinosoft/Platinum.

Here you can see a similar API which SONOS uses: https://sonos.svrooij.io/services/connection-manager

Now, regarding how to access the web server on the Goggles..

  1. connect to your WIFI and see the name of the Goggles with the DLNA icon (I cant make good pictured of it).
  2. check in your router which IP address got assigned to the Googles, or discover it via UPNP broadcast...
  3. if you dont know the Port of the webserver, either use something like NMAP, or in my case it was 1873
  4. simply copy the IP to your browser address bar like "http://:1873" NOT "https".
  5. Now you should see the DLNA service deinitions XML.

I can also attach the ones from my goggle for comparison. Notice i've redacted the serial numbers..

Goggles2Web.zip

The question on which encoding settings exactly the goggles support is still open, as it's probably heavily reliant on the underlaying microcontrollers they used and what these support.

Let me know if you can figure something out 👍

link89 commented 1 month ago

Thank you @yigithankardas and @hexxone for your interest and your research. Do you already confirm that this is not network issue but protocol. Just as @hexxone suggested, can you open a browser in Goggles to access a web page started on your computer (you may start one with python -m http.server) ?

yigithankardas commented 1 month ago

Hello @link89, Yes I am sure that this is a protocol issue. Since I was not able to stream any media from my PC, I was able to do it with my android phone via 3rd party apps like BubbleUPnP. This indicates that the issue is not related to connection/network stuff.

hexxone commented 1 month ago

One more thing @yigithankardas and @DENZAKIN

I just found out, you can also successfully stream to the DJI Goggles using the Windows Store "Movies & TV" application from Microsoft... Works flawlessly for anything I have tested. Just play something, connect Goggles to Wifi, press the 3 dots on the bottom right "Stream to Device", and done!

I am not sure if that also work for live streaming but any movie and video - no problem!