Streaming from DV cam by UDP or RTP -- lost packets

*nix specific usage questions
evgen
New Cone
New Cone
Posts: 4
Joined: 05 Apr 2007 19:07

Streaming from DV cam by UDP or RTP -- lost packets

Postby evgen » 05 Apr 2007 19:57

Hello everybody!

I'm trying to stream video from DV-camera attached to one computer to another computer that shows captured video stream. When I used HTTP-streaming (1st computer is server, 2nd one is client) the second computer shows stream perfect -- with continious sound and stable picture.

BUT, when I use UDP or RTP-streaming in unicast mode resulting stream on the second computer looks very corrupted with lot of MPEG artifacts and delays in sound. Log (on 2nd) says that there'are many lost UDP packets, but both computers are in the same network and connected to one network switch. Moreover, I tried to connect computers directly using straight ethernet chord and result was the same. I tried different codecs and muxers but the result is same -- second computer shows corrupted stream.

Did anybody has the same problem? Or maybe somebody knows a solution to this? How can I produce stable stream from one VLC to another using unicast (UDP or RTP)?

I think there can be something with Linux network parameters, somewhere in /proc but it is only my suggestion...

Both computers running OpenSuse Linux 10.2, VLC compiled from sources tarball downloaded from site (0.8.6a) with following config options:

Code: Select all

./configure --enable-dv --with-wx-config=wx-config-2.8 --enable-dvbpsi --enable-release
I start VLC on transmitting (1st) computer using this command line:

Code: Select all

vlc -vvv dv/rawdv:///dev/raw1394 --dv-caching 10000 --ttl 3 :sout='#transcode{vcodec=mp2v,vb=128,scale=1,acodec=mp3,ab=16,channels=2,deinterlace}:duplicate{dst=std{access=udp,mux=ts,dst=10.0.5.42:20000}}'
(10.0.5.42 is IP-address of the second computer)

...and on receiving (2nd) using this one:

Code: Select all

vlc -vvvv udp://@:20000
And finally the log from receiving (2nd) computer:

Code: Select all

