Skip to content

Instantly share code, notes, and snippets.

View birme's full-sized avatar

Jonas Birmé birme

View GitHub Profile
@birme
birme / adtest.txts
Last active September 23, 2024 21:51
https://eyevinn-guide.eyevinn-lambda-stitch.auto.prod.osaas.io/stitch/master.m3u8?payload=ewogICJ1cmkiOiAiaHR0cHM6Ly9tYWl0di12b2QubGFiLmV5ZXZpbm4udGVjaG5vbG9neS9VTkhJTkdFRF9UcmFpbGVyXzIwMjAubXA0L21hc3Rlci5tM3U4IiwKICAiYnJlYWtzIjogWwogICAgeyAicG9zIjogMjAwMDAsICJkdXJhdGlvbiI6IDE1MDAwLCAidXJsIjogImh0dHBzOi8vbWFpdHYtdm9kLmxhYi5leWV2aW5uLnRlY2hub2xvZ3kvVklOTi5tcDQvbWFzdGVyLm0zdTgiIH0KICBdCn0=
https://lab.cdn.eyevinn.technology/stswetvplus-promo-2023-5GBm231Mkz.mov/manifest.m3u8
https://lab.cdn.eyevinn.technology/Channel-Engine-Promo-Mar-2023-PnA8E-jw5x.mp4/manifest.m3u8
https://lab.cdn.eyevinn.technology/eyevinn-reel-feb-2023-_2Y7i4eOAi.mp4/manifest.m3u8
https://maitv-vod.lab.eyevinn.technology/UNHINGED_Trailer_2020.mp4/master.m3u8
@birme
birme / whpp.html
Created June 24, 2022 10:59
WHPP example
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@exampledev/[email protected]/new.min.css">
</head>
<body>
<video autoplay muted playsinline controls></video>
<script type="text/javascript">
const url = "https://<whpp-url>";
@birme
birme / gst-tsdemux.c
Created November 29, 2021 22:21
Demux an SRT/MPEG-TS stream using GStreamer
/*
* gcc -Wall gst-tsdemux.c -o gst-tsdemux $(pkg-config --cflags --libs gstreamer-1.0)
*/
#include <gst/gst.h>
#include "utils.h"
typedef struct _CustomData {
GstElement *pipeline;
GstElement *source;
@birme
birme / hls-repeat.js
Created November 1, 2021 09:31
An endpoint that on-the-fly repeats an HLS VOD
// $ node hls-repeat.js
// Example (2 reps): http://localhost:8000/slate-consuo2.mp4/master.m3u8?r=2
// where r is how many times the VOD to be repeated
const { HLSProxy } = require("@eyevinn/hls-proxy");
const HLSRepeatVod = require("@eyevinn/hls-repeat");
const proxy = new HLSProxy({
originHandler: async () => {
// Origin where the VOD is found
@birme
birme / ingest-aws.js
Last active September 22, 2021 11:44
Watch-folder upload and transcode with AWS MediaConvert
// This gist shows an example of an ingest application based on Eyevinn Ingest Application Framework [1] plugins
// to watch a folder for a new MP4-file and upload and transcode on AWS using AWS MediaConvert.
// Copyright 2021 Jonas Birmé
//
// [1] https://eyevinn.github.io/ingest-application-framework/
const { AwsUploadModule } = require("@eyevinn/iaf-plugin-aws");
const { watch } = require("chokidar");
const { createReadStream } = require("fs");
/**
* This NodeJS gist creates a virtual linear channel (VOD2Live) with one ad break (105 sec) and a trailer,
* both on loop.
*
* npm install --save eyevinn-channel-engine
* node server.js
*
* Then play the HLS from:
* http://localhost:8000/live/master.m3u8?channel=1
*
@birme
birme / face-detection.html
Last active October 15, 2020 13:48
A simple test of the Face Detection API in Chrome
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://player.eyevinn.technology/v0.2.4/build/eyevinn-html-player.css">
<style>
body { background-color: black; }
#status {
font-size: 20pt;
font-family: Verdana;
height: 40px;
@birme
birme / mse-tutorial.html
Created May 25, 2018 11:30
The basic principles for video streaming using MSE API
<!DOCTYPE html>
<html>
<body>
<video style="width: 640px; height: 360px; border: solid 1px;"></video>
<script>
var queue = [];
// Check that browser has support for media codec
var mimeCodec = 'video/mp4; codecs="avc1.4D401F"';
console.log(MediaSource.isTypeSupported(mimeCodec));