[vlc] stdin from file versus program?

Ulrik Pagh Schultz ups at daimi.au.dk
Wed May 14 14:16:59 CEST 2003


  hi,

I'm trying to use vlc to display an mpeg-2 stream coming from a
firewire camera (a fancy one that doesn't produce DV output, but
mpeg-2).

Basically, direct piping to stdin doesn't work, putting it in a file
first and then reading it through stdin does work.  Using 'cat' to
pipe the file doesn't work either.

In more details:

I have a program 'isodump' that dumps the data to stdout.

If I use isodump to dump some amount of data into a file 'isodump.ts',
and then use vlc to view it as a file from stdin, that works fine:

[ups at bahrain mpeg2_content]$ vlc file:/dev/stdin < isodump1.ts 
VideoLAN Client 0.5.3 Natalya
[00000141] main input: playlist item `file:/dev/stdin'
[00000141] main input: EOF reached
[00000141] access_file input: closing `file/:///dev/stdin'
[ups at bahrain mpeg2_content]$ 

The video is shown on screen.  I can also stream the video to another
vlc client using udp (which is what I'm really interested in, but it
appears to not work in the same way as when displaying it locally).

However, if I try to directly pipe the output of isodump to vlc or
even if I just try using cat to pipe the file, as follows:

[ups at bahrain mpeg2_content]$ cat isodump1.ts | vlc file:/dev/stdin
VideoLAN Client 0.5.3 Natalya
[00000141] main input: playlist item `file:/dev/stdin'
Segmentation fault

...then it doesn't work.

Examining the detailed output that is produced when using vlc to
stream the video doesn't produce any significant differences in these
two scenarios during the initialization, but then at some point lots
of errors messages appear in the second scenario:

[00000147] packetizer_mpegaudio decoder debug: v:0 l:1 channels:2 samplerate:48000 bitrate:256 size:768
[00000141] mpeg_system input warning: garbage at input (3e)
[00000141] mpeg_system input warning: garbage at input (29)
[00000141] mpeg_system input warning: garbage at input (9)
[00000141] mpeg_system input warning: packet lost by TS demux for PID 2064: current 4, packet 6
[00000141] mpeg_system input warning: garbage at input (0)
[00000141] mpeg_system input warning: garbage at input (d2)
[00000141] mpeg_system input warning: garbage at input (d)
[00000141] mpeg_system input warning: garbage at input (37)
[00000141] mpeg_system input warning: garbage at input (59)
[00000141] mpeg_system input warning: garbage at input (e3)
[00000141] mpeg_system input warning: garbage at input (ca)
[00000141] mpeg_system input warning: packet lost by TS demux for PID 2064: current 2, packet 4
[00000141] mpeg_system input warning: garbage at input (3)
[00000141] mpeg_system input warning: garbage at input (f6)

and eventually a segmentation fault occurs.

Any ideas or hints as to what might be wrong or what I could do to
remedy the situation would be most welcome!

 Sincerely,
  Ulrik P. Schultz

-- 
+-------------------------------------------------------+
| Ulrik P. Schultz    <URL:http://www.daimi.au.dk/~ups> |
|   Assistant Prof. at DAIMI, Univ. of Aarhus, Denmark  |
+-------------------------------------------------------+
-- 
This is the vlc mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://www.videolan.org/support/lists.html
If you are in trouble, please contact <postmaster at videolan.org>



More information about the vlc mailing list