How do I minimize latency with H264+AAC stream-out?

About encoding, codec settings, muxers and filter usage
Ben321
Blank Cone
Blank Cone
Posts: 10
Joined: 27 Aug 2015 21:58

How do I minimize latency with H264+AAC stream-out?

Postby Ben321 » 28 Aug 2015 02:17

I have created a profile for MP4 container, with H264 video and AAC audio. I have set the bitrate on the video to 512kb/s, set the quality to "Not Used", and set the frame rate to 10fps. Scale and Frame Size have been left on automatic. For audio I have the bit rate set to 128kb/s, 2 channels, and 8000 smp/s. I don't have any audio devices selected, so I am assuming that VLC is either ignoring the audio setting for this profile, or it's inserting "dummy" audio packets with all audio waveform samples set to the value of 0 (zero). I'm streaming via HTTP and using port 8080

My problem is that when I run another copy of VLC on my computer and then connect using "http:/127.0.0.1:8080" I get a video with HUGE lag. The latency is about 7 seconds! When I wave my hand in front of my camera, the receiving instance of VLC player doesn't show this for about 7 seconds. I have manually checked all of the settings in the "advanced" section of the preferences, and made sure that any of the latency or delay settings are only on the order of at most a couple hundred milliseconds. The total delay should not exceed one second (or maybe 2 seconds in a worst case), even taking into account that each step in the transcoding, and sending the stream, might take 100 to 200 milliseconds. I've disabled anything that looks like it might be an extra step (such as the encryption step on H264 streams), and set it to send a sync for each I-frame (otherwise there might not be a sync packet in the network data for every I-frame in the video stream), in order to make sure that there are enough sync packets for the receiving instance of VLC player to quickly "lock on" to the signal. I'm not sure these steps I've taken have helped (or may have even hindered, as these are "advanced" settings, and my understanding of them is certainly far from complete).

What I need here, is somebody who's very experienced in the use of streaming out video from VLC player to tell me what is the best way to minimize latency for an HTTP stream using MP4 container, with H264 video and AAC audio (which I believe is the current industry standard for streaming video online).

Ben321
Blank Cone
Blank Cone
Posts: 10
Joined: 27 Aug 2015 21:58

Re: How do I minimize latency with H264+AAC stream-out?

Postby Ben321 » 05 Sep 2015 00:56

Anybody know how to minimize the latency with this setup? Anybody at all?

Ben321
Blank Cone
Blank Cone
Posts: 10
Joined: 27 Aug 2015 21:58

Re: How do I minimize latency with H264+AAC stream-out?

Postby Ben321 » 18 Sep 2015 07:30

Sorry to bump it again, but nobody yet has replied. Does nobody really know the answer to this question.

oldslow
New Cone
New Cone
Posts: 3
Joined: 21 Sep 2015 15:55

Re: How do I minimize latency with H264+AAC stream-out?

Postby oldslow » 21 Sep 2015 16:40

Are you using the "ultrafast" encoding profile?


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: Bing [Bot] and 7 guests