Streaming .mkv via RTP - audio, but no video

About encoding, codec settings, muxers and filter usage
nicol@s
New Cone
New Cone
Posts: 6
Joined: 24 Oct 2011 08:55

Streaming .mkv via RTP - audio, but no video

Postby nicol@s » 01 Nov 2011 10:07

Hello.
There is a problem - I have only audio, but no video while streaming .mkv by rtp.
There are no any problems with streaming .avi, .mpeg4 and others. But there is a problem with streaming .mkv.
I have tried different versions of VLC. Now I`m using VLC version 1.1.0 (because I have tried to stream .mkv from Windows client with this version and I have got a good result). I tried VLC versions 1.1.12, 1.2.0 (before setup 1.1.0 version on my server).

The server is Debian.
uname - a

Code: Select all

Linux video 2.6.32-5-amd64 #1 SMP Mon Oct 3 03:59:20 UTC 2011 x86_64 GNU/Linux
I start stream with this command on the server:

Code: Select all

cvlc -vvv /home/vlc/formula.mkv --sout '#transcode{vcodec=h264,vb=3000,fps=25,scale=1,acodec=mp4a,ab=128,channels=2,samplerate=48000,width=704,height=576}:rtp{sdp=rtsp://10.1.2.79:8554/stream}'
There are no errors in the log, only some warnings. The same warnings are present when I`m trying to stream .avi, mpeg4... I think this warnings are not critical (they belongs to X11).
On the client machine I start VLC with:

Code: Select all

rtsp://10.1.2.79:8554/stream
...and have audio, but no video.

vlc -l

Code: Select all

VLC media player 1.1.0 packetizer_mpeg4video packetizer_h264 packetizer_mpeg4audio x264 ..........
ffmpeg --h

Code: Select all

ffmpeg version 0.7.6, Copyright (c) 2000-2011 the FFmpeg developers built on Oct 21 2011 19:01:56 with gcc 4.4.5 configuration: --enable-shared --enable-nonfree --enable-gpl --enable-libx264 --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libgsm libavutil 50. 43. 0 / 50. 43. 0 libavcodec 52.122. 0 / 52.122. 0 libavformat 52.110. 0 / 52.110. 0 libavdevice 52. 5. 0 / 52. 5. 0 libavfilter 1. 80. 0 / 1. 80. 0 libswscale 0. 14. 1 / 0. 14. 1 libpostproc 51. 2. 0 / 51. 2. 0
I have found a lot of topics in videolan forum with the same problem, but havent`t found any solution.

Does anyone solved this problem??
Thanks for any help!

nicol@s
New Cone
New Cone
Posts: 6
Joined: 24 Oct 2011 08:55

Re: Streaming .mkv via RTP - audio, but no video

Postby nicol@s » 03 Nov 2011 08:11

I decided to separate a goal into to parts - transcoding mkv into ts on the server and streaming ts. The command for transcoding is:

Code: Select all

cvlc -vvv /home/vlc/formula.mkv --sout '#transcode{vcodec=h264,vb=300,fps=25,scale=1,acodec=mp4a,ab=128,channels=2,samplerate=44100,width=704,height=576}:std{mux=ts,access=file,dst=/home/vlc/formula.ts}'
After transcoding I copied the .ts file in my computer (Ubuntu) and opened this file with vlc - there is only audio!! The problem is in transcoding, not in streaming.

Help me to correct transcode .mkv!

nicol@s
New Cone
New Cone
Posts: 6
Joined: 24 Oct 2011 08:55

Re: Streaming .mkv via RTP - audio, but no video

Postby nicol@s » 10 Nov 2011 12:32

It is very strange - the same command but for other films gives the next results:
1. mkv with video codec H.264/AVC and audio codec AC-3 - video, no audio
2. mkv with video codec H264 and audio codec MPEG-4 AAC audio - audio, but no video...

nicol@s
New Cone
New Cone
Posts: 6
Joined: 24 Oct 2011 08:55

Re: Streaming .mkv via RTP - audio, but no video

Postby nicol@s » 15 Nov 2011 07:04

With this command I can transcode any .mkv files to .ts with good results:

Code: Select all

ffmpeg -y -threads 2 -i /tmp/input.mkv -ab 128k -b 3500k -r 25 -maxrate 8000k -bufsize 3000k -vcodec libx264 -s 4cif -acodec aac -strict experimental -map 0:0 -map 0:1 /tmp/output.ts
But when I streaming output.ts with live555mediaServer there are small lags in the slow scenes... I don`t understant why... If I playing output.ts local - there are no such lags....
When I streaming output.ts with VLC - there are such lags...
I am very sad, because there are many views in my topic and no one answers....

TypX
Developer
Developer
Posts: 290
Joined: 21 Oct 2011 15:59

Re: Streaming .mkv via RTP - audio, but no video

Postby TypX » 15 Nov 2011 09:41

Well since you already add -vv you could paste the logs

nicol@s
New Cone
New Cone
Posts: 6
Joined: 24 Oct 2011 08:55

Re: Streaming .mkv via RTP - audio, but no video

Postby nicol@s » 16 Nov 2011 07:05

I find the solution. Maybe it`s not beautyfull, but it is working solution.
1. Transcode mkv to ts with ffmpeg (use nitstream filter):

Code: Select all

ffmpeg -y -threads 3 -i /home/vlc/zlo.mkv -ab 128k -b 3500k -r 25 -maxrate 10000k -bufsize 2000k -vcodec copy -vbsf h264_mp4toannexb -s 4cif -acodec copy -strict experimental -map 0:0 -map 0:1 /home/vlc/live/mediaServer/111.ts
2. Transcode audio stream to aac (because my device can understand only AAC):

Code: Select all

cvlc -vvv /home/vlc/live/mediaServer/111.ts :sout=#transcode{acodec=aac}:file{dst=/home/vlc/live/mediaServer/output.ts}
3. Streaming via live555

Code: Select all

live555mediaServer -p 18554


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 5 guests