heisters / node-omxplayer-sync

Synchronize omxplayer instances over a network using OSC
15 stars 5 forks source link

UDP Stream Sync #1

Closed sarpkaya-xx closed 7 years ago

sarpkaya-xx commented 8 years ago

When I try to give udp stream address as a source, main.js gives me a file path error. It tries to reach the destination as "/home/pi/udp://224.2.2.5:1234", Is it possible to sync udp streams or are you guys planning to implement it?

heisters commented 8 years ago

While it should be pretty simple to get it working with any source format omxplayer supports, I doubt that a UDP stream would provide the ability to do fast, frame-accurate jumps in order to obtain sync (see https://github.com/heisters/node-omxplayer-sync#video-format ).

If you can provide a full trace of the error, though, it should be easy to at least get playback working. Whether sync works is another story.

sarpkaya-xx commented 8 years ago

Please take a look at the attached file for error message, as you can see it says that File does not exists: /home/pi/node-omxplayer-sync-master/udp://224.2.25:1234 . It looks like the problem is, application looking for the filename attribute value in the file system. I set video dir to empty string value omx.setVideoDir(''), but did not work.

20151022_084800_resized

sarpkaya-xx commented 8 years ago

I update the line 136 from omxdirector/lib/main.js

//var realfiles = resolveFilePaths(videos);
var realfiles = videos;

think it resolved the file path issue but now I got the "Could not connect to dbus, trying again" message then main.js exits from applicaiton.

heisters commented 8 years ago

yeah, the error is occurring in omxdirector, which doesn't support UDP streams. Your change should be enough to at least test, but a more robust solution would detect whether the paths are udp streams or file paths and resolve them accordingly. If you want something like that, please file an issue on the omxdirector repo, and/or send a pull request for UDP stream support.

Can you send a full trace of the dbus error? Rather than taking a screenshot, if you can SSH into the Pi, you can run node main.js from there and just copy and paste the trace. If you can, please send a full trace any time you're reporting an error.

The omxplayer dbus interface is painfully flakey, and I've been moving away from it wherever possible. Sometimes just waiting a bit, or rebooting and trying again fixes dbus issues. The devops repo and scripts that are meant to accompany this repo use forever to retry connecting until it works. There's a sysinit script in that repo that you could pretty easily adapt to use on its own, if you don't want to use the whole automation suite.

There may, however, be some other issue on your machine that is keeping you from connecting to dbus. Again, the devops repo ensures the pi has all the right dependencies and permissions set. If you're manually installing, take a look at the devops repo and try to do everything it does. The player role's main file is the place to look. Have you installed all the dbus dependencies?

apt-get install libdbus-1-dev libglib2.0-dev libexpat1 libexpat1-dev
sarpkaya-xx commented 8 years ago

Thanks for your response @heisters, as you recommend I filed an issue (https://github.com/alessandro-pezzato/omxdirector/pull/11). And I will still continue to work on this issue. you help is appraciated