Page 1 of 1
Problems with H.264 streaming
Posted: 08 Feb 2011 13:12
by MunEZ
Hi everyone!
I've encountered several problems with streaming h.264 video over the LAN.
The thing I am trying to accomplish is to encapsulate h.264 video directly into RTP (i.e. without using the TS container).
According to
http://www.videolan.org/streaming-features.html it is possible.
I'm using the following commands:
vlc.exe sample_video.mpg --sout "#transcode{vcodec=h264, acodec=mp3}:rtp{mux=ts, dst=192.168.1.100, port=1234}"
vlc.exe sample_video.mpg --sout "#transcode{venc=x264}:rtp{muxt=ts, dst=192.168.1.100, port=1234}"
Both of them work fine until I remove the 'mux' parameter.
An interesting fact is that, according to WireShark software, packets are sent from the source and received at the destination, but the VLC client doesn't playback the video.
Mb somebody experienced the same issue and found a way to solve it?
Looking forward to your response.
Regards,
Sergey
Re: Problems with H.264 streaming
Posted: 08 Feb 2011 18:47
by Rémi Denis-Courmont
It works with the TS mux because TS carries codec parameters inband. If you don't use TS, you need to pass a valid SDP to the client/receiver. It can't just guess the codec parameters out of the blue!
Re: Problems with H.264 streaming
Posted: 08 Feb 2011 21:28
by MunEZ
Can you please provide the correct syntax for this?
Re: Problems with H.264 streaming
Posted: 08 Feb 2011 22:22
by Rémi Denis-Courmont
No, I can't. I am not a computer and I don't know that by heart. Besides, I don't know your H.264 exact parameters.
Re: Problems with H.264 streaming
Posted: 10 Mar 2011 01:37
by F1234K
I've been trying something similar with streaming without the TS mux option. I understand you need to do the SDP handshake to make this work, but that is what hinting tracks are for isn't it?
The files I am trying to stream have all been hinted and thus contain the sdp string inside the track atoms. This works using Darwin to quicktime player, but for the love of me I cannot get the video to work with VLC without the mux option and the transcode option turned on.
All I want to do is sent to packets via RTP and have the client do the work (no transcode). The audio is fine, but no video unless I enable transcode.
If I switch to the rtp with audio/video profile then nothing works (this where I was assuming the sdp string in the hinted tracks should be used, but doesn't appear to be).
The server seems to have no issues as it starts to stream regardless of options, but the client either does nothing or just does not display the video.
Another funny thing I noticed is that when using rtp over ts without transcoding even though the video doesn't play, the player opens the video window to the correct size like it wants to play, but then the picture just stays black. So something it working, but just not all the way. I am a little lost as to what is missing to make this work.
To give you some sort of idea this is what the sdp string looks like in the container for the video stream:
sdpText = m=video 0 RTP/AVP 96
b=AS:539
a=rtpmap:96 H264/90000
a=mpeg4-esid:1
a=control:trackID=3
a=fmtp:96 profile-level-id=42C00C; packetization-mode=1; sprop-parameter-sets=Z0LADJZ0Cgz8+AoEAAAPoAAC7UI8IhGo,aN48gA==
a=framesize:96 320-180
Re: Problems with H.264 streaming
Posted: 12 Mar 2011 01:34
by flew
Here is how I stream what I believe is a 3gp compatible stream using rtsp to send the sdp info and using no mux parameter. I use test-mpeg2 to grab HD video from a firewire enabled cable box and pipe it to vlc which transodes it to h264 with the x264 codec using the baeline profile for 3gp compatability.
This works with the built in player on my N900 over wifi or 3g and also with the quicktime player on a mac. The only problem I have with this is that audio is always out of sync by 1-3 seconds. When using mux=ts, audio sync is fine but then the my N900 can't playback the video.
test-mpeg2 -r 0 | vlc - -I Dummy --sout '#transcode{vcodec=h264,venc=x264{profile=baseline},vb=500,width=400,height=240,deinterlace,scale=1,acodec=mp4a,ab=96,channels=2,samplerate=44100,audio-sync,threads=16,high-priority=1}:rtp{sdp=rtsp://:8554/stream.sdp,mp4a-latm,timeout=60}'
Re: Problems with H.264 streaming
Posted: 17 Mar 2011 00:34
by qontranami
Hi Sergey and F1234K,
I don't understand why you don't want a TS container. What are you trying to achieve eventually?
From the
streaming features page, I think you're looking at the third table (Muxer / audio and video formats matrix). If that is the case, the fact that RTP is checked for H.264 means that you are able to stream it using one of the containers on the left: TS, MP4 and MOV. I don't think it means that you can mux H.264 directly into RTP.
Re: Problems with H.264 streaming
Posted: 12 Apr 2011 14:24
by MunEZ
Hi, qontranami!
I'm currently writing a thesis about videoconference optimization. The thing I'm trying to acomplish is to provide differenet QoS levels to various types of video packets (Right now I'm studying H.264 which has 4 different frame types).
The problem with TS encapsulation is that there could be several frames encapsulated in one IP packet, so I can provide only one QoS level to it. Contorary, using encapsulation directly in RTP, I can achieve one frame per packet videoflow segmentation...
Hope you get the idea...
Re: Problems with H.264 streaming
Posted: 15 Apr 2011 07:05
by fujian
Hi Sergey,
Have you figured out a way to do this? I am also looking to do the streaming H264 over RTP as per
RFC3984(native RTP)
I'm a newbie to VLC though and would appreciate any help!
Thanks.
Re: Problems with H.264 streaming
Posted: 22 Jul 2011 23:52
by bobwolff68
I am doing work in the realm of sending H.264 video on one RTP connection (non-encapsulated) and audio on a separate RTP port. We have seen some success on the PC vlc <---> vlc but when working with Android as a client, we have not had GOOD success yet - only limited. Any updates from anyone here?
bob