VLC media player 0.8.6a Janus [00000001] main private debug: checking builtin modules [00000001] main private debug: checking plugin modules [00000001] main private debug: loading plugins cache file /home/dave/.vlc/cache/plugins-04041e.dat [00000001] main private debug: recursively browsing `modules' [00000001] main private debug: recursively browsing `/usr/local/lib/vlc' [00000001] main private debug: recursively browsing `plugins' [00000001] main private debug: module bank initialized, found 204 modules [00000001] main private debug: opening config file /home/dave/.vlc/vlcrc [00000001] main private debug: CPU has capabilities 486 586 MMX MMXEXT SSE SSE2 FPU [00000001] main private debug: looking for memcpy module: 3 candidates [00000001] main private debug: using memcpy module "memcpymmxext" [00000261] main playlist debug: waiting for thread completion [00000261] main playlist debug: thread 3082615696 (playlist) created at priority 0 (playlist/playlist.c:184) [00000262] main private debug: waiting for thread completion [00000262] main private debug: thread 3074222992 (preparser) created at priority 0 (playlist/playlist.c:210) [00000263] main interface debug: looking for interface module: 1 candidate [00000263] main interface debug: using interface module "hotkeys" [00000263] main interface debug: thread 3065830288 (interface) created at priority 0 (interface/interface.c:231) [00000265] main interface debug: looking for interface module: 1 candidate [00000265] main interface debug: using interface module "screensaver" [00000265] main interface debug: thread 3057437584 (interface) created at priority 0 (interface/interface.c:231) [00000261] main playlist debug: adding playlist item `rtp://@:20000' ( rtp://@:20000 ) [00000267] main interface debug: looking for interface module: 3 candidates [00000267] main interface debug: using interface module "wxwidgets" [00000267] main interface debug: thread 3028106128 (manager) created at priority 0 (interface/interface.c:216) [00000267] wxwidgets interface debug: Using last windows config '(-1,0,0,1280,1024)(0,513,153,720,655)(6,0,0,-1,150)' [00000267] wxwidgets interface debug: id=0 p=(513,153) s=(720,655) [00000267] wxwidgets interface debug: id=6 p=(0,0) s=(-1,150) [00000261] main playlist debug: nothing requested, starting [00000261] main playlist debug: creating new input thread [00000270] main input debug: waiting for thread completion [00000270] main input debug: thread 3011541904 (input) created at priority 0 (input/input.c:265) [00000270] main input debug: creating statistics handler [00000270] main input debug: `rtp://@:20000' gives access `rtp' demux `' path `@:20000' [00000270] main input debug: creating demux: access='rtp' demux='' path='@:20000' [00000272] main demuxer debug: looking for access_demux module: 0 candidates [00000272] main demuxer warning: no access_demux module matched "rtp" [00000270] main input debug: creating access 'rtp' path='@:20000' [00000273] main access debug: looking for access2 module: 6 candidates [00000273] access_udp access debug: opening server=:0 local=:20000 [00000273] main access debug: net: connecting to '[]:0@[]:20000' [00000273] main access debug: looking for network module: 1 candidate [00000273] ipv6 access warning: cannot create socket (Address family not supported by protocol) [00000273] main access debug: using network module "ipv6" [00000273] main access debug: removing module "ipv6" [00000273] main access debug: looking for network module: 1 candidate [00000273] ipv4 access debug: resolving :20000... [00000273] ipv4 access debug: resolving :0... [00000273] main access debug: using network module "ipv4" [00000273] main access debug: removing module "ipv4" [00000273] main access debug: using access2 module "access_udp" [00000277] main private debug: pre buffering [00000273] access_udp access debug: detected TS over raw UDP [00000270] main input debug: creating demux: access='rtp' demux='' path='@:20000' [00000278] main demuxer debug: looking for demux2 module: 42 candidates [00000278] main demuxer debug: using demux2 module "ts" [00000278] ts demuxer debug: DEMUX_SET_GROUP 0 (nil) [00000273] access_udp access warning: unimplemented query in control [00000270] main input debug: `rtp://@:20000' successfully opened [00000278] ts demuxer debug: PATCallBack called [00000278] ts demuxer debug: new PAT ts_id=60509 version=18 current_next=1 [00000278] ts demuxer debug: * number=1 pid=66 [00000278] ts demuxer debug: PMTCallBack called [00000278] ts demuxer debug: new PMT program number=1 version=4 pid_pcr=68 [00000278] ts demuxer debug: * es pid=68 type=2 fcc=mpgv [00000270] main input debug: selecting program id=1 [00000307] main decoder debug: looking for decoder module: 19 candidates [00000307] main decoder debug: using decoder module "libmpeg2" [00000307] main decoder debug: thread 2999286672 (decoder) created at priority 0 (input/decoder.c:159) [00000278] ts demuxer debug: * es pid=69 type=3 fcc=mpga [00000311] main decoder debug: looking for decoder module: 19 candidates [00000311] main decoder debug: using decoder module "mpeg_audio" [00000311] main decoder debug: thread 2988440464 (decoder) created at priority 0 (input/decoder.c:159) [00000307] libmpeg2 decoder debug: 720x576 (display 720,576), aspect 540000, sar 1:1, 25.000 fps [00000307] main decoder debug: no usable vout present, spawning one [00000318] main video output debug: window size: 720x576 [00000318] main video output debug: looking for video output module: 6 candidates [00000311] mpeg_audio decoder debug: MPGA channels:2 samplerate:48000 bitrate:32 [00000311] main decoder debug: no aout present, spawning one [00000321] main audio output debug: looking for audio output module: 4 candidates [00000318] xvideo video output debug: adaptor 0, port 73, format 0x32315659 (YV12) planar [00000321] alsa audio output debug: opening ALSA device `default' [00000321] main audio output debug: thread 2979830672 (aout) created at priority 0 (alsa.c:662) [00000321] main audio output debug: using audio output module "alsa" [00000321] main audio output debug: output 'fl32' 48000 Hz Stereo frame=1 samples/8 bytes [00000321] main audio output debug: mixer 'fl32' 48000 Hz Stereo frame=1 samples/8 bytes [00000321] main audio output debug: no need for any filter [00000321] main audio output debug: looking for audio mixer module: 3 candidates [00000321] main audio output debug: using audio mixer module "trivial_mixer" [00000321] main audio output debug: input 'mpga' 48000 Hz Stereo frame=1152 samples/969 bytes [00000321] main audio output debug: filter(s) 'mpga'->'fl32' 48000 Hz->48000 Hz Stereo->Stereo [00000324] main private debug: looking for audio filter module: 24 candidates [00000319] main private debug: Registering subpicture channel, ID: 2 [00000319] main private debug: Registering subpicture channel, ID: 3 [00000319] main private debug: Registering subpicture channel, ID: 4 [00000319] main private debug: Registering subpicture channel, ID: 5 [00000324] main private debug: using audio filter module "mpgatofixed32" [00000321] main audio output debug: found a filter for the whole conversion [00000321] main audio output debug: filter(s) 'fl32'->'fl32' 52800 Hz->48000 Hz Stereo->Stereo [00000327] main private debug: looking for audio filter module: 24 candidates [00000327] main private debug: using audio filter module "bandlimited_resampler" [00000321] main audio output debug: found a filter for the whole conversion [00000318] xvideo video output debug: Window manager supports NetWM [00000318] xvideo video output debug: Window manager supports _NET_WM_STATE_FULLSCREEN [00000318] xvideo video output debug: Window manager supports _NET_WM_STATE_ABOVE [00000318] xvideo video output debug: Window manager supports _NET_WM_STATE_BELOW [00000318] xvideo video output debug: Window manager supports _NET_WM_STATE_STAYS_ON_TOP [00000318] main video output debug: using video output module "xvideo" [00000318] main video output debug: waiting for thread completion [00000318] main video output debug: got 8 direct buffer(s) [00000318] main video output debug: picture in 720x576 (0,0,720x576), chroma I420, ar 5:4, sar 1:1 [00000318] main video output debug: picture user 720x576 (0,0,720x576), chroma I420, ar 5:4, sar 1:1 [00000318] main video output debug: picture out 720x576 (0,0,720x576), chroma I420, ar 5:4, sar 1:1 [00000318] main video output debug: direct render, mapping render pictures 0-6 to system pictures 1-7 [00000318] main video output debug: thread 2971003792 (video output) created at priority 0 (video_output/video_output.c:421) [00000333] main private warning: vout synchro warning: pts != current_date (-241797) [00000318] main video output warning: late picture skipped (36538) [00000318] main video output warning: late picture skipped (12477) [00000321] main audio output warning: buffer is 42823 in advance, triggering downsampling [00000318] main video output warning: late picture skipped (20065) [00000321] main audio output warning: timing screwed, stopping resampling [00000321] main audio output warning: buffer is 65841 in advance, triggering downsampling [00000318] main video output warning: late picture skipped (2083) [00000318] main video output warning: late picture skipped (14331) [00000321] main audio output warning: timing screwed, stopping resampling [00000321] main audio output warning: buffer is 110062 in advance, triggering downsampling [00000321] main audio output warning: audio drift is too big (-132211), clearing out [00000321] main audio output warning: timing screwed, stopping resampling [00000321] main audio output warning: mixer start isn't output start (-7359) [00000321] main audio output warning: audio drift is too big (-132045), clearing out [00000321] main audio output debug: audio output is starving (180411), playing silence [00000318] main video output warning: late picture skipped (11528) [00000321] alsa audio output debug: recovered from buffer underrun [00000318] main video output warning: late picture skipped (4988) [00000278] ts demuxer warning: discontinuity received 0xd instead of 0xf (pid=68) [00000278] ts demuxer warning: discontinuity received 0xf instead of 0x4 (pid=68) [00000278] ts demuxer warning: discontinuity received 0x2 instead of 0x6 (pid=68) [00000278] ts demuxer warning: discontinuity received 0x3 instead of 0x0 (pid=69) [00000278] ts demuxer warning: discontinuity received 0x9 instead of 0x5 (pid=69) [00000278] ts demuxer warning: discontinuity received 0xf instead of 0x7 (pid=68) [00000321] main audio output warning: buffer is 90489 in advance, triggering downsampling libdvbpsi error (PSI decoder): TS discontinuity (received 10, expected 9) for PID 0 [00000278] ts demuxer debug: PATCallBack called libdvbpsi error (PSI decoder): TS discontinuity (received 10, expected 9) for PID 66 [00000278] ts demuxer debug: PMTCallBack called [00000278] ts demuxer warning: discontinuity received 0x3 instead of 0xf (pid=68) [00000321] main audio output warning: audio drift is too big (-187358), clearing out [00000321] main audio output warning: timing screwed, stopping resampling [00000321] main audio output warning: mixer start isn't output start (-1992) [00000333] main private warning: vout synchro warning: pts != current_date (-40677) [00000321] main audio output warning: audio drift is too big (-187192), clearing out [00000321] main audio output debug: audio output is starving (229978), playing silence [00000278] ts demuxer warning: discontinuity received 0xe instead of 0xa (pid=68) [00000278] ts demuxer warning: discontinuity received 0x3 instead of 0x5 (pid=68) [00000278] ts demuxer warning: discontinuity received 0x5 instead of 0x3 (pid=69) [00000333] main private warning: vout synchro warning: pts != current_date (-119767) [00000278] ts demuxer warning: discontinuity received 0x0 instead of 0x9 (pid=68) [00000278] ts demuxer warning: discontinuity received 0xb instead of 0x6 (pid=69) [00000321] main audio output warning: buffer is 47800 in advance, triggering downsampling libdvbpsi error (PSI decoder): TS discontinuity (received 12, expected 11) for PID 0 [00000278] ts demuxer debug: PATCallBack called libdvbpsi error (PSI decoder): TS discontinuity (received 12, expected 11) for PID 66 [00000278] ts demuxer debug: PMTCallBack called [00000321] alsa audio output debug: recovered from buffer underrun [00000278] ts demuxer warning: discontinuity received 0x2 instead of 0x1 (pid=68) [00000333] main private warning: vout synchro warning: pts != current_date (-40000) [00000333] main private warning: vout synchro warning: pts != current_date (-119500) [00000321] main audio output warning: audio drift is too big (-168746), clearing out [00000321] main audio output warning: timing screwed, stopping resampling [00000321] main audio output warning: mixer start isn't output start (-1992) [00000278] ts demuxer warning: discontinuity received 0xe instead of 0x9 (pid=68) [00000278] ts demuxer warning: discontinuity received 0x8 instead of 0x4 (pid=69) [00000321] main audio output warning: audio drift is too big (-168580), clearing out [00000278] ts demuxer warning: discontinuity received 0x9 instead of 0x4 (pid=68) [00000278] ts demuxer warning: discontinuity received 0x2 instead of 0xe (pid=68) [00000278] ts demuxer warning: discontinuity received 0xc instead of 0x9 (pid=69) [00000333] main private warning: vout synchro warning: pts != current_date (-119244) [00000321] main audio output warning: buffer is 95533 in advance, triggering downsampling [00000333] main private warning: vout synchro warning: pts != current_date (-40878) [00000321] main audio output warning: audio drift is too big (-167801), clearing out [00000321] main audio output warning: timing screwed, stopping resampling [00000321] main audio output warning: mixer start isn't output start (-968) [00000321] main audio output warning: audio drift is too big (-167635), clearing out [00000278] ts demuxer warning: discontinuity received 0x4 instead of 0x0 (pid=68) [00000278] ts demuxer warning: discontinuity received 0xf instead of 0xb (pid=68) [00000278] ts demuxer warning: discontinuity received 0x4 instead of 0x6 (pid=68) [00000278] ts demuxer warning: discontinuity received 0xd instead of 0xb (pid=69) [00000278] ts demuxer warning: discontinuity received 0x0 instead of 0x9 (pid=68) [00000278] ts demuxer warning: discontinuity received 0x4 instead of 0xf (pid=69) [00000321] main audio output warning: buffer is 49356 in advance, triggering downsampling libdvbpsi error (PSI decoder): TS discontinuity (received 1, expected 0) for PID 0 [00000278] ts demuxer debug: PATCallBack called libdvbpsi error (PSI decoder): TS discontinuity (received 1, expected 0) for PID 66 [00000278] ts demuxer debug: PMTCallBack called [00000278] ts demuxer warning: discontinuity received 0x3 instead of 0x1 (pid=68) [00000321] main audio output warning: audio drift is too big (-170468), clearing out [00000321] main audio output warning: timing screwed, stopping resampling [00000321] main audio output warning: mixer start isn't output start (-8136) [00000321] main audio output warning: audio drift is too big (-169169), clearing out [00000321] main audio output debug: audio output is starving (223561), playing silence [00000278] ts demuxer warning: discontinuity received 0xf instead of 0xa (pid=68) [00000278] ts demuxer warning: discontinuity received 0x0 instead of 0xd (pid=69) [00000278] ts demuxer warning: discontinuity received 0xa instead of 0x5 (pid=68) [00000318] main video output warning: late picture skipped (27229) [00000333] main private warning: vout synchro warning: pts != current_date (-79833) [00000278] ts demuxer warning: discontinuity received 0x4 instead of 0x3 (pid=69) [00000278] ts demuxer warning: discontinuity received 0x3 instead of 0xf (pid=68) libdvbpsi error (PSI decoder): TS discontinuity (received 3, expected 2) for PID 0 [00000278] ts demuxer debug: PATCallBack called libdvbpsi error (PSI decoder): TS discontinuity (received 3, expected 2) for PID 66 [00000278] ts demuxer debug: PMTCallBack called [00000321] main audio output warning: buffer is 72978 in advance, triggering downsampling [00000321] alsa audio output debug: recovered from buffer underrun [00000333] main private warning: vout synchro warning: pts != current_date (-80000) [00000321] mpgatofixed32 audio output debug: libmad error: Huffman data overrun [00000333] main private warning: vout synchro warning: pts != current_date (-80144) [00000278] ts demuxer warning: discontinuity received 0xe instead of 0x0 (pid=68) [00000278] ts demuxer warning: discontinuity received 0x9 instead of 0x5 (pid=68) [00000278] ts demuxer warning: discontinuity received 0x4 instead of 0x0 (pid=68) [00000278] ts demuxer warning: discontinuity received 0x6 instead of 0x4 (pid=69) [00000278] ts demuxer warning: discontinuity received 0x0 instead of 0x9 (pid=68) [00000278] ts demuxer warning: discontinuity received 0xd instead of 0x8 (pid=69) [00000321] main audio output warning: audio drift is too big (-146692), clearing out [00000321] main audio output warning: timing screwed, stopping resampling [00000321] main audio output warning: mixer start isn't output start (-3088) [00000321] main audio output warning: audio drift is too big (-146525), clearing out signal 2 received, terminating vlc - do it again in case it gets stuck [00000321] main audio output debug: audio output is starving (166792), playing silence libdvbpsi error (PSI decoder): TS discontinuity (received 6, expected 5) for PID 0 [00000278] ts demuxer debug: PATCallBack called libdvbpsi error (PSI decoder): TS discontinuity (received 6, expected 5) for PID 66 [00000278] ts demuxer debug: PMTCallBack called [00000278] ts demuxer warning: discontinuity received 0xd instead of 0x1 (pid=68) [00000321] main audio output warning: audio drift is too big (-121067), clearing out [00000321] main audio output warning: mixer start isn't output start (-47513) [00000001] main private debug: removing all interfaces [00000267] main interface debug: thread 3028106128 joined (interface/interface.c:258) [00000267] main interface debug: removing module "wxwidgets" [00000321] mpgatofixed32 audio output debug: libmad error: Huffman data overrun [00000333] main private warning: vout synchro warning: pts != current_date (-41044) [00000278] ts demuxer warning: discontinuity received 0x9 instead of 0x4 (pid=68) [00000278] ts demuxer warning: discontinuity received 0x8 instead of 0x6 (pid=69) [00000333] main private warning: vout synchro warning: pts != current_date (-119889) [00000278] ts demuxer warning: discontinuity received 0x4 instead of 0xf (pid=68) [00000265] main interface debug: thread 3057437584 joined (interface/interface.c:258) [00000265] main interface debug: removing module "screensaver" [00000278] ts demuxer warning: discontinuity received 0x2 instead of 0xb (pid=68) [00000278] ts demuxer warning: discontinuity received 0xe instead of 0x9 (pid=69) [00000263] main interface debug: thread 3065830288 joined (interface/interface.c:258) [00000263] main interface debug: removing module "hotkeys" [00000001] main private debug: removing playlist handler [00000321] alsa audio output debug: recovered from buffer underrun [00000262] main private debug: thread 3074222992 joined (playlist/playlist.c:247) [00000321] main audio output warning: buffer is 47911 in advance, triggering downsampling [00000318] main video output warning: late picture skipped (91382) [00000318] main video output warning: late picture skipped (51462) [00000333] main private warning: vout synchro warning: pts != current_date (-81089) [00000333] main private warning: vout synchro warning: pts != current_date (-81111) [00000321] main audio output warning: audio drift is too big (-169168), clearing out [00000321] main audio output warning: timing screwed, stopping resampling [00000321] mpgatofixed32 audio output debug: libmad error: Huffman data overrun [00000321] main audio output warning: mixer start isn't output start (-1992) [00000321] main audio output warning: audio drift is too big (-169002), clearing out
Help me solve this problem, please!

evgen
New Cone
New Cone
Posts: 4
Joined: 05 Apr 2007 19:07

Postby evgen » 06 Apr 2007 11:17

Partially solved. The problem was as I thought at transport level. When I changed network card packet loses dissapear. But the sound remains unstable -- with interrupts. Is this a codec problems?

sjensen
Blank Cone
Blank Cone
Posts: 36
Joined: 14 Jul 2006 20:18

Postby sjensen » 11 Apr 2007 15:07

Bump for you... I'm trying ot just get a capture from my fw cam into vlc so I can stream it via darwin...


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 9 guests