running:
bash create-vod-hls.sh beach.mkv
will produce:
beach/
|- playlist.m3u8
|- 360p.m3u8
running:
bash create-vod-hls.sh beach.mkv
will produce:
beach/
|- playlist.m3u8
|- 360p.m3u8
Note: This is an older post that I did back when I thought I might have time to be a blogger. Oh I was oh so wrong. However, it has proven useful for some folks on stackoverflow. Thus I'm keeping it alive here on Gist.
One of my past projects dealt heavily with an open source Apple technology called HTTP Live Streaming. It’s an HTTP based streaming protocol that at its most fundamental level provides a way to stream video and audio from just about any server with nothing but a few free software tools provided by Apple**. However, it has a few additional features that I think make it a really exciting tool. Yet, I haven’t seen HTTP Live Streaming used very much. This is probably mainly due to the combination of a lack of good/clear documentation, and Apple’s Live Streaming Developer Tools being command line based also make the barrier to entry higher than many developers want to deal with.
The hope is to share my understanding of how to use this technology to:
Your school or company network may block the access to a few specific websites. To solve this problem, I'd highly recommend Shadowsocks, since it is the easiest proxy tool I've ever found, and it's FREE (of course iff you have your own server running).
First, ssh
to your server, and make sure you have Python and pip
installed. If you have Python but not pip
, install it using the following command
$ sudo apt-get install python3-pip
#!/bin/bash | |
# store the current dir | |
CUR_DIR=$(pwd) | |
# Let the person running the script know what's going on. | |
echo "\n\033[1mPulling in latest changes for all repositories...\033[0m\n" | |
# Find all git repositories and update it to the master latest revision | |
for i in $(find . -name ".git" | cut -c 3-); do |
This example shows how to load a JSON feed into a ScenGraph RowList in Roku. It's not a complete application. This code started life as Simple_Grid_with_Details_and_Video, available here: https://blog.roku.com/developer/2016/03/03/scenegraph-tutorial/
The json_parser.brs file has the brightscript code to load the feed data (represented by the contents of data.json). The data is then translated into an array of MediaItems. MediaItem is an extended ContentNode. Then the data is structured to load into a RowList, which is represented in GridScreen.xml.
extension Optional where Wrapped == String { | |
var valueOrEmpty: String { | |
guard let unwrapped = self else { | |
return "" | |
} | |
return unwrapped | |
} | |
} | |
-------------------------------------------------- | |
-------------------------------------------------- | |
-- Import tasks from Things to OmniFocus | |
-------------------------------------------------- | |
-------------------------------------------------- | |
-- | |
-- Script taken from: http://forums.omnigroup.com/showthread.php?t=14846&page=2 && https://gist.github.com/cdzombak/11265615 | |
-- Added: OF3 & Things 3 compatibility; task order; areas/folders; tags | |
-- Empty your Things Trash first. | |
-- |
Increases indentation on the file tree and adds some lines to each directory/file.
Works 15 levels deep, but you can expand it by just adding more of each line thats repeating, i.e.:
(n*-20px) 0 0 0 rgba(255, 255, 255, 0.4)
.monaco-tree-row[aria-level="n"] { padding-left: ((n-1)*20)px; }
.monaco-tree-row[aria-level="n"]:before { left: (((n-1)*20)-9)px; }
.monaco-tree-row[aria-level="n"]:after { left: (((n-1)*20)-9)px; }
#!/bin/bash | |
if [ -z "$1" ]; then | |
echo "waiting for the following arguments: username + max-page-number" | |
exit 1 | |
else | |
name=$1 | |
fi | |
if [ -z "$2" ]; then |
In this article, I will share some of my experience on installing NVIDIA driver and CUDA on Linux OS. Here I mainly use Ubuntu as example. Comments for CentOS/Fedora are also provided as much as I can.