This file contains hidden or 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
ffmpeg -i input.flv -acodec copy -vcodec copy -copyts output.mp4 |
This file contains hidden or 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
gem 'haml-rails' | |
gem 'dynamic_form' | |
gem 'rspec-rails', :group => [:development, :test] | |
gem 'machinist', :group => [:development, :test] | |
generate 'rspec:install' | |
generate 'db:migrate' | |
generate 'machinist:install' | |
remove_file 'public/index.html' |
This file contains hidden or 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
# Stream to UDP 127.0.0.1, Port 2222 | |
vlc qtcapture:// -vvv input_stream --sout='#duplicate{dst=display, dst="transcode{venc=x264{keyint=60,idrint=2},vcodec=h264,vb=300,acodec=mp4a,ab=32,channels=2, samplerate=22050}:standard{access=udp,mux=ts,dst=127.0.0.1:2222}"}' | |
# Stream to local file: | |
vlc --ttl 12 qtcapture:// -vvv input_stream --sout="#transcode{venc=x264{keyint=60,idrint=2},vcodec=h264,vb=300,acodec=mp4a,ab=32,channels=2, samplerate=22050}:\ | |
duplicate{dst=file{mux=ts,dst=/Users/fernyb/live/vlclive.ts},dst=display}" | |
# Stream to local and pipe to media stream segmenter, which creates index file and can be streamed to iOS | |
vlc --ttl 12 qtcapture:// -vvv input_stream --sout="#transcode{venc=x264{keyint=60,idrint=2},vcodec=h264,vb=300,acodec=mp4a,ab=32,channels=2, samplerate=22050}:\ | |
duplicate{dst=file{mux=ts,dst='-'},dst=display}" | mediastreamsegmenter -s 10 -D -f /Users/fernyb/hls/live |
This file contains hidden or 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
gem install -v 1.3.6 rubygems-update && \ | |
ruby `gem env gemdir`/gems/rubygems-update-1.3.6/setup.rb |
This file contains hidden or 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
./configure --enable-libmp3lame --enable-libx264 --enable-libfaac --enable-libfaad --enable-gpl --enable-nonfree --enable-shared --disable-mmx --arch=x86_64 --cpu=core2 | |
This file contains hidden or 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
wget http://ffmpeg.org/releases/ffmpeg-1.0.tar.gz | |
tar zxvf ffmpeg-1.0.tar.gz | |
cd ffmpeg-1.0 | |
./configure --prefix=/usr/local/ffmpeg-1.0 \ | |
--enable-libmp3lame --enable-libx264 --enable-libfaac --enable-gpl --enable-nonfree --enable-shared --disable-mmx --arch=x86_64 --cpu=core2 |
This file contains hidden or 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
# | |
# Transcode video for iOS streaming | |
# | |
/usr/local/ffmpeg-1.0/bin/ffmpeg -i video-source.flv -re -g 250 -keyint_min 25 -bf 0 -me_range 16 \ | |
-sc_threshold 40 -cmp 256 -coder 0 -trellis 0 -subq 6 -refs 5 -r 25 -c:a libfaac -ab:a 256k \ | |
-async 1 -ac:a 2 -c:v libx264 -profile baseline -s:v 640x360 -b:v 768k -aspect:v 16:9 -map 0 -ar 44100 \ | |
-vbsf h264_mp4toannexb -flags -global_header -f segment -segment_time 10 \ | |
-segment_list_type flat -segment_list_type m3u8 -segment_list playlist.m3u8 \ | |
-segment_format mpegts parts/stream256ios%09d.ts |
This file contains hidden or 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
wget http://nginx.org/download/nginx-1.2.4.tar.gz | |
wget https://github.com/arut/nginx-rtmp-module.git | |
cd nginx-rtmp-module | |
rtmp_module_path=$(pwd) | |
cd .. | |
tar zxvf nginx-1.2.4.tar.gz | |
cd nginx-1.2.4 |
This file contains hidden or 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
./configure --prefix=/usr/local \ | |
--with-http_flv_module \ | |
--with-http_gzip_static_module \ | |
--with-http_mp4_module \ | |
--with-http_ssl_module \ | |
--with-http_degradation_module \ | |
--add-module=/home/fernyb/sources/nginx-rtmp-module |
This file contains hidden or 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
# Add init.d script to start at boot | |
update-rc.d <init.d/name> defaults | |
# Remove init.d from starting at boot | |
update-rc.d -f <init.d/name> remove |