This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import os | |
from ctypes import cdll, c_char_p, c_int, create_string_buffer, sizeof | |
class RTMP: | |
""" | |
This class encapsulates librtmp in order to connect to a RTMP server and get video stream. | |
RTMPDUMP website : http://rtmpdump.mplayerhq.hu | |
LIBRTMP manpage : http://rtmpdump.mplayerhq.hu/librtmp.3.html | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import time | |
def getRxTx(): | |
rx = 0L | |
tx = 0L | |
with open("/proc/net/dev") as dev: | |
data = dev.read() | |
data = data.split("\n")[2:] | |
for iface in data: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://trac.ffmpeg.org/wiki/Create%20a%20video%20slideshow%20from%20images | |
Using a single image as an input | |
If you want to create a video out of just one image, this will do (output video duration is set to 30 seconds with -t 30): | |
ffmpeg -loop 1 -i img.png -c:v libx264 -t 30 -pix_fmt yuv420p out.mp4 | |
ffmpeg -loop 1 -i img.png -c:v libx264 -r 2 -t 10 -pix_fmt yuv420p out1.mp4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
from collections import namedtuple | |
try: | |
from Crypto.Cipher import AES | |
CAN_DECRYPT = True | |
except ImportError: | |
CAN_DECRYPT = False | |
from io import BytesIO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from livestreamer.compat import unquote, urlparse | |
from livestreamer.plugin import Plugin | |
from livestreamer.plugin.api import http | |
from livestreamer.stream import RTMPStream | |
from livestreamer.utils import parse_xml | |
PLAYER_API = "http://ext.live.nicovideo.jp/api/getplayerstatus" | |
class Nicovideo(Plugin): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python2.7 | |
""" e2restream Deamon """ | |
import os | |
import sys | |
import time | |
import atexit | |
import Queue | |
import hashlib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gst-inspect-1.0 -a | awk -F: '{ print $1 }' | sort | uniq | while read LINE; do (gst-inspect-1.0 $LINE 2>/dev/null | grep connection-speed -A | |
2) && echo $LINE; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# dm7020hd | |
Opera/9.80 (Linux mips; U; HbbTV/1.1.1 (+DL+PVR+RTSP+DRM; ; ; ; ;) CE-HTML/1.0; en) Presto/2.8.115 Version/11.10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <fcntl.h> | |
#include <errno.h> | |
#include <sys/ioctl.h> | |
#include <linux/dvb/frontend.h> | |
#define VTUNER_GET_MESSAGE 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
enum fe_caps { | |
FE_IS_STUPID = 0, | |
FE_CAN_INVERSION_AUTO = 0x1, | |
FE_CAN_FEC_1_2 = 0x2, | |
FE_CAN_FEC_2_3 = 0x4, | |
FE_CAN_FEC_3_4 = 0x8, | |
FE_CAN_FEC_4_5 = 0x10, | |
FE_CAN_FEC_5_6 = 0x20, |
OlderNewer