Encode Server on Macs

Anything and everything to do with DCP-o-matic.
Sam C
Posts: 2
Joined: Tue Nov 26, 2013 12:09 pm

Encode Server on Macs

Post by Sam C »

Hey Carl,

Is there anyway to run an encode server on a Mac?

Cheers,
Sam.
carl
Site Admin
Posts: 2548
Joined: Thu Nov 14, 2013 2:53 pm

Re: Encode Server on Macs

Post by carl »

Hi Sam,

There isn't a very nice way (yet), but if you are ok in a terminal: open one up and do

Code: Select all

cd /Applications/DCP-o-matic.app/Contents/MacOS
DYLD_LIBRARY_PATH=../lib ./dcpomatic_server_cli
and it will start a server on that machine (assuming that you installed DCP-o-matic in the main Applications folder).
Sam C
Posts: 2
Joined: Tue Nov 26, 2013 12:09 pm

Re: Encode Server on Macs

Post by Sam C »

Super, works like a charm!
ensignrickyto
Posts: 6
Joined: Thu Apr 10, 2014 4:52 pm
Location: Toronto, ON, CA

Re: Encode Server on Macs

Post by ensignrickyto »

This maybe a silly sort of "newbie" question but I'm relatively inexperienced to the inner workings of OS X. Is there a way to get your mac to start the encode server every time the computer boots? Start it as a service as it were?
carl
Site Admin
Posts: 2548
Joined: Thu Nov 14, 2013 2:53 pm

Re: Encode Server on Macs

Post by carl »

I'm sure there probably is, but I don't know how off the top of my head: I'll look into it...
Carsten
Posts: 2804
Joined: Tue Apr 15, 2014 9:11 pm
Location: Germany

Re: Encode Server on Macs

Post by Carsten »

Hmm, strange, it doesn't work here, tried under 10.6.8, 10.7.5 and 10.9.2 (all as admin). I installed 1.69.0 on each system (quad core 'old' MacPro), started the GUI once successfully, then tried the CLI, with these results:

---
10.7.5 und 10.9.2
mac112:MacOS madmin$ DYLD_LIBRARY_PATH=../lib ./dcpomatic_server_cli
dyld: Symbol not found: _iconv
Referenced from: /usr/lib/libcups.2.dylib
Expected in: ../lib/libiconv.2.dylib
in /usr/lib/libcups.2.dylib
Trace/BPT trap: 5

10.6.8
mac112:MacOS madmin$ DYLD_LIBRARY_PATH=../lib ./dcpomatic_server_cli
dyld: lazy symbol binding failed: Symbol not found: _iconv_open
Referenced from: /Applications/DCP-o-matic.app/Contents/lib/libwx_baseu-3.0.dylib
Expected in: /Applications/DCP-o-matic.app/Contents/lib/libiconv.2.dylib

dyld: Symbol not found: _iconv_open
Referenced from: /Applications/DCP-o-matic.app/Contents/lib/libwx_baseu-3.0.dylib
Expected in: /Applications/DCP-o-matic.app/Contents/lib/libiconv.2.dylib

Trace/BPT trap
mac112:MacOS madmin$
---

Any hints?

- Carsten
carl
Site Admin
Posts: 2548
Joined: Thu Nov 14, 2013 2:53 pm

Re: Encode Server on Macs

Post by carl »

I think I've fixed that up in 1.69.18 which is here.

With that version, just do something like:

Code: Select all

cd /Applications/DCP-o-matic.app/Contents/MacOS
./dcpomatic_server_cli
Carsten
Posts: 2804
Joined: Tue Apr 15, 2014 9:11 pm
Location: Germany

Re: Encode Server on Macs

Post by Carsten »

Nice ;-) It seems the CLI is starting up successfully, no errors, I can see it in the activity monitor. However, it seems that the GUI running on a Windows notebook nearby doesn't see it, neither by 'Use all servers', nor by adding the IP manually. For this short test, they are both only on the same WIFI, which would of course be silly in real world applications.


Log says: Remote encode of 2 on 192.168.5.102 failed (error during async_write (100054));thread sleeping for 10s

When starting up, the OSX asked wether dcp-o-matic should be allowed incoming IP traffic and I did allow. But maybe still there is something wrong with the Firewall...


Ooops - I see something in the terminal after I started up the CLI - multiple lines with 'Mismatched server/client versions' - is that from DCP-o-matic?
Windows GUI version was 1.69.0 (64Bit) - now testing with 1.69.18...

Hmm, no 'Mismatched server/client versions' anymore, but it still doesn't seem the Mac CLI is doing something...

Always thought that it would be nice to receive some feedback on the number of used servers during the encoding, like below the 'x frames per second' saying something like ' x remote clients in use'

Hmm, disabled the firewall on OSX, but still no success... Maybe something in the WIFI timing that screws this up, e.g. a timeout for a large chunk of data?

Hmm, interesting, the LOG still contains these errors, but I can see large chunks of data being received on the Mac over the network every couple of seconds - but no signifikant CPU activity. Looks like the Mac is receiving images, but not encoding?

Hmm, but maybe I should stop using the WIFI now first...

Carl - when using more threads for encoding, is every thread encoding a single image, that is, one image per thread, or is there a finer graining involved in the J2k encoding? Because, when I setup the remote machine for e.g. 4 threads, it would need to have 4 images ready for processing all the time? In that case, I would have a hard time supplying enough data for a multicore remote machine, even over a very fast network?




- Carsten
carl
Site Admin
Posts: 2548
Joined: Thu Nov 14, 2013 2:53 pm

Re: Encode Server on Macs

Post by carl »

Ooops - I see something in the terminal after I started up the CLI - multiple lines with 'Mismatched server/client versions' - is that from DCP-o-matic?
Yes, that's telling you that there has been a change in the client/server protocol, so you need to update the older version of DCP-o-matic. The protocol does not change very often.
Always thought that it would be nice to receive some feedback on the number of used servers during the encoding, like below the 'x frames per second' saying something like ' x remote clients in use'
There is some limited detail in Tools -> Encoding Servers, but nothing very dynamic (just the servers it knows about).
Hmm, interesting, the LOG still contains these errors, but I can see large chunks of data being received on the Mac over the network every couple of seconds - but no signifikant CPU activity. Looks like the Mac is receiving images, but not encoding?
Perhaps you can run the server with --verbose and --log and it might tell you more about what is going on.
Carl - when using more threads for encoding, is every thread encoding a single image, that is, one image per thread, or is there a finer graining involved in the J2k encoding? Because, when I setup the remote machine for e.g. 4 threads, it would need to have 4 images ready for processing all the time? In that case, I would have a hard time supplying enough data for a multicore remote machine, even over a very fast network?
Yes, that is the limit with the current approach: enough source material must be transmitted from the master over the network to keep all the remotes busy. The remotes will be under 100% CPU if that doesn't happen. The master sends source data (raw uncompressed images, at the moment) and the remote sends back JPEG2000-encoded data.

In an ideal world the remotes would probably receive compressed video data and decompress it themselves before re-encoding to JPEG2000. One day...
ensignrickyto
Posts: 6
Joined: Thu Apr 10, 2014 4:52 pm
Location: Toronto, ON, CA

Re: Encode Server on Macs

Post by ensignrickyto »

It's been a while since I was working on this and it sorta fell by the wayside but I'd still like to get it up and going. Are there any additional insights, perhaps with newer versions, on how to best get the encode server to load at boot time on a Mac?

Thanks!