-
-
Save MythodeaLoL/178c27e8a4e79e6146884244127e7d3e to your computer and use it in GitHub Desktop.
ffmpeg Just some experimentation in creating a live transcoding HTTP Live Streaming server for accessing an HDHomeRun
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
ffmpeg -i http://PRIMEIP:5004/auto/v1004 -async 1 -ss 00:00:05 -acodec libfdk_aac -vbr 3 \ | |
-b:v \3000k -ac 2 -vcodec libx264 -preset superfast -tune zerolatency -threads 2 -s 1280x720 \ | |
-flags -global_header -map 0:0 -map 0:1 -f segment -segment_time 10 -segment_list stream.m3u8 \ | |
-segment_format mpegts -segment_wrap 10 -segment_list_size 6 -segment_list_flags live stream%03d.ts |
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
require 'rubygems' | |
require 'sinatra' | |
require 'open-uri' | |
get '/test.m3u8' do | |
content_type 'video/MP2T' | |
open('test.m3u8').read | |
end | |
get %r{/(stream\d+.ts)} do | |
content_type 'application/x-mpegURL' | |
open(params[:captures].first).read | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment