Skip to content

Instantly share code, notes, and snippets.

View cjcolvar's full-sized avatar

Chris Colvard cjcolvar

  • Bloomington, IN
View GitHub Profile
@cjcolvar
cjcolvar / gist:4692511
Created February 1, 2013 16:46
new ffmpeg codecs
[cjcolvar@mallorn newtest]$ /usr/local/ffmpeg/bin/ffmpeg -codecs
ffmpeg version N-48668-g8514d5b Copyright (c) 2000-2013 the FFmpeg developers
built on Jan 28 2013 14:03:25 with gcc 4.4.6 (GCC) 20120305 (Red Hat 4.4.6-4)
configuration: --prefix=/usr/local/ffmpeg-20130109 --enable-gpl --enable-shared --enable-nonfree --enable-postproc --enable-swscale --enable-avfilter --enable-pthreads --enable-libfaac --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-libvpx --enable-libopenjpeg
libavutil 52. 13.100 / 52. 13.100
libavcodec 54. 86.100 / 54. 86.100
libavformat 54. 59.107 / 54. 59.107
libavdevice 54. 3.102 / 54. 3.102
libavfilter 3. 32.100 / 3. 32.100
libswscale 2. 1.103 / 2. 1.103
@cjcolvar
cjcolvar / gist:4692624
Created February 1, 2013 17:06
MH HLS encoding profile
profile.hls.http.name = hls
profile.hls.http.input = visual
profile.hls.http.output = visual
profile.hls.http.suffix = -hls.m3u8
profile.hls.http.mimetype = application/x-mpegURL
profile.hls.http.ffmpeg.command = -i #{in.video.path} -codec copy -map 0 -bsf h264_mp4toannexb -f segment -segment_list #{out.dir}/#{out.name}#{out.suffix} -segment_time 10 #{out.dir}/${out.name}-%03d.ts
@cjcolvar
cjcolvar / HLSDistributionServiceImpl.java
Created March 11, 2013 17:21
src/main/java/org/opencastproject/distribution/hls/HLSDistributionServiceImpl.java with debug logging on retract
/**
* Copyright 2009, 2010 The Regents of the University of California
* Licensed under the Educational Community License, Version 2.0
* (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.osedu.org/licenses/ECL-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an "AS IS"
@cjcolvar
cjcolvar / gist:5272207
Created March 29, 2013 17:16
maven flex configuration
<groupId>org.sonatype.flexmojos</groupId>
<artifactId>flexmojos-maven-plugin</artifactId>
<version>4.0-RC2</version>
<extensions>true</extensions>
<configuration>
<targetPlayer>10.0.0</targetPlayer>
<accessible>true</accessible>
<headlessServer>true</headlessServer>
<!-- <output>../../shared-resources/player/Videodisplay.swf</output>
<coverageViewerPath>/Applications/CoverageViewer.app</coverageViewerPath> -->
@cjcolvar
cjcolvar / gist:5303408
Created April 3, 2013 17:38
OpencastPlayer.as now with extra logging and JS events!
diff --git a/modules/matterhorn-engage-player/src/main/flex/org/opencast/engage/videodisplay/control/util/OpencastMediaPlayer.as b/modules/matterhorn-engage-player/src/main/flex/org/opencast/engage/videodisplay/
index b08197c..7a8db3c 100644
--- a/modules/matterhorn-engage-player/src/main/flex/org/opencast/engage/videodisplay/control/util/OpencastMediaPlayer.as
+++ b/modules/matterhorn-engage-player/src/main/flex/org/opencast/engage/videodisplay/control/util/OpencastMediaPlayer.as
@@ -2,6 +2,7 @@ package org.opencast.engage.videodisplay.control.util
{
import bridge.ExternalFunction;
+ import flash.events.Event;
import flash.events.TimerEvent;
[root@lancelot current]# su - avalon
[avalon@lancelot ~]$ cd /var/www/avalon/current/
[avalon@lancelot current]$ rails c
-bash: rails: command not found
[avalon@lancelot current]$ script/rails c
/var/www/avalon/shared/gems/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:47:in `resolve_hash_connection': database configuration does not specify adapter (ActiveRecord::AdapterNotSpecified)
from /var/www/avalon/shared/gems/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:41:in `resolve_string_connection'
from /var/www/avalon/shared/gems/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:25:in `spec'
from /var/www/avalon/shared/gems/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:130:in `establish_connection'
from /var/www/avalon/shared/gems/ruby/1.9.1/gems/activerecor
@cjcolvar
cjcolvar / gist:5468837
Created April 26, 2013 17:21
Changes from puppet script for pawpaw
Changes from puppet script for pawpaw
Symlink /var/avalon to /srv/avalon
Comment out distribute-hls operation from avalon-video MH workflow
Shutdown red5
Stop MH, tomcat
Move /usr/local/matterhorn to /srv/avalon/matterhorn, edit MATTERHORN_HOME in /etc/init.d/matterhorn, restart MH
Move /usr/local/fedora to /srv/avalon/fedora, symlink back to /usr/local/fedora, restart tomcat
@cjcolvar
cjcolvar / gist:5577667
Created May 14, 2013 17:09
bootstrap_form_for undefined
Started GET "/roles/new" for 127.0.0.1 at 2013-05-14 13:04:31 -0400
Processing by RolesController#new as HTML
Rendered /home/cjcolvar/Code/avalon/hydra-role-management/app/views/roles/new.html.erb within layouts/blacklight (103.7ms)
Completed 500 Internal Server Error in 137ms
ActionView::Template::Error (undefined method `bootstrap_form_for' for #<#<Class:0x00000005ba59a0>:0x000000055cc998>):
1: <%= bootstrap_form_for @role, :url=>role_management.roles_path do |f| %>
2: <%= f.text_field :name, :label=> 'Role name' %>
3: <%= f.actions %>
4: <% end %>
@cjcolvar
cjcolvar / gist:5585764
Created May 15, 2013 17:34
VideoElement.as.diff
diff --git a/src/flash/htmlelements/VideoElement.as b/src/flash/htmlelements/VideoElement.as
index 5a3e1ec..6f209cc 100644
--- a/src/flash/htmlelements/VideoElement.as
+++ b/src/flash/htmlelements/VideoElement.as
@@ -242,8 +242,12 @@ package htmlelements
if (_isPreloading) {
-
+ _stream.seek(0);
@cjcolvar
cjcolvar / gist:5620930
Created May 21, 2013 15:57
XACML policy combining algorithms (as described in some IBM documentation not the OASIS standard)
From the Dependent Policies Combining list, select the policy combining algorithm.
Deny Overrides
The deny-overrides policy-combining algorithm evaluates each policy in the order that it appears in the XACML policy set. If any policy in the set evaluates to deny, the policy combination evaluates immediately to deny. In other words a single deny takes precedence over other policy evaluations. If all policies are determined to be NotApplicable, the policy combination evaluates to NotApplicable.
First Applicable
(Default) The first-applicable policy combining algorithm evaluates each policy in the order that it appears in the XACML policy set. For an individual policy, if the target (resource) evaluates to TRUE and the policy conditions evaluate unambiguously to permit or deny, evaluation is immediately halted, and the policy combination evaluates to the effect of that individual policy. If the individual policy evaluates the target as FALSE or the policy conditions as NotApplicable, then the next poli