Page 1 of 1

Streaming to HTML5

Posted: 19 Feb 2013 03:21
by relaht
Need help creating a stream to HTML5

I use this line:

Code: Select all

--sout '#transcode{vcodec=h264,vb=150,acodec=mp4a,ab=50,mono,channels=1}:standard{mux=ts,dst=:8484/iDreamX_Stream.mp4,access=http}' --sout-transcode-width=320

I can receive this stream without problems using VLC:

Code: Select all

http://192.168.1.2:8484/iDreamX_Stream.mp4



But it doesn't work using this html code (Safari)
It keeps "Loading..."

Code: Select all

<!DOCTYPE html> <html> <body> <video width="320" height="240" controls> <source src="http://192.168.1.2:8484/iDreamX_Stream.mp4" type="video/mp4"> Your browser does not support the video tag. </video> </body> </html>
Can anybody see what is wrong here?
Thanks in advance.

Re: Streaming to HTML5

Posted: 21 Feb 2013 16:09
by relaht
No one? :(

Re: Streaming to HTML5

Posted: 21 Feb 2013 22:47
by Arite
Try VLC with the commandline (using Theora and Vorbis in an OGG container format):

Code: Select all

vlc INPUT :sout=#transcode{vcodec=theo,vb=800,scale=1,acodec=vorb,ab=128,channels=2,samplerate=44100}:http{mux=ogg,dst=:8081/test} :sout-keep
Where INPUT is your input.

I created an HTML file containing:

Code: Select all

<!DOCTYPE html> <html> <head> <title>HTML5 video test</title> </head> <body> <h1>HTML5 video test</h1> <video width="640" height="480" autoplay>     <source src="http://localhost:8081/test" type="video/ogg" />     HTML5 video not supported. </video> </body> </html>  
And it worked in both Firefox and Google Chrome (dev channel) (on 64-bit Win7).

Arite.

Re: Streaming to HTML5

Posted: 25 Mar 2013 12:26
by Flood_Gravemind
This wont work in safari either. The video codecs required for safari is the h264. I am struggling with this myself. I will ofcourse post the proper sout and html 5 code once I have some sucess.

Re: Streaming to HTML5

Posted: 25 Mar 2013 12:36
by relaht
I am still looking for a solution, creating a HTML5( h264) Stream.
Maybe someone from the VLC team can jump in and give as a hint. Please... :)

Re: Streaming to HTML5

Posted: 29 Aug 2013 11:20
by ebse
Hello,
I am running in teh sam problem as relaht. Evereything is running fin with ogg, but trying the same with h264 it is not runnig with VLC, and HTML5 and Firefox/Safari...
Does anybody have a solution for that?
Thanks for your help
Ebse

Re: Streaming to HTML5

Posted: 10 Feb 2015 19:56
by drdedus
I have the same problem, did someone find a solution?

someone said that the problem is the mux=ts and not mux=mp4
but vlc can not stream mp4 over http.

Re: Streaming to HTML5

Posted: 27 Apr 2016 19:00
by joelu
bump, facing the same problem with audio only

Re: Streaming to HTML5

Posted: 10 Nov 2019 21:59
by chilman408
Same problem.

Theora is a terrible codec in 2019, VP8 doesnt support hardware encoding....

Need some help with mp4 H264 via http