Having trouble muxing audio into RTSP stream

About encoding, codec settings, muxers and filter usage
erikcw
New Cone
New Cone
Posts: 2
Joined: 02 Apr 2016 05:39

Having trouble muxing audio into RTSP stream

Postby erikcw » 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

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
I've tried several variations but can't seem to get a working stream.

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
and

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
What am I missing?

Thanks for your help!

Erik

ladanz
New Cone
New Cone
Posts: 1
Joined: 15 Jul 2016 19:02

Re: Having trouble muxing audio into RTSP stream

Postby ladanz » 15 Jul 2016 19:04

Having the same issue here.

You got some results?

My last try was:
raspivid -o - -t 0 -n -w 640 -h 360 -fps 40 | cvlc -v --sout-transcode-vfilter adjust --brightness 1.4 stream:///dev/stdin :v4l2-standard=ALL :input-slave=alsa://hw:1,0 :live-caching=3000 --sout '#transcode{}:http{dst=:8556/kizi.mpg}' :demux=h264


But keep getting "core input error: demux doesn't like DEMUX_GET_TIME"

erikcw
New Cone
New Cone
Posts: 2
Joined: 02 Apr 2016 05:39

Re: Having trouble muxing audio into RTSP stream

Postby erikcw » 15 Jul 2016 21:57

I haven't had any luck. Would love a nudge in the right direction by someone who really knows VLC inside and out....

Rémi Denis-Courmont
Developer
Developer
Posts: 15268
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Having trouble muxing audio into RTSP stream

Postby Rémi Denis-Courmont » 15 Jul 2016 23:34

Input video format does not convey timestamps compatible with ALSA. Muxing is impossible.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

panic82
New Cone
New Cone
Posts: 8
Joined: 01 Sep 2016 19:15

Re: Having trouble muxing audio into RTSP stream

Postby panic82 » 01 Sep 2016 19:22

I'm having the same issue - is there anyway to make the timestamps compatible - or to use something besides Alsa with a USB mic that would allow this to work?


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 23 guests