VLC streaming & HTML5 & "smart" TVs

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
kapetr
New Cone
New Cone
Posts: 6
Joined: 09 Feb 2009 15:41

VLC streaming & HTML5 & "smart" TVs

Postby kapetr » 25 Apr 2015 10:37

Hello.

My "smart" tv has neither option to receive streams (udp, rtp) directly nor open multimedia files (http) directly.
If I try open a file link in TV browser (Opera) e.g. http://www.noiseaddicts.com/samples/2555.mp3 then I just get error info: "Downloading not supported".
I do not want that TV should download (save) the file I want that TV should play the file.

But if I embed it in HTML5 element, then TV plays it :-)

Code: Select all

<!DOCTYPE html> <html> <body> <audio controls> <source src="http://www.noiseaddicts.com/samples/2555.mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio> </body>
The Idea is - use as <source> VLC http stream. But don't know how to do this.
Stream:

Code: Select all

[code]cvlc -v file:///media/koko.mp3 --sout '#std{access=http,mux=ts,dst=:8080/audio}
[/code]
Normal receive OK: "vlc http://192.168.1.15:8080/audio"

But if I use: "http://192.168.1.15:8080/audio" as <source>

then TV (computer too) do not play it.
I thing the problem is in container / MIME type.

- VLC streams out TS stream including MP3 audio, but
- browser (TV or comp) expect MP3 file (I do not know if we can talk by xxx.mp3 file about container at all ?!)

How can I configure http stream to be as sending e.g as MP3 audio file ?

Thanks.

kapetr
New Cone
New Cone
Posts: 6
Joined: 09 Feb 2009 15:41

Re: VLC streaming & HTML5 & "smart" TVs

Postby kapetr » 25 Apr 2015 11:02

?? I do not want to public files with web server. Using file:// as VLC source was just example of course.
Target is to stream e.g. screen:// or dvb:// VLC sources to TV/web browser.
EDIT: this is replay to post which its author deleted

kapetr
New Cone
New Cone
Posts: 6
Joined: 09 Feb 2009 15:41

Re: VLC streaming & HTML5 & "smart" TVs

Postby kapetr » 25 Apr 2015 14:08

PARTIALLY SOLVED:

AUDIO:

HTML5 supports only MP3 , Wav and Ogg - see http://www.w3schools.com/html/html5_audio.asp
To avoid container enclosing and to set audio/mpeg in http response from VLC:

Code: Select all

cvlc -v file:///tmp/test.mp3 --sout '#std{access=http,mux=raw,dst=:8080/audio}' --sout-http-mime "audio/mpeg"
and in web page:

Code: Select all

<audio controls> <source src="http://192.168.1.15:8080/audio" type="audio/mpeg"> Your browser does not support the audio element. </audio>
-> it plays audio in computer and TV browsers :-)
Note: by TV it takes long time to catch the audio (probably due missing header of MP3 ?)


VIDEO:

HTML5 supports only MP4, WebM and Ogg - see http://www.w3schools.com/html/html5_video.asp
Only OGG is streamable by VLC - see http://www.videolan.org/streaming-features.html

Code: Select all

cvlc -v file:///mnt/DATA/VIDEO/HP-Drak.mkv --sout '#transcode{vcodec=theo,vb=1024,scale=1,acodec=vorb,b=128,channels=2,samplerate=48000}:std{access=http,mux=ogg,dst=:8080/video}' --sout-http-mime "video/ogg"
and in web page:

Code: Select all

<video controls> <source src="http://192.168.1.15:8080/video" type="video/ogg"> Your browser does not support the audio element. </video>
But by video there is problem unfortunately:

-- computer browser plays the video, but the quality is absolutely TERRIBLE - like 160x120 video at 50 kb/s.
I had test encoding theora video with avconv too and it is much better (but low quality anyway). I do not know, where is problem with this modern codec. It is worser then low-res mjpeg!

-- TV browser do not play itl. It do not even try to access it (the http://192.168.1.15:8080/video) - not sure why - maybe it is not able to play "video/ogg" => it do not try it at all. But MP4 (which TV as mediaplayer plays) is not streamable by VLC :-(

Maybe could someone try it on his Smart TV ? [I have Gogen == +-noname TV]


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 205 guests