Mp4 to H264 streaming issue

About encoding, codec settings, muxers and filter usage
redfield
New Cone
New Cone
Posts: 3
Joined: 22 Sep 2011 17:42

Mp4 to H264 streaming issue

Postby redfield » 28 Sep 2011 18:32

Hello all -

I have a test I'm trying to perform using command-line VLC that I'm befuddled by - I've scoured this site and others looking for a solution but I've found nothing so far. Here is my issue (FYI, I posted an issue similar to this last week, but due to my lack of knowledge it was vague and I was making several bad assumptions, so I'm creating a new topic now that I know exactly what I need to do). I need to:

1. Take a screen capture, encode it into mp4, and send it along to a multicast IP address, like so:

Code: Select all

start vlc screen:// screen-fps=15 :file-caching=0 --screen-width=640 --screen-height=480 --screen-top=0 --screen-left=0 :sout=#transcode{vcodec=mp4v,vb=3500}:duplicate{dst=rtp{dst=239.1.1.1,mux=ts,port=7100}} :sout-all :sout-keep
2. From the multicast address, which is being received on an installation of VLC residing on a Redhat 6 server, it is re-encoded into H.264, then sent to another address (the re-encoding is necessary as an initial encode into H.264 will not work for the purposes of this test):

Code: Select all

cvlc rtp://@239.1.1.1:7100 :sout=#transcode{venc=x264,vcodec=h264,scale=0.5}:duplicate{dst=rtp{dst=239.2.1.1,mux=ts,port=7100}} :sout-all :sout-keep
3. Finally, I receive the stream in the address specified in #2 and display it:

Code: Select all

vlc -vvv rtp://239.2.1.1:7100 :sout=#duplicate{dst=rtp{dst=display} :sout-all :sout-keep
My problem is when the initial encoded mp4 stream reaches the VLC instance on the Redhat server machine, it chokes while creating the output stream. I've googled the errors I'm getting in an attempt to figure out exactly what's going on, but I'm not having any luck. This is what VLC's debug looks like:

Code: Select all

VLC media player 1.1.11 The Luggage (revision exported) [0x1231120] main libvlc debug: VLC media player - 1.1.11 The Luggage [0x1231120] main libvlc debug: Copyright © 1996-2011 the VideoLAN team [0x1231120] main libvlc debug: revision exported [0x1231120] main libvlc debug: configured with ./configure '--build=x86_64-unknown-linux-gnu' '--host=x86_64-unknown-linux-gnu' '--target=x86_64-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--disable-dependency-tracking' '--disable-rpath' '--disable-nls' '--disable-mozilla' '--disable-static' '--enable-aa' '--enable-alsa' '--enable-caca' '--enable-dirac' '--enable-dvbpsi' '--enable-dvdread' '--enable-faad' '--enable-fbosd' '--enable-ffmpeg' '--with-ffmpeg-a52' '--with-ffmpeg-faac' '--with-ffmpeg-mp3lame' '--enable-libamr-nb' '--enable-libamr-wb' '--with-ffmpeg-ogg' '--with-ffmpeg-theora' '--with-ffmpeg-vorbis' '--with--ffmpeg-zlib' '--enable-flac' '--enable-gnomevfs' '--enable-live555' '--enable-mozilla' '--enable-ncurses' '--enable-opencv' '--enable-portaudio' '--enable-pulse' '--enable-pvr' '--enable-real' '--enable-realrtsp' '--enable-shout' '--enable-snapshot' '--enable-svg' '--enable-svgalib' '--enable-switcher' '--enable-theora' '--enable-twolame' '--enable-upnp' '--enable-v4l' 'build_alias=x86_64-unknown-linux-gnu' 'host_alias=x86_64-unknown-linux-gnu' 'target_alias=x86_64-redhat-linux-gnu' 'CFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' 'LDFLAGS=-L/usr/X11R6/lib64' 'CXXFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' 'PKG_CONFIG_PATH=/usr/lib64/pkgconfig:/usr/share/pkgconfig' [0x1231120] main libvlc debug: translation test: code is "C" [0x1231120] main libvlc debug: checking plugin modules [0x1231120] main libvlc debug: loading plugins cache file /usr/lib64/vlc/plugins/plugins-04081e-7e8.dat [0x1231120] main libvlc warning: cannot read /usr/lib64/vlc/plugins/plugins-04081e-7e8.dat (No such file or directory) [0x1231120] main libvlc debug: recursively browsing `/usr/lib64/vlc/plugins' libdc1394 error: Failed to initialize libdc1394 [0x1231120] main libvlc debug: saving plugins cache /usr/lib64/vlc/plugins/plugins-04081e-7e8.dat [0x1231120] main libvlc debug: module bank initialized (407 modules) [0x1231120] main libvlc debug: opening config file (/home/ssuser/.config/vlc/vlcrc) [0x1231120] main libvlc debug: CPU has capabilities MMX MMXEXT SSE SSE2 SSE3 SSSE3 SSE4.1 FPU [0x1231120] main libvlc debug: looking for memcpy module: 3 candidates [0x1231120] main libvlc debug: using memcpy module "memcpymmxext" [0x12605f0] main input debug: Creating an input for 'Media Library' [0x12605f0] main input debug: Input is a meta file: disabling unneeded options [0x12605f0] main input debug: using timeshift granularity of 50 MiB [0x12605f0] main input debug: using timeshift path '/tmp' [0x12605f0] main input debug: `file/xspf-open:///home/ssuser/.local/share/vlc/ml.xspf' gives access `file' demux `xspf-open' path `/home/ssuser/.local/share/vlc/ml.xspf' [0x12605f0] main input debug: creating demux: access='file' demux='xspf-open' path='/home/ssuser/.local/share/vlc/ml.xspf' [0x12a2f00] main demux debug: looking for access_demux module: 2 candidates [0x12a2f00] main demux debug: no access_demux module matching "file" could be loaded [0x12a2f00] main demux debug: TIMER module_need() : 0.167 ms - Total 0.167 ms / 1 intvls (Avg 0.167 ms) [0x12605f0] main input debug: creating access 'file' path='/home/ssuser/.local/share/vlc/ml.xspf' [0x12a2eb0] main access debug: looking for access module: 2 candidates [0x12a2eb0] filesystem access debug: opening file `/home/ssuser/.local/share/vlc/ml.xspf' [0x12a2eb0] main access debug: using access module "filesystem" [0x12a2eb0] main access debug: TIMER module_need() : 0.124 ms - Total 0.124 ms / 1 intvls (Avg 0.124 ms) [0x12a3280] main stream debug: Using AStream*Stream [0x12a3280] main stream debug: pre buffering [0x12a3280] main stream debug: received first data after 0 ms [0x12a3280] main stream debug: pre-buffering done 296 bytes in 0s - 1741 KiB/s [0x12a3520] main stream debug: looking for stream_filter module: 5 candidates [0x12a3520] main stream debug: no stream_filter module matching "any" could be loaded [0x12a3520] main stream debug: TIMER module_need() : 0.070 ms - Total 0.070 ms / 1 intvls (Avg 0.070 ms) [0x12a3520] main stream debug: looking for stream_filter module: 1 candidate [0x12a3520] main stream debug: using stream_filter module "stream_filter_record" [0x12a3520] main stream debug: TIMER module_need() : 0.050 ms - Total 0.050 ms / 1 intvls (Avg 0.050 ms) [0x12605f0] main input debug: creating demux: access='file' demux='xspf-open' path='/home/ssuser/.local/share/vlc/ml.xspf' [0x12a3750] main demux debug: looking for demux module: 1 candidate [0x12a3750] playlist demux debug: using XSPF playlist reader [0x12a3750] main demux debug: using demux module "playlist" [0x12a3750] main demux debug: TIMER module_need() : 0.077 ms - Total 0.077 ms / 1 intvls (Avg 0.077 ms) [0x12a39d0] main demux meta debug: looking for meta reader module: 2 candidates [0x12a39d0] lua demux meta debug: Trying Lua scripts in /home/ssuser/.local/share/vlc/lua/meta/reader [0x12a39d0] lua demux meta debug: Trying Lua scripts in /usr/lib64/vlc/lua/meta/reader [0x12a39d0] lua demux meta debug: Trying Lua playlist script /usr/lib64/vlc/lua/meta/reader/filename.luac [0x12a39d0] lua demux meta debug: Trying Lua scripts in /usr/share/vlc/lua/meta/reader [0x12a39d0] main demux meta debug: no meta reader module matching "any" could be loaded [0x12a39d0] main demux meta debug: TIMER module_need() : 0.749 ms - Total 0.749 ms / 1 intvls (Avg 0.749 ms) [0x12605f0] main input debug: `file/xspf-open:///home/ssuser/.local/share/vlc/ml.xspf' successfully opened [0x14c45a0] main xml debug: looking for xml module: 2 candidates [0x14c45a0] main xml debug: using xml module "xml" [0x14c45a0] main xml debug: TIMER module_need() : 0.230 ms - Total 0.230 ms / 1 intvls (Avg 0.230 ms) [0x12a3750] playlist demux debug: parsed 0 tracks successfully [0x14c45a0] main xml debug: removing module "xml" [0x12605f0] main input debug: EOF reached [0x12a3750] main demux debug: removing module "playlist" [0x12a3520] main stream debug: removing module "stream_filter_record" [0x12a2eb0] main access debug: removing module "filesystem" [0x12605f0] main input debug: TIMER input launching for 'Media Library' : 2.016 ms - Total 2.016 ms / 1 intvls (Avg 2.016 ms) [0x12a2570] main interface debug: looking for interface module: 1 candidate [0x12a2570] main interface debug: using interface module "hotkeys" [0x12a2570] main interface debug: TIMER module_need() : 0.109 ms - Total 0.109 ms / 1 intvls (Avg 0.109 ms) [0x1261390] main interface debug: looking for interface module: 1 candidate Blocked: call to unsetenv("DBUS_ACTIVATION_ADDRESS") Blocked: call to unsetenv("DBUS_ACTIVATION_BUS_TYPE") [0x1261390] inhibit interface error: Failed to connect to the D-Bus session daemon: /bin/dbus-launch terminated abnormally with the following error: Autolaunch error: X11 initialization failed. [0x1261390] main interface debug: no interface module matching "inhibit,none" could be loaded [0x1261390] main interface debug: TIMER module_need() : 2030.154 ms - Total 2030.154 ms / 1 intvls (Avg 2030.154 ms) [0x1261390] main interface error: no suitable interface module [0x125e280] main playlist debug: Activated [0x125e280] main playlist debug: adding item `rtp://239.1.1.1:7100' ( rtp://@239.1.1.1:7100 ) [0x129ffb0] main interface debug: looking for interface module: 1 candidate [0x129ffb0] main interface debug: using interface module "signals" [0x129ffb0] main interface debug: TIMER module_need() : 3.277 ms - Total 3.277 ms / 1 intvls (Avg 3.277 ms) [0x12a16f0] main interface debug: looking for interface module: 1 candidate [0x125e280] main playlist debug: rebuilding array of current - root Playlist [0x125e280] main playlist debug: rebuild done - 1 items, index -1 [0x12a16f0] main interface debug: no interface module matching "globalhotkeys,none" could be loaded [0x12a16f0] main interface debug: TIMER module_need() : 2041.077 ms - Total 2041.077 ms / 1 intvls (Avg 2041.077 ms) [0x12a16f0] main interface error: no suitable interface module [0x1231120] main libvlc error: interface "globalhotkeys,none" initialization failed [0x12a16f0] main interface debug: looking for interface module: 1 candidate [0x12a16f0] dummy interface: using the dummy interface module... [0x12a16f0] main interface debug: using interface module "dummy" [0x12a16f0] main interface debug: TIMER module_need() : 0.348 ms - Total 0.348 ms / 1 intvls (Avg 0.348 ms) [0x125e280] main playlist debug: processing request item null node Playlist skip 0 [0x125e280] main playlist debug: starting new item [0x125e280] main playlist debug: creating new input thread [0x7f32ac000d10] main input debug: Creating an input for 'rtp://239.1.1.1:7100' [0x7f32ac000d10] main input debug: thread (input) created at priority 10 (input/input.c:220) [0x7f32ac000d10] main input debug: thread started [0x7f32a4000f10] main stream output debug: using sout chain=`transcodescale=0.5:duplicate{dst=rtpport=7100}' [0x7f32a4000f10] main stream output debug: stream=`duplicate' [0x7f32a40012a0] main stream out debug: looking for sout stream module: 1 candidate [0x7f32a40012a0] stream_out_duplicate stream out debug: creating 'duplicate' [0x7f32a40012a0] stream_out_duplicate stream out debug: * adding `rtpport=7100' [0x7f32a4000f10] main stream output debug: stream=`rtpport=7100' [0x7f32a40015b0] main stream out debug: looking for sout stream module: 0 candidates [0x7f32a40015b0] main stream out debug: no sout stream module matched "rtpport=7100" [0x7f32a40015b0] main stream out debug: TIMER module_need() : 0.071 ms - Total 0.071 ms / 1 intvls (Avg 0.071 ms) [0x7f32a40015b0] main stream out debug: destroying chain... (name=(null)) [0x7f32a40015b0] main stream out debug: destroying chain done [0x7f32a40012a0] stream_out_duplicate stream out error: no destination given [0x7f32a40012a0] main stream out debug: no sout stream module matching "duplicate" could be loaded [0x7f32a40012a0] main stream out debug: TIMER module_need() : 0.213 ms - Total 0.213 ms / 1 intvls (Avg 0.213 ms) [0x7f32a40012a0] main stream out debug: destroying chain... (name=(null)) [0x7f32a40012a0] main stream out debug: destroying chain done [0x7f32a4000f10] main stream output error: stream chain failed for `transcodescale=0.5:duplicate{dst=rtpport=7100}' [0x125e280] main playlist debug: finished input [0x7f32ac000d10] main input error: cannot start stream output instance, aborting [0x125e280] main playlist debug: dead input [0x7f32ac000d10] main input debug: thread ended [0x7f32ac000d10] main input debug: TIMER input launching for 'rtp://239.1.1.1:7100' : 2.210 ms - Total 2.210 ms / 1 intvls (Avg 2.210 ms) [0x125e280] main playlist debug: changing item without a request (current 0/1) [0x125e280] main playlist debug: nothing to play
Thanks for any and all help you can provide.

keithb1
New Cone
New Cone
Posts: 5
Joined: 26 Sep 2011 18:26

Re: Mp4 to H264 streaming issue

Postby keithb1 » 01 Oct 2011 13:47

Code: Select all

vlc -vvv rtp://239.2.1.1:7100 :sout=#duplicate{dst=rtp{dst=display} :sout-all :sout-keep
There is a missing } in the command


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 3 guests