Skip to content

Instantly share code, notes, and snippets.

@max-verem
max-verem / hls2.html
Created May 12, 2017 09:39
HLS playback sample
<html>
<head>
<style>
body {
width: 982px;
margin: 50px auto;
}
</style>
@max-verem
max-verem / dash2.html
Created May 12, 2017 09:34
Dash player sample
<!DOCTYPE html>
<html><head><meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta http-equiv="content-type" content="text/html;">
<meta name="viewport" content="initial-scale=1.0 maximum-scale=1.0 user-scalable=no">
<title>M2</title>
<meta name="description" content="M2" />
<meta name="keywords" content="" />
<meta name="robots" content="index, nofollow" />
@max-verem
max-verem / SDI2-SD-qsv.sh
Created May 12, 2017 09:33
Produce live streams with decklink sdi input and intel's h264 codec
#!/bin/bash
D1="[f=hls:hls_flags=delete_segments:hls_list_size=10:hls_time=20]/var/www/html/hls2/stream.m3u8"
D2="[f=mpegts]udp://239.1.1.2:10480?localaddr=10.1.5.99&pkt_size=1316&fifo_size=1000000"
D3="[f=dash:window_size=5:extra_window_size=5:remove_at_exit=1]/var/www/html/dash2/stream.mpd"
ffmpeg \
-v verbose \
-f decklink -i "DeckLink SDI (2)@3" \
-vcodec h264_qsv -a53cc 0 \
package
{
import flash.display.Loader;
import flash.net.URLRequest;
import flash.net.URLStream;
import flash.events.IOErrorEvent;
import flash.events.SecurityErrorEvent;
import flash.events.Event;
import flash.utils.ByteArray;
import flash.utils.Endian;
@max-verem
max-verem / demo.c
Created April 7, 2017 08:59
Embedding Flash in Linux GTK Application - Sandbox Violation
#include <stdio.h>
#include <stdlib.h>
#include <dlfcn.h>
#include <string.h>
#include <unistd.h>
#include <ctype.h>
#include <gtk/gtk.h>
#include <gdk/gdkx.h>
@max-verem
max-verem / blackmagic-10.8.5a4.patch
Created March 28, 2017 08:06
blackmagic-10.8.5a4 under Fedora 25
--- blackmagic-10.8.5a4/blackmagic_lib.c.origin 2017-02-21 01:42:18.000000000 +0200
+++ blackmagic-10.8.5a4/blackmagic_lib.c 2017-03-28 10:54:51.205782144 +0300
@@ -662,7 +662,16 @@
write = 0;
down_read(&current_task->mm->mmap_sem);
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
+ if (current_task == current)
+ ret = get_user_pages((unsigned long)ptr & PAGE_MASK, *nr_pages, write ? FOLL_WRITE : 0, pages, NULL);