Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save McShauno/f95f261d29da09c8bb6b to your computer and use it in GitHub Desktop.
Save McShauno/f95f261d29da09c8bb6b to your computer and use it in GitHub Desktop.
Vlc stream to ipad with apache mediastreamsegmenter html5
/*=======================================================================================*/
Append following lines to /etc/apache2/mime.types MIME types of video and playlist.
sudo nano /etc/apache2/mime.types
video/MP2T ts
application/x-mpegURL m3u8
sudo apachectl restart
/*=======================================================================================*/
Turn on Websharing in system preferences
Create a temp folder in this location
/Users/yourusername/Sites/temp
then create an index.html file with the code below
/*=======================================================================================*/
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>HTML5 Streaming Video</title>
</head>
<body>
<video controls src="temp/prog_index.m3u8" x-webkit-airplay="allow" />
</body>
</html>
/*=======================================================================================*/
/Applications/VLC.app/Contents/MacOS/VLC -vvv -I dummy "/Users/djwilcox/Desktop/foo.avi" --sout="#transcode{vcodec=h264,samplerate=44100,vb=800,fps=25,acodec=mp4a,ab=128,height=480,width=640,scale=1}:standard{access=file,mux=ts,dst='-'}" | mediastreamsegmenter -f /Users/djwilcox/Sites/video/stream -t 30 -p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment