x264 streaming problem with VLC 1.1.5

About encoding, codec settings, muxers and filter usage
jshank
New Cone
New Cone
Posts: 2
Joined: 19 Nov 2010 19:48

x264 streaming problem with VLC 1.1.5

Postby jshank » 19 Nov 2010 20:57

Running VLC 1.1.5 on Ubuntu 10.04 LTS on a Core2 Duo 6400 2.13Ghz machine with 2GB RAM and a 160GB HD.

I am attempting to setup a streaming server to distribute cable TV signals,captured with a PVR-150, over the local LAN via RTP multicast. My initial attempts with VLC 1.0.6 and 1.1.2 were very successful except for an intermittent crash due to an outdated x264 packaged with Ubuntu 10.04. Here is the command:

Code: Select all

cvlc pvr:// :pvr-device=/dev/video0 :pvr-channel=2 --sout '#transcode{vcodec=h264,vb=768,scale=1,acodec=mp4a,ab=128,channels=2,samplerate=44100,deinterlace}:rtp{dst=239.192.0.1,port=5004,mux=ts,sdp=sap://,name="DCHS Channel 1"}' -vv
Verbosity 2 log on 1.1.2: http://pastebin.com/hq6mter7

I did some research and found that the error I was experiencing was due to a know bug with the upstream x264 implementation. I enabled the lucid-bleed ppa and upgraded to 1.1.5 to address the problem. I am now unable to get any output to the stream using x264 and there aren't any errors pointing to the culprit. I am sure it's something to do with x264 because changing my vcodec to div3 works like a champ. I will eventually want to scale to 4 streams and based on feedback, h264 is the way to go.

Verbosity 2 log on 1.1.5: http://pastebin.com/J7NxCes8

I have tried enabling rtp caching to clear the main mux warning: late buffer for mux input errors but don't think this is the problem since they were the same in vlc 1.1.2 and the stream looked great. I also joined the videolan channel on IRC and it was suggested I try to tune the x264 encoder settings
[16:23] <ILEoo> or just set transcode{venc=x264{subme=3}...} for starters
I attempted that today with no better result. The odd thing is that when I ctrl-c the server to cancel the stream, I get about 5 seconds of audio on the client and then it stops, I never see the video. I am using my own test lab setup and don't see much activity on the LAN port when using 1.1.5 but was seeing about 1MB stream when using 1.1.2.
Last edited by jshank on 07 Dec 2010 20:24, edited 1 time in total.

jshank
New Cone
New Cone
Posts: 2
Joined: 19 Nov 2010 19:48

Re: x264 streaming problem with VLC 1.1.5

Postby jshank » 07 Dec 2010 20:23

I finally broke down and compiled VLC and x264 from trunk. The late buffer for mux messages are still streaming but the client side is able to watch the video stream now. To make sure it was the encoder, I tested with divx and it works perfectly, much lower CPU usage and no errors. I am still working out issues with audio sync but will see if they have gone away with the most recent source code, using the audio-sync parameter in the transcode line.

The rub of the whole thing is that I know x264 is the right encoder, I just can't get it to work dependably.

Greg
Cone that earned his stripes
Cone that earned his stripes
Posts: 316
Joined: 24 Feb 2009 00:37

Re: x264 streaming problem with VLC 1.1.5

Postby Greg » 08 Dec 2010 01:49

I am seeing similar problems, However my experience is the std 10.04 - 1.06 version usually is stable if started once only and streamed from capture in h264/flv. Any changes in parameters after the initial start often result in a crash?
Like you, tried the Lucid Bleed PPA with 1.1.4 & 1.1.5 but have not been able to resolve the audio sync issue.
So also tried Maverick std install on a fresh box 1.1.4 and Maverick Bleed 1.1.5 but the audio sync problem remained. The "Bleed" PPAs have otherwise been stable and capable for h264/flv for my use.

This may be of interest/info

http://trac.videolan.org/vlc/ticket/4315

I am open minded Re the Trac response, but given that there was no an apparent problem with audio sync in Lucid with both capture driver and alsa and the audio sync, problems started with 1.1.x PPA in Lucid and also in a std install Maverick, then ?????

https://bugs.launchpad.net/ubuntu/+sour ... bug/686248

If you are still seeing a problem with audio sync, perhaps add your comments/experience to the bug reports.

I am also looking for a reliable Ubuntu 10.04 solution I can run with for a year or two?

jimmystacks
New Cone
New Cone
Posts: 4
Joined: 09 Oct 2010 01:56

Re: x264 streaming problem with VLC 1.1.5

Postby jimmystacks » 17 Dec 2010 04:26

We've been testing different configurations of Ubuntu / VLC for x264 streaming for about 3 months, starting with 10.04 / 1.0.6

We've tried all the Ubuntu distributions after 10.04 (including 11.04 now), and different repository builds of VLC up to 1.1.5. We've also compiled from source on all VLC distributions from 1.0.6 onwards, and experimented with libavcodec-extra & ffmpeg versions (and manual compiles of each).

And as of 2 weeks ago, we've settled on one thing: x264 streaming via VLC only works reliably on Ubuntu 10.04 with VLC 1.0.6 - all other versions or combinations after that are broken so as to be pretty much unusable.

When I say "reliably" above, there are occasional memory leaks in RTP streaming, but on the whole the 10.04 / 1.0.6 out of the box combination works as it should most of the time.


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 16 guests