App-EventStreamr

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

0.5       2015-08-02 21:02:32+08:00 Australia/Perth
          Bug Fix - Crash on boot with missing ALSA device #54
          Add YouTube Streaming Capability #80

0.4       2015-04-14 16:54:52+08:00 Australia/Perth
          Bug fix - Missing 'MixerWait' for streaming process

0.3       2015-03-25 20:00:41WST+0800 Australia/Perth
          Add IceCast Streaming Capability

README.md  view on Meta::CPAN


Concepts
========

A station can have one or more roles. Only one controller can manage stations.

Roles
=====
* controller - Web based frontend for managing stations
* ingest - alsa/dv/v4l capture for sending to mixer
* mixer - DVswitch/streaming live mixed video. With the intention for this to be easily replaced by gstswitch
* stream - stream mixed video
* record - stream mixed video
* sync - rsync files to a central server (requires keyless ssh to be configured)

Directories
===========
* baseimage - docs, notes, and tools for the base (OS) image
* station - station management scripts
* controller - controller stack

t/App/EventStreamr/DVswitch/Youtube.t  view on Meta::CPAN


# Added 'no_end_test' due to Double END Block issue
use Test::Warnings ':no_end_test';

# Scope for File::Temp
{
  my $status = App::EventStreamr::Status->new();
  my $dir = File::Temp->newdir();
  
  open(my $fh, '>', "$dir/config.json" );
  print $fh '{"run" : "1", "control" : { "dvswitch" : { "run" : "1" } }, "mixer" : { "host" : "127.0.0.1", "port" : "1234" }, "youtube" : { "preset" : "medium", "fps" : "25", "bitrate" : "2500k", "url" : "rtmp://a.rtmp.youtube.com/live2", "key" : "st...
  close $fh;
  
  my $config = App::EventStreamr::Config->new(
    config_path => $dir,
  );
  
  my $proc = App::EventStreamr::DVswitch::Youtube->new(
    config => $config,
    status => $status,
  );
  
  is(
    $proc->cmd, 
    'dvsink-command -h 127.0.0.1 -p 1234 -- '.$proc->avlib.' -i - -deinterlace -vcodec libx264 -pix_fmt yuv420p -vf scale=-1:480 -preset medium -r 25 -g 50 -b:v 2500k -acodec libmp3lame -ar 44100 -threads 6 -qscale 3 -b:a 256000 -bufsize 512k -f flv ...
    "Stream Command built"
  );
  
  like($proc->cmd, $proc->cmd_regex, "Command Regex Correct" );
}

done_testing();



( run in 0.245 second using v1.01-cache-2.11-cpan-a5abf4f5562 )