Streaming to HTML5

About encoding, codec settings, muxers and filter usage
relaht
Blank Cone
Blank Cone
Posts: 51
Joined: 14 Dec 2009 20:52

Streaming to HTML5

Postby relaht » 19 Feb 2013 03:21

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.

relaht
Blank Cone
Blank Cone
Posts: 51
Joined: 14 Dec 2009 20:52

Re: Streaming to HTML5

Postby relaht » 21 Feb 2013 16:09

No one? :(

Arite
Big Cone-huna
Big Cone-huna
Posts: 2478
Joined: 26 Jun 2007 20:40
VLC version: 3.0.20
Operating System: Debian Testing|Win10

Re: Streaming to HTML5

Postby Arite » 21 Feb 2013 22:47

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.
Don't use PMs for support questions.

Flood_Gravemind
New Cone
New Cone
Posts: 2
Joined: 24 Mar 2013 00:12

Re: Streaming to HTML5

Postby Flood_Gravemind » 25 Mar 2013 12:26

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.

relaht
Blank Cone
Blank Cone
Posts: 51
Joined: 14 Dec 2009 20:52

Re: Streaming to HTML5

Postby relaht » 25 Mar 2013 12:36

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... :)

ebse
New Cone
New Cone
Posts: 1
Joined: 29 Aug 2013 09:42

Re: Streaming to HTML5

Postby ebse » 29 Aug 2013 11:20

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

drdedus
New Cone
New Cone
Posts: 4
Joined: 31 Mar 2007 01:08

Re: Streaming to HTML5

Postby drdedus » 10 Feb 2015 19:56

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.

joelu
New Cone
New Cone
Posts: 4
Joined: 27 Apr 2016 07:15

Re: Streaming to HTML5

Postby joelu » 27 Apr 2016 19:00

bump, facing the same problem with audio only

chilman408
New Cone
New Cone
Posts: 1
Joined: 10 Nov 2019 21:58

Re: Streaming to HTML5

Postby chilman408 » 10 Nov 2019 21:59

Same problem.

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

Need some help with mp4 H264 via http


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 17 guests