Having trouble muxing audio into RTSP stream
Posted: 02 Apr 2016 05:53
I'm trying to setup a Raspberry pi as a baby monitor. I have video working, but can't manage to figure out how to mux in audio from my USB microphone.
Specs:
Raspberry Pi B+
Raspberry Pi Camera Module
USB Microphone
I've tried several variations but can't seem to get a working stream.
and
What am I missing?
Thanks for your help!
Erik
Specs:
Raspberry Pi B+
Raspberry Pi Camera Module
USB Microphone
Code: Select all
# Video Working
raspivid -h 972 -w 1296 -fps 12 -br 46 -o - -t 0 | cvlc -v stream:///dev/stdin --sout '#rtp{sdp=rtsp://:8554/}' :demux=h264
Code: Select all
# alsa input-slave
raspivid -h 972 -w 1296 -fps 12 -br 46 -o - -t 0 | cvlc -v stream:///dev/stdin --sout '#rtp{sdp=rtsp://:8554/}' :demux=h264 :mux=ts --input-slave=alsa://plughw:1,0
# Output -- results in a bunch of scrolling output like this
#...
[00d32858] core input error: demux doesn't like DEMUX_GET_TIME
[00d32858] core input error: demux doesn't like DEMUX_GET_TIME
[00d32858] core input error: demux doesn't like DEMUX_GET_TIME
[00d32858] core input warning: clock gap, unexpected stream discontinuity
[00d32858] core input warning: feeding synchro with a new reference point trying to recover from clock gap
[00d32858] core input error: demux doesn't like DEMUX_GET_TIME
[00d32858] core input warning: clock gap, unexpected stream discontinuity
[00d32858] core input warning: feeding synchro with a new reference point trying to recover from clock gap
[00d32858] core input error: demux doesn't like DEMUX_GET_TIME
[00d32858] core input error: demux doesn't like DEMUX_GET_TIME
[00d32858] core input error: demux doesn't like DEMUX_GET_TIME
[00d32858] core input error: demux doesn't like DEMUX_GET_TIME
[00d32858] core input error: demux doesn't like DEMUX_GET_TIME
[00d32858] core input error: demux doesn't like DEMUX_GET_TIME
[00d32858] core input error: demux doesn't like DEMUX_GET_TIME
[00d32858] core input error: demux doesn't like DEMUX_GET_TIME
[00d32858] core input error: demux doesn't like DEMUX_GET_TIME
[00d32858] core input error: demux doesn't like DEMUX_GET_TIME
[00d32858] core input error: demux doesn't like DEMUX_GET_TIME
[00d32858] core input warning: clock gap, unexpected stream discontinuity
[00d32858] core input warning: feeding synchro with a new reference point trying to recover from clock gap
[00d32858] core input error: demux doesn't like DEMUX_GET_TIME
[00d32858] core input warning: clock gap, unexpected stream discontinuity
[00d32858] core input warning: feeding synchro with a new reference point trying to recover from clock gap
[00d32858] ^Cmmal: Aborting program
[00d32858] core input warning: clock gap, unexpected stream discontinuity
[00d32858] core input warning: feeding synchro with a new reference point trying to recover from clock gap
[00d32858] core input error: demux doesn't like DEMUX_GET_TIME
[b441a4c8] core decoder error: cannot continue streaming due to errors
Code: Select all
# the microphone device as input slave
raspivid -h 972 -w 1296 -fps 12 -br 46 -o - -t 0 | cvlc -v stream:///dev/stdin --sout '#rtp{sdp=rtsp://:8554/}' :demux=h264 --input-slave=/dev/snd/by-id/usb-C-Media_Electronics_Inc._USB_PnP_Sound_Device-00
#Output
VLC media player 2.2.0-rc2 Weatherwax (revision 2.2.0-rc1-118-g22fda39)
[009c7370] core interface error: no suitable interface module
[008566e0] core libvlc error: interface "globalhotkeys,none" initialization failed
[009c7210] dbus interface error: Failed to connect to the D-Bus session daemon: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
[009c7210] core interface error: no suitable interface module
[008566e0] core libvlc error: interface "dbus,none" initialization failed
[009c7210] dummy interface: using the dummy interface module...
[b440bb50] core access error: read error: File descriptor in bad state
[b440bb50] filesystem access error: read error: File descriptor in bad state
[b440bd18] core stream error: cannot pre fill buffer
[008699a0] core input warning: cannot create a stream_t from access
[008699a0] core input error: Invalid PCR value in ES_OUT_SET_(GROUP_)PCR !
[008699a0] core input error: ES_OUT_SET_(GROUP_)PCR is called too late (pts_delay increased to 300 ms)
[008699a0] core input error: ES_OUT_RESET_PCR called
Thanks for your help!
Erik