[vlc-devel] [PATCH 1/1] udp: support packets dump in access_out module

Rafaël Carré funman at videolan.org
Thu Jul 11 18:18:21 CEST 2013


Le 11/07/2013 14:32, Tzu-Jung Lee a écrit :
> Hi Rafael,
> 
> Please let me elaborate the situation I have, which is the motivation
> to have the dumps for access and accees_out modules.
> 
> I'm working on a transcoding device which takes TS over UDP, transcode
> them, and streams out TS over UDP.
> 
>     ts/udp -> device -> ts/udp
> 
> Before implementing something like the vdpau, I'm trying to use two
> VLC instances to do the job for now.
> (I implemented a preliminary v4l2 output module, modified from the
> v4l2 access module)
> 
> The two VLC instances on the device:
> 
>    a) cvlc udp:// --sout #'std{access=v4l2c,mux=ts}' &
>    b) cvlc v4l2c:// --sout #'std{access=udp,dst=192.168.1.10}' &
> 
> To test this, we also runs two VLC instances on a PC, one feed the
> source stream while the other displays the transcoded result.
> 
>    c) cvlc feed.ts --sout #std{access=udp,dst=192.168.1.12}' &
>    d) vlc udp://
> 
> Currently the final display looks very blocky, and sometimes even broken.
> Our video folks insist that VLC did something to the clip so the
> device can't transcode it correctly.
> And I also did a experiment on PC:
> 
>    e) cvlc feed.ts --sout #std{access=udp,dst=127.0.0.1}' &
>    f)  udp:// --sout #std{access=file,dst=saved.ts}' &
> 
> It turns out the saved.ts already has obvious artifices.
> I notice that muxer/demuxer/udp all discard data if it think it have
> some problems such as strange time-stamps.

Yes our TS (de)muxer can be quite difficult :)

> So I'm going to add the dumps at several point in the following
> pipeline to find out at which stages the clips is still okay for our
> device.
> 
>     file_access ->demux -> mux-> udp_out   /  udp_access -> demux ->
> mux -> v4l2_out -> device -> v4l2_access -> demux -> mux -> udp_out

I think there are other ways to do that:

for file_access: nc -u 127.0.0.1 1234 < file.ts
for demux: cvlc --ts-out 127.0.0.1:1234
for mux: well you can use file or udp access out

and then monitor the udp stream with wireshark or nc ..

So this is not a bad idea but I think it is a bit redundant.

> With these feature, the intermediate dumps can be recorded for the
> existing VLC-only setup without external tools.
> 
> Hope the folks on the list also find it useful in other circumstances.
> 
> Thanks.
> 
> Roy



More information about the vlc-devel mailing list