Streaming with MPEG4 works but MPEG1/2 does not
Posted: 20 Sep 2005 09:10
Hello,
I'm trying to stream video from web camera (v4l) to the netwrok using
multicast. It seems to work just fine when using mpeg4 with command:
vlc -vvv v4l:/dev/video0:norm=pal:frequency=-1 --sout
'#transcode{vcodec=mp4v}:std{access=udp,url=239.2.1.120,mux=ts}' --ttl 10
But when I run the same command with vcodec set to mpgv, a segmentation
fault occurs. I'm using Debian linux. The output of the vlc is below:
____________________________________________________________________
ollilap:/home/opalanen# vlc -vvv v4l:/dev/video0:norm=pal:frequency=-1
--sout '#transcode{vcodec=mpgv}:std{access=udp,url=239.2.1.120,mux=ts}'
--ttl 10
VLC media player 0.8.2-svn Janus
[00000001] main vlc debug: opening config file /root/.vlc/vlcrc
[00000001] main vlc warning: config file /root/.vlc/vlcrc does not exist yet
[00000001] main vlc debug: checking builtin modules
[00000001] main vlc debug: checking plugin modules
[00000001] main vlc debug: loading plugins cache file
/root/.vlc/cache/plugins-04041e.dat
[00000001] main vlc debug: recursively browsing `modules'
[00000001] main vlc debug: recursively browsing `/usr/lib/vlc'
[00000001] main vlc debug: recursively browsing `plugins'
[00000001] main vlc debug: module bank initialized, found 205 modules
[00000001] main vlc debug: opening config file /root/.vlc/vlcrc
[00000001] main vlc warning: config file /root/.vlc/vlcrc does not exist yet
[00000000] main root debug: VLC media player - version 0.8.2-svn Janus -
(c) 1996-2005 VideoLAN
[00000000] main root debug: libvlc was configured with ./configure
--mandir=/share/man --infodir=/share/info --enable-release --prefix=/usr
--disable-gnome --disable-gtk --disable-familiar --disable-fb --enable-ggi
--enable-sdl --enable-esd --disable-qt --enable-mad --enable-arts
--enable-alsa --enable-lirc --enable-a52 --enable-aa --enable-dvbpsi
--enable-xosd --enable-mozilla --disable-kde --enable-mp4 --enable-dvb
--enable-dv --disable-satellite --enable-ogg --enable-vorbis
--enable-wxwindows --with-wx-config=wxgtk-2.4-config --disable-slp
--enable-flac --disable-skins --disable-basic-skins --enable-skins2
--enable-freetype --enable-mkv --enable-v4l --enable-pvr --disable-speex
--enable-caca --enable-livedotcom --enable-libmpeg2 --enable-dts
--enable-fribidi --enable-cdio --enable-mod --enable-theora
--enable-modplug --enable-dvdnav --enable-gnutls --enable-ffmpeg
--enable-ncurses --enable-faad --with-faad-tree=extras/faad2 --enable-x264
--with-x264-tree=extras/x264 --enable-glide --enable-svgalib --enable-dvd
--without-dvdcss
[00000001] main vlc debug: translation test: code is "en_GB"
[00000001] main vlc debug: opening config file /root/.vlc/vlcrc
[00000001] main vlc warning: config file /root/.vlc/vlcrc does not exist yet
[00000001] main vlc debug: checking builtin modules
[00000001] main vlc debug: checking plugin modules
[00000001] main vlc debug: loading plugins cache file
/root/.vlc/cache/plugins-04041e.dat
[00000001] main vlc debug: recursively browsing `modules'
[00000001] main vlc debug: recursively browsing `/usr/lib/vlc'
[00000001] main vlc debug: recursively browsing `plugins'
[00000001] main vlc debug: module bank initialized, found 205 modules
[00000001] main vlc debug: opening config file /root/.vlc/vlcrc
[00000001] main vlc warning: config file /root/.vlc/vlcrc does not exist yet
[00000001] main vlc debug: CPU has capabilities 486 586 MMX MMXEXT SSE FPU
[00000001] main vlc debug: looking for memcpy module: 3 candidates
[00000010] main module debug: using memcpy module "memcpymmxext"
[00000254] main playlist debug: waiting for thread completion
[00000254] main playlist debug: thread 1086499760 (playlist) created at
priority 0 (src/playlist/playlist.c:149)
[00000255] main private debug: waiting for thread completion
[00000255] main private debug: thread 1094888368 (preparser) created at
priority 0 (src/playlist/playlist.c:171)
[00000256] main interface debug: looking for interface module: 1 candidate
[00000120] main module debug: using interface module "hotkeys"
[00000256] main interface debug: interface initialized
[00000256] main interface debug: thread 1103297456 (interface) created at
priority 0 (src/interface/interface.c:211)
[00000254] main playlist: adding playlist item
`v4l:/dev/video0:norm=pal:frequency=-1' (
v4l:/dev/video0:norm=pal:frequency=-1 )
[00000258] main interface debug: looking for interface module: 5 candidates
[00000169] main module debug: using interface module "wxwindows"
[00000258] main interface debug: interface initialized
[00000258] main interface debug: thread 1121016752 (manager) created at
priority 0 (src/interface/interface.c:196)
[00000254] main playlist debug: creating new input thread
[00000261] main input debug: waiting for thread completion
[00000262] main stream output debug: stream=`transcode'
[00000263] main private debug: looking for sout stream module: 1 candidate
[00000261] main input debug: thread 1129675696 (input) created at priority
0 (src/input/input.c:227)
[00000262] main stream output debug: stream=`std'
[00000266] main private debug: looking for sout stream module: 1 candidate
[00000266] main private debug: set sout option: sout-standard-access to udp
[00000266] main private debug: set sout option: sout-standard-url to
239.2.1.120
[00000266] main private debug: set sout option: sout-standard-mux to ts
[00000266] stream_out_standard private debug: creating `udp/ts://239.2.1.120'
[00000266] stream_out_standard private debug: extention is 120
[00000266] stream_out_standard private debug: extention -> mux=(null)
[00000266] stream_out_standard private debug: using `udp/ts://239.2.1.120'
[00000268] main private debug: looking for sout access module: 1 candidate
[00000270] main private debug: looking for network module: 2 candidates
[00000270] ipv4 private debug: socket buffer size is 0x36000 instead of
0x80000
[00000186] main module debug: using network module "ipv4"
[00000186] main module debug: unlocking module "ipv4"
[00000270] main private debug: thread 1138150320 (sout write thread)
created at priority 0 (udp.c:277)
[00000268] access_output_udp private debug: udp access output
opened(239.2.1.120:1234)
[00000237] main module debug: using sout access module "access_output_udp"
[00000266] stream_out_standard private debug: access opened
[00000272] main private debug: looking for sout mux module: 1 candidate
[00000272] mux_ts private debug: Open
[00000272] mux_ts private debug: shaping=200000 pcr=30000 dts_delay=200000
[00000272] mux_ts private debug: invalid csa ck (it must be 16 chars long)
[00000012] main module debug: using sout mux module "mux_ts"
[00000262] main stream output debug: muxer support adding stream at any time
[00000266] stream_out_standard private debug: mux opened
[00000243] main module debug: using sout stream module "stream_out_standard"
[00000263] main private debug: set sout option: sout-transcode-vcodec to mpgv
[00000263] stream_out_transcode private debug: codec video=mpgv 0x0
scaling: 1.000000 800kb/s
[00000251] main module debug: using sout stream module "stream_out_transcode"
[00000261] main input debug: `v4l:/dev/video0:norm=pal:frequency=-1' gives
access `v4l' demux `' path `/dev/video0:norm=pal:frequency=-1'
[00000261] main input debug: creating demux: access='v4l' demux=''
path='/dev/video0:norm=pal:frequency=-1'
[00000273] main demuxer debug: looking for access_demux module: 1 candidate
[00000273] v4l demuxer warning: v4l syntax has changed : 'frequency' is
now channel frequency in kHz
[00000273] v4l demuxer debug: main device=`/dev/video0'
[00000273] v4l demuxer debug: V4L device Logitech QuickCam USB 1 channels
0 audios 160 < w < 324 120 < h < 248
[00000273] v4l demuxer debug: invalid width 0
[00000273] v4l demuxer debug: invalid height 0
[00000273] v4l demuxer debug: setting channel Camera(0) 0 tuners flags=0x0
type=0x2 norm=0x808
[00000273] v4l demuxer debug: will use 324x248
[00000273] v4l demuxer debug: v4l device uses brightness: 32768
[00000273] v4l demuxer debug: v4l device uses colour: 32768
[00000273] v4l demuxer debug: v4l device uses hue: 32768
[00000273] v4l demuxer debug: v4l device uses contrast: 32768
[00000273] v4l demuxer debug: v4l device uses frame size: 160704
[00000273] v4l demuxer debug: v4l device uses chroma: I422
[00000273] v4l demuxer debug: openened adev=`/dev/dsp' stereo 44100Hz
[00000273] v4l demuxer debug: v4l grabbing started
[00000273] v4l demuxer debug: added new video es I422 324x248
[00000261] main input debug: selecting program id=0
[00000273] v4l demuxer debug: new audio es 2 channels 44100Hz
[00000059] main module debug: using access_demux module "v4l"
[00000275] main packetizer debug: looking for packetizer module: 16
candidates
[00000100] main module debug: using packetizer module "rawvideo"
[00000275] main packetizer debug: thread 1147210672 (decoder) created at
priority 0 (src/input/decoder.c:159)
[00000283] main packetizer debug: looking for packetizer module: 16
candidates
[00000196] main module debug: using packetizer module "packetizer_copy"
[00000283] main packetizer debug: thread 1156987824 (decoder) created at
priority 0 (src/input/decoder.c:159)
[00000261] main input debug: starting in synch mode
[00000261] main input debug: `v4l:/dev/video0:norm=pal:frequency=-1'
sucessfully opened
[00000262] main stream output debug: adding a new input
[00000263] stream_out_transcode private debug: creating video transcoding
from fcc=`I422' to fcc=`mpgv'
[00000304] main decoder debug: looking for decoder module: 21 candidates
[00000262] main stream output debug: adding a new input
[00000099] main module debug: using decoder module "rawvideo"
[00000305] main encoder debug: looking for encoder module: 7 candidates
[00000305] ffmpeg encoder debug: libavcodec initialized (interface 4747 )
[00000305] ffmpeg encoder debug: found encoder MPEG-2 Video
[00000106] main module debug: using encoder module "ffmpeg"
[00000106] main module debug: unlocking module "ffmpeg"
[00000263] stream_out_transcode private debug: not transcoding a stream
(fcc=`s16l')
[00000272] main private debug: adding a new input
[00000272] mux_ts private debug: adding input codec=s16l pid=68
[00000272] main private error: cannot add this stream
[00000283] main packetizer error: cannot create packetizer output
[00000305] main encoder debug: looking for encoder module: 7 candidates
[00000305] ffmpeg encoder debug: libavcodec already initialized
[00000305] ffmpeg encoder debug: found encoder MPEG-2 Video
[00000106] main module debug: using encoder module "ffmpeg"
[00000272] main private debug: adding a new input
[00000272] mux_ts private debug: adding input codec=mpgv pid=69
[00000272] mux_ts private debug: new PCR PID is 69
[00000322] main private debug: looking for video filter2 module: 2 candidates
[00000322] ffmpeg private debug: input: 324x248 I422 -> 324x248 I420
[00000322] ffmpeg private debug: libavcodec already initialized
[00000108] main module debug: using video filter2 module "ffmpeg"
Segmentation fault
____________________________________________________________________
-Olli Alanen
I'm trying to stream video from web camera (v4l) to the netwrok using
multicast. It seems to work just fine when using mpeg4 with command:
vlc -vvv v4l:/dev/video0:norm=pal:frequency=-1 --sout
'#transcode{vcodec=mp4v}:std{access=udp,url=239.2.1.120,mux=ts}' --ttl 10
But when I run the same command with vcodec set to mpgv, a segmentation
fault occurs. I'm using Debian linux. The output of the vlc is below:
____________________________________________________________________
ollilap:/home/opalanen# vlc -vvv v4l:/dev/video0:norm=pal:frequency=-1
--sout '#transcode{vcodec=mpgv}:std{access=udp,url=239.2.1.120,mux=ts}'
--ttl 10
VLC media player 0.8.2-svn Janus
[00000001] main vlc debug: opening config file /root/.vlc/vlcrc
[00000001] main vlc warning: config file /root/.vlc/vlcrc does not exist yet
[00000001] main vlc debug: checking builtin modules
[00000001] main vlc debug: checking plugin modules
[00000001] main vlc debug: loading plugins cache file
/root/.vlc/cache/plugins-04041e.dat
[00000001] main vlc debug: recursively browsing `modules'
[00000001] main vlc debug: recursively browsing `/usr/lib/vlc'
[00000001] main vlc debug: recursively browsing `plugins'
[00000001] main vlc debug: module bank initialized, found 205 modules
[00000001] main vlc debug: opening config file /root/.vlc/vlcrc
[00000001] main vlc warning: config file /root/.vlc/vlcrc does not exist yet
[00000000] main root debug: VLC media player - version 0.8.2-svn Janus -
(c) 1996-2005 VideoLAN
[00000000] main root debug: libvlc was configured with ./configure
--mandir=/share/man --infodir=/share/info --enable-release --prefix=/usr
--disable-gnome --disable-gtk --disable-familiar --disable-fb --enable-ggi
--enable-sdl --enable-esd --disable-qt --enable-mad --enable-arts
--enable-alsa --enable-lirc --enable-a52 --enable-aa --enable-dvbpsi
--enable-xosd --enable-mozilla --disable-kde --enable-mp4 --enable-dvb
--enable-dv --disable-satellite --enable-ogg --enable-vorbis
--enable-wxwindows --with-wx-config=wxgtk-2.4-config --disable-slp
--enable-flac --disable-skins --disable-basic-skins --enable-skins2
--enable-freetype --enable-mkv --enable-v4l --enable-pvr --disable-speex
--enable-caca --enable-livedotcom --enable-libmpeg2 --enable-dts
--enable-fribidi --enable-cdio --enable-mod --enable-theora
--enable-modplug --enable-dvdnav --enable-gnutls --enable-ffmpeg
--enable-ncurses --enable-faad --with-faad-tree=extras/faad2 --enable-x264
--with-x264-tree=extras/x264 --enable-glide --enable-svgalib --enable-dvd
--without-dvdcss
[00000001] main vlc debug: translation test: code is "en_GB"
[00000001] main vlc debug: opening config file /root/.vlc/vlcrc
[00000001] main vlc warning: config file /root/.vlc/vlcrc does not exist yet
[00000001] main vlc debug: checking builtin modules
[00000001] main vlc debug: checking plugin modules
[00000001] main vlc debug: loading plugins cache file
/root/.vlc/cache/plugins-04041e.dat
[00000001] main vlc debug: recursively browsing `modules'
[00000001] main vlc debug: recursively browsing `/usr/lib/vlc'
[00000001] main vlc debug: recursively browsing `plugins'
[00000001] main vlc debug: module bank initialized, found 205 modules
[00000001] main vlc debug: opening config file /root/.vlc/vlcrc
[00000001] main vlc warning: config file /root/.vlc/vlcrc does not exist yet
[00000001] main vlc debug: CPU has capabilities 486 586 MMX MMXEXT SSE FPU
[00000001] main vlc debug: looking for memcpy module: 3 candidates
[00000010] main module debug: using memcpy module "memcpymmxext"
[00000254] main playlist debug: waiting for thread completion
[00000254] main playlist debug: thread 1086499760 (playlist) created at
priority 0 (src/playlist/playlist.c:149)
[00000255] main private debug: waiting for thread completion
[00000255] main private debug: thread 1094888368 (preparser) created at
priority 0 (src/playlist/playlist.c:171)
[00000256] main interface debug: looking for interface module: 1 candidate
[00000120] main module debug: using interface module "hotkeys"
[00000256] main interface debug: interface initialized
[00000256] main interface debug: thread 1103297456 (interface) created at
priority 0 (src/interface/interface.c:211)
[00000254] main playlist: adding playlist item
`v4l:/dev/video0:norm=pal:frequency=-1' (
v4l:/dev/video0:norm=pal:frequency=-1 )
[00000258] main interface debug: looking for interface module: 5 candidates
[00000169] main module debug: using interface module "wxwindows"
[00000258] main interface debug: interface initialized
[00000258] main interface debug: thread 1121016752 (manager) created at
priority 0 (src/interface/interface.c:196)
[00000254] main playlist debug: creating new input thread
[00000261] main input debug: waiting for thread completion
[00000262] main stream output debug: stream=`transcode'
[00000263] main private debug: looking for sout stream module: 1 candidate
[00000261] main input debug: thread 1129675696 (input) created at priority
0 (src/input/input.c:227)
[00000262] main stream output debug: stream=`std'
[00000266] main private debug: looking for sout stream module: 1 candidate
[00000266] main private debug: set sout option: sout-standard-access to udp
[00000266] main private debug: set sout option: sout-standard-url to
239.2.1.120
[00000266] main private debug: set sout option: sout-standard-mux to ts
[00000266] stream_out_standard private debug: creating `udp/ts://239.2.1.120'
[00000266] stream_out_standard private debug: extention is 120
[00000266] stream_out_standard private debug: extention -> mux=(null)
[00000266] stream_out_standard private debug: using `udp/ts://239.2.1.120'
[00000268] main private debug: looking for sout access module: 1 candidate
[00000270] main private debug: looking for network module: 2 candidates
[00000270] ipv4 private debug: socket buffer size is 0x36000 instead of
0x80000
[00000186] main module debug: using network module "ipv4"
[00000186] main module debug: unlocking module "ipv4"
[00000270] main private debug: thread 1138150320 (sout write thread)
created at priority 0 (udp.c:277)
[00000268] access_output_udp private debug: udp access output
opened(239.2.1.120:1234)
[00000237] main module debug: using sout access module "access_output_udp"
[00000266] stream_out_standard private debug: access opened
[00000272] main private debug: looking for sout mux module: 1 candidate
[00000272] mux_ts private debug: Open
[00000272] mux_ts private debug: shaping=200000 pcr=30000 dts_delay=200000
[00000272] mux_ts private debug: invalid csa ck (it must be 16 chars long)
[00000012] main module debug: using sout mux module "mux_ts"
[00000262] main stream output debug: muxer support adding stream at any time
[00000266] stream_out_standard private debug: mux opened
[00000243] main module debug: using sout stream module "stream_out_standard"
[00000263] main private debug: set sout option: sout-transcode-vcodec to mpgv
[00000263] stream_out_transcode private debug: codec video=mpgv 0x0
scaling: 1.000000 800kb/s
[00000251] main module debug: using sout stream module "stream_out_transcode"
[00000261] main input debug: `v4l:/dev/video0:norm=pal:frequency=-1' gives
access `v4l' demux `' path `/dev/video0:norm=pal:frequency=-1'
[00000261] main input debug: creating demux: access='v4l' demux=''
path='/dev/video0:norm=pal:frequency=-1'
[00000273] main demuxer debug: looking for access_demux module: 1 candidate
[00000273] v4l demuxer warning: v4l syntax has changed : 'frequency' is
now channel frequency in kHz
[00000273] v4l demuxer debug: main device=`/dev/video0'
[00000273] v4l demuxer debug: V4L device Logitech QuickCam USB 1 channels
0 audios 160 < w < 324 120 < h < 248
[00000273] v4l demuxer debug: invalid width 0
[00000273] v4l demuxer debug: invalid height 0
[00000273] v4l demuxer debug: setting channel Camera(0) 0 tuners flags=0x0
type=0x2 norm=0x808
[00000273] v4l demuxer debug: will use 324x248
[00000273] v4l demuxer debug: v4l device uses brightness: 32768
[00000273] v4l demuxer debug: v4l device uses colour: 32768
[00000273] v4l demuxer debug: v4l device uses hue: 32768
[00000273] v4l demuxer debug: v4l device uses contrast: 32768
[00000273] v4l demuxer debug: v4l device uses frame size: 160704
[00000273] v4l demuxer debug: v4l device uses chroma: I422
[00000273] v4l demuxer debug: openened adev=`/dev/dsp' stereo 44100Hz
[00000273] v4l demuxer debug: v4l grabbing started
[00000273] v4l demuxer debug: added new video es I422 324x248
[00000261] main input debug: selecting program id=0
[00000273] v4l demuxer debug: new audio es 2 channels 44100Hz
[00000059] main module debug: using access_demux module "v4l"
[00000275] main packetizer debug: looking for packetizer module: 16
candidates
[00000100] main module debug: using packetizer module "rawvideo"
[00000275] main packetizer debug: thread 1147210672 (decoder) created at
priority 0 (src/input/decoder.c:159)
[00000283] main packetizer debug: looking for packetizer module: 16
candidates
[00000196] main module debug: using packetizer module "packetizer_copy"
[00000283] main packetizer debug: thread 1156987824 (decoder) created at
priority 0 (src/input/decoder.c:159)
[00000261] main input debug: starting in synch mode
[00000261] main input debug: `v4l:/dev/video0:norm=pal:frequency=-1'
sucessfully opened
[00000262] main stream output debug: adding a new input
[00000263] stream_out_transcode private debug: creating video transcoding
from fcc=`I422' to fcc=`mpgv'
[00000304] main decoder debug: looking for decoder module: 21 candidates
[00000262] main stream output debug: adding a new input
[00000099] main module debug: using decoder module "rawvideo"
[00000305] main encoder debug: looking for encoder module: 7 candidates
[00000305] ffmpeg encoder debug: libavcodec initialized (interface 4747 )
[00000305] ffmpeg encoder debug: found encoder MPEG-2 Video
[00000106] main module debug: using encoder module "ffmpeg"
[00000106] main module debug: unlocking module "ffmpeg"
[00000263] stream_out_transcode private debug: not transcoding a stream
(fcc=`s16l')
[00000272] main private debug: adding a new input
[00000272] mux_ts private debug: adding input codec=s16l pid=68
[00000272] main private error: cannot add this stream
[00000283] main packetizer error: cannot create packetizer output
[00000305] main encoder debug: looking for encoder module: 7 candidates
[00000305] ffmpeg encoder debug: libavcodec already initialized
[00000305] ffmpeg encoder debug: found encoder MPEG-2 Video
[00000106] main module debug: using encoder module "ffmpeg"
[00000272] main private debug: adding a new input
[00000272] mux_ts private debug: adding input codec=mpgv pid=69
[00000272] mux_ts private debug: new PCR PID is 69
[00000322] main private debug: looking for video filter2 module: 2 candidates
[00000322] ffmpeg private debug: input: 324x248 I422 -> 324x248 I420
[00000322] ffmpeg private debug: libavcodec already initialized
[00000108] main module debug: using video filter2 module "ffmpeg"
Segmentation fault
____________________________________________________________________
-Olli Alanen