Skip to content

Instantly share code, notes, and snippets.

View mondain's full-sized avatar
🏠
Working from home

Paul Gregoire mondain

🏠
Working from home
View GitHub Profile
@mondain
mondain / XugglerRtmpReferenceImpl
Created July 11, 2014 21:56
Screen capture in Java with Xuggler
import com.xuggle.xuggler.Configuration;
import com.xuggle.xuggler.ICodec;
import com.xuggle.xuggler.IContainer;
import com.xuggle.xuggler.IContainerFormat;
import com.xuggle.xuggler.IPacket;
import com.xuggle.xuggler.IPixelFormat;
import com.xuggle.xuggler.IRational;
import com.xuggle.xuggler.IStream;
import com.xuggle.xuggler.IStreamCoder;
import com.xuggle.xuggler.IVideoPicture;
@mondain
mondain / gist:458b936ccdcd61e6ea20
Created October 28, 2015 19:00
Keeping your fork insync with a remote
Add the remote repo as "upstream"
git remote add upstream git@github.com:red5/red5-server.git
Get the remote repo
git fetch upstream
Ensure you're on your fork's master branch
git checkout master
Rebase with the remote master
@mondain
mondain / Rebase
Created January 11, 2016 14:33
Ice4j rebase
Add the remote repo as "upstream"
git remote add upstream git@github.com:jitsi/ice4j.git
Get the remote repo
git fetch upstream
Ensure you're on your fork's master branch
git checkout master
Rebase with the remote master
@mondain
mondain / libjitsi_and_aac.txt
Created January 13, 2016 12:33
Notes for setting up libjitsi and AAC decoding
Jitsi AAC
Could not find FFmpeg decoder 0x15002
Advanced Audio Coding (AAC) is the successor format to MP3, and is defined in MPEG-4 part 3 (ISO/IEC 14496-3). It is often used within an MP4 container format; for music the .m4a extension is customarily used. The second-most common use is within MKV (Matroska) files because it has better support for embedded text-based soft subtitles than MP4. The examples in this guide will use the extensions MP4 and M4A.
FFmpeg can support four AAC-LC encoders (aac, libfaac, libfdk_aac, libvo_aacenc) and two AAC-HE encoders (libaacplus and libfdk_aac). The licenses of libaacplus, libfaac, and libfdk_aac are not compatible with the GPL, so the GPL does not permit distribution of binaries containing code licensed under these licenses when GPL-licensed code is also included. Therefore these encoders have been designated as "non-free", and you cannot download a pre-built ffmpeg that supports them.
FFMpeg links
http://www.thingsiuse.org/2014/06/building-ffmpeg-for-h264-and-aac.
@mondain
mondain / maven-offline.md
Created February 9, 2016 18:37
Using Maven offline

To use Maven in an "offline" mode, first fetch all dependencies you need.

To get the dependencies and overwrite the ones where the file timestamp is newer (applies to snapshots and releases)

mvn dependency:go-offline -DoverWriteIfNewer=true

When the dependency downloads complete, use the -o parameter to tell maven to work in offline mode

mvn -o <normal mvn parameters here>
@mondain
mondain / Onename
Created June 9, 2016 11:39
Onename
Verifying that +mondain is my blockchain ID. https://onename.com/mondain
@mondain
mondain / subscriber.mxml
Created July 11, 2016 15:23
Subscriber flex mxml to show acceptance of onStreamSend data
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
width="220" height="176" minWidth="220" minHeight="176"
currentState="start" creationComplete="init()">
<fx:Script><![CDATA[
import flash.events.*;
import flash.media.*;
@mondain
mondain / publisher.mxml
Created July 11, 2016 15:26
Publisher flex mxml to show sending of onStreamSend data
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
width="320" height="400" minWidth="220" minHeight="176"
currentState="start" creationComplete="init()">
<fx:Script><![CDATA[
import flash.events.*;
import flash.media.*;
@mondain
mondain / REDSUPPORT-352.md
Last active August 30, 2016 19:04
Info for REDSUPPORT-352 ticket

Properties / statistics requested:

  • stream start time (unix timestamp)
  • stream end time (unix timestamp)
  • broadcaster user agent
  • video codec
  • audio codec
  • video size (width and height)
  • FPS
  • total bitrate (bits per second)
@mondain
mondain / gist:c45741c79026b0623f12fffe9b7f7c8b
Created October 5, 2016 13:18
Working with exiting Maven Projects in Eclipse
Here's what I do..
1. Create my new branch
2. Pull the code
3. Execute `mvn eclipse:eclipse` in each project subdirectory
4. Import into Eclipse as generic existing (not Maven)
5. Click on each project and select `Configure` then `Convert to Maven project`
6. Click on each project and select `Properties` then `Java Build Path` then `Libraries`, remove direct library links leaving `Maven Dependencies`, `JRE System...`, `Junit 4` entries