__ __ ______ ______ /\ "-.\ \ /\ ___\ /\__ _\ \ \ \-. \ \ \ __\ \/_/\ \/ \ \_\\"\_\ \ \_____\ \ \_\ \/_/ \/_/ \/_____/ \/_/ in veejay Veejay stats ============ None. Veejay can stream over the Network ================================================= With -p you can give Veejay's port offset TCP socket for sending commands: + 0 (sayVIMS -h) TCP socket for receiving status: + 1 (gveejay) TCP socket for querying commands:+ 2 (gveejay - editlist/sampellist etc) UDP multicast frame sender : + 3 (input stream multicast/other applications) UDP multicast for sending commands: + 4 (sayVIMS -g) How to customize: 1. veejay movie1.avi (starts on default port 3490) 2. veejay movie2.avi -p 5000 If there is already a veejay running, the next instance will start at DEFAULT_PORT + 1000 veejay 2 makes a connection with veejay 1 3. sayVIMS "245:localhost 3490;" -p 5000 -h localhost 4. move mouse to veejay2 video window and press 'ESC' if everything is OK, the video will be playing. 5. stop veejay1 (CTRL-C) 6. veejay2 will show last frame (press ESC) 7. restart veejay1 8. press 'ESC' in veejay2 to resume streaming (auto-reconnect) Veejay can stream over the Network (UDP / Multicast ) ===================================================== How to activate: 1. veejay -T 224.0.0.50 -p 5000 -v movie1.avi 2. veejay -d -W -H 3. echo "246:5000 224.0.0.50;" |sayVIMS 4. press F2 to activate newest created stream Veejay can receive OSC (Open Sound Control) messages over Multicast protocol ============================================================================ How to activate: 1. veejay --multicast 224.0.0.30 movie1.avi Note that you must have 'multicast' enabled in your kernel configuration. Use the tool 'mcastOSC' in test/OSC to send OSC messages to all veejay's you have started with --multicast (on multiple hosts!!) 2. export MCAST_ADDR=224.0.0.30 4. mcastOSC -r 3495 Veejay can send/receive VIMS (Veejay Internal Message System) packets over Multicast protocol ============================================================================= How to activate: 1. veejay --multicast-vims 224.0.0.32 movie1.avi 2. veejay --multicast-vims 224.0.0.32 movie2.avi 3. sayVIMS -g 224.0.0.32 -f test/vims/magicmirror-vims.txt How to setup multicast? ======================= How to setup: (example to setup multicast over loopback) 1. turn off firewall (or add allow rule) 2. /sbin/ifconfig lo multicast 3. route add -net 224.0.0.0 netmask 240.0.0.0 dev lo 4. echo 0 > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts 5. echo 1 > /proc/sys/net/ipv4/ip_forward 6. ping 224.0.0.1 (should reply) You can replace 'lo' for the interface you want to use. If you have multiple interfaces, you can set VEEJAY_MCAST_INTERFACE to the interface you want to use for multicasting: $ export VEEJAY_MCAST_INTERFACE="eth0" What is multicast? ================== Multicasts enables you to (ab)use the network topology to transmit packets to multiple hosts. Limitations =========== 1. Audio is not supported 2. Frame data is only compressed with LZO, bandwith consumption for 720p is ~ 40 MB/sec What header format? =================== unicast/multcast packet format: [field:byte size] Header is the first 44 bytes: [width:4][height:4][pixel_format:4][compressed_length:8] [plane0 length:8][plane1 length:8][plane2 length:8] [DATA:compressed_length] data contains redundant information: [DATA [ Y compressed length: 4][ U compressed length: 4 ] [ V compressed length: 4][ reserved: 4 ] [ pixel_data: Y + U + V compressed length ] ] compressed length should match 16 + Y + U + V compressed length. If compressed length is zero, then the frame is not compressed and the plane lengths are the sizes of the YUV planes. For multicast, the whole of this blob is send in chunks of 1500 bytes. Each chunk starts with the following header: [sequence number:4][usec:8][timeout:4][total packets:4][ data: 1480 bytes ] The last chunk is zero padded to fill the 1500 byte marker