AviSynth UDP streamer

From Forskningsavdelningen Wiki
Jump to: navigation, search

Contents

[edit] GIT repository

AviSynth UDP streamer

[edit] Media

[edit] Participants

[edit] Introduction

We wanted to be able to stream media files to the PET-GCM so Olle and JonasB wrote the Rbox video viewer in Ruby.

This was a great start, but wasn't as easy to use as I (as a windows user) would like. No, I wanted to simple be able to load up any media file in one of the common media players and have this file immediately streamed to the panel so that it would be coordinated with the audio from the computer.

First idea was to use VLC, but that was a hassle getting started with so it fell to AviSynth, which is available for any DirectShow media player (Windows Media Player being the most common) through ffdshow.

AviSynth plugins are very easy to write and are easily augmented by AviSynth scripts to produce effects not available in the actual plugin.

[edit] Status and useage

Project is completed and works great! The AviSynth script to accompany the plugin looks like this:

LoadCplugin("somefolder\petsend.dll")
BicubicResize(64,48)
ConvertToRGB24()
send_frame("ip-address:port")

This is to be entered into the AviSynth property page under ffdshow video codec configuration.

So, the first line loads the petsend.dll plugin, which is the actual plugin - available at the git repository (see link above).

The second line resizes the video stream to a size compatible with the panel and the third line converts the results into RGB24(8-8-8). This is done in script because it's just so easy and I was too lazy to code a resizer and colour space converter into the actual plugin when the functionality is already so readily available.

The last line is a call to a function within the plugin that takes the frame data, restructures it to suite the panel (includes colour curve correction and dithering) and sends it using UDP to the specified IP address and port.

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox