VLC as live Flash H.264 encoder

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
Soroush
New Cone
New Cone
Posts: 8
Joined: 05 Oct 2010 01:41

VLC as live Flash H.264 encoder

Postby Soroush » 05 Oct 2010 02:15

Hi,
I am searching for an H.264 live encoding solution with following requirement:
1. B-frames and CABAC entropy encoding support; as I know VideoLan is based on open source h264 encoder which support these settings.
2. Support for Flash dynamic streaming(MBR).
3. Reliable and stable for 7/24 live streaming on Windows; Wowzamedia forum does not recommend VLC for not being reliable but those post are a bit old and situation may have changed.

Does VLC meet the above requirements?

The live stream will be MPEG-TS input stream and it seems that VLC can read it; is it possible to feed that input via DVB-S card to VLC encoder directly? this is a plus and could simplify the setup.

Thanks in advance

alynx
New Cone
New Cone
Posts: 3
Joined: 07 Oct 2010 14:36

Re: VLC as live Flash H.264 encoder

Postby alynx » 07 Oct 2010 16:28

Hello,

My two cents on this after a few weeks research and testing , i have used vlc 1.1.4.1 and the latest version of lib_x264 under ubuntu server 10.04 LTS for a similar purpose and in my configuration , i have noticed a memory leak after a couple of hours, problems with x264 when i was activating CABAC (CPU at 100%) and problems with audio/video synchronization frames are lost. My TV input source are live IPTV mcast sources at 3Mbps and i am transcoding them to 500kbps. If somebody can advise me to change something to improve quality, let me know. You can try to use a similar approach and let me know if you have similar problems with windows. if u can read your MPEG TS stream from your DVB-S card with VLC , you will be probably able to restream it with some CPU capacity but i don't know if you will be satisfied with the quality.

Here is my configuration :

VLC launcher

cat vlc_launcher
#!/bin/bash
while true; do vlc -vvv -I http --http-host 0.0.0.0:8000 --vlm-conf vlm.conf;sleep 3;logger VLC a redemarre;done

VLM file

new tf1_standard broadcast enabled
setup tf1_standard input udp://@MCAST.AD.DRE.SS:2000
setup tf1_standard output #transcode{vcodec=h264,vb=400,acodec=mp3,ab=64,samplerate=22050,audio-sync,width=350,height=280,deinterlace,fps=25,venc=x264{keyint=100,profile=baseline,level=1.3,vbv-maxrate=768,vbv-bufsize=2000,no-cabac,qpmax=51,qpmin=10,subme=7,qcomp=0.6}}:standard{access=http,mux=ts,dst=0.0.0.0:2001/tf1_live.ts}


PHP script calling ffpmeg to encapsulate in FLV format

cat /var/www/tf1_50.php
<?php
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
system("ffmpeg -i http://127.0.0.1:2001/tf1_live.ts -vcodec copy -acodec copy -y -f flv -");
?>:

Webpage providing a flash video player

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/transitional.dtd">
<html>
<head>
<title>WebTV</title>

<script type="text/javascript" src="flowplayer-3.2.4.min.js"></script>
<link rel="stylesheet" type="text/css" href="style.css">



</head>
<body>
<a
href="http://YOUR.SERVER.IP.ADDRESS/tf1_50.php"
style="display:block;width:350px;height:280px;"
id="player">
</a>

<script>
flowplayer("player", "flowplayer-3.2.4.swf");
</script>

</body>
</html>

Soroush
New Cone
New Cone
Posts: 8
Joined: 05 Oct 2010 01:41

Re: VLC as live Flash H.264 encoder

Postby Soroush » 08 Oct 2010 01:30

Thanks alynx for sharing your experience about VLC. it is a pity that we have x264 which is the best encoder regarding quality per bitrate and speed, see http://compression.ru/video/codec_comparison/h264_2010
but we can not use it reliably for live streaming among the various frontends that use it.

The other options for H.264 encoding are FLME and Wirecast which seems do not support manual control on CABAC and B-frames despite that they mention support for main profile and that means low quality per bitrate. for the simple functionality of streaming they are just a frontend for the commercial H.264 encoder MainConcept.

I am grateful for VLC team but I really would like to have an reliable open source solution for live encoding and I would consider donating if I see more work on resolving VLC issues that alynx mentioned and many pointed in Wowza fourm.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: VLC as live Flash H.264 encoder

Postby Jean-Baptiste Kempf » 11 Oct 2010 13:18

VLC team is very limited as resources are concerned.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

hcope
New Cone
New Cone
Posts: 3
Joined: 11 Feb 2011 18:44

Re: VLC as live Flash H.264 encoder

Postby hcope » 15 Feb 2011 22:41

I was wondering if your search lead to a better solution or sticking with VLC? Were you able to improve transcoding cpu/memory utilization?

Soroush
New Cone
New Cone
Posts: 8
Joined: 05 Oct 2010 01:41

Re: VLC as live Flash H.264 encoder

Postby Soroush » 01 Mar 2011 17:13

My project get postponed but I already did some research:
1. VLC is based on x264 and it support baseline, main and high profiles and more advanced settings and options including CABAC and B-frames.

2. multiple bitrates for flash is not like WMV where all bitrates are inside on container file. it should be possible to output multiple streams with various bitrates for flash using 'duplicate' of sout.

3. I have not run VLC while encoding for long time but know others that use it long time reliably without memory leaks, in my experiment I found some versions saturate CPU, I do not remember which ones but 1.1.5 and 1.2 were CPU friendly even when using CABAC.
regarding audio desync issue; it was serious when downsampleing to 22.050 but no audio problem when not touching audio sample rate.

It seems there's no more development going on 'sout' due to lack of developers and financial support(as I was told on #videolan IRC channel) and the project needs its users' support developing or donating.


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: No registered users and 90 guests