Such an easy question

James jam at tigger.ws
Sat Jul 31 11:50:07 UTC 2021



> On 25 Jul 2021, at 11:58 am, James Linder via gstreamer-devel <gstreamer-devel at lists.freedesktop.org> wrote:
> 
> 
> 
>> On 24 Jul 2021, at 2:21 pm, Nirbheek Chauhan via gstreamer-devel <gstreamer-devel at lists.freedesktop.org> wrote:
>> 
>> Hi James,
>> 
>> It looks like you forgot to add a space after `false` and before the
>> `!`, which is why setting the property failed, as the error message
>> tells you.
>> 
>> Cheers,
>> Nirbheek
>> 
>> On Sat, Jul 24, 2021 at 11:30 AM James Linder via gstreamer-devel
>> <gstreamer-devel at lists.freedesktop.org> wrote:
>>> 
>>> 
>>> 
>>>> On 23 Jul 2021, at 9:08 pm, Nirbheek Chauhan <nirbheek.chauhan at gmail.com> wrote:
>>>> 
>>>> Hi James,
>>>> 
>>>> I tested this pipeline on my system with a Logitech C920, and I was
>>>> able to record 40 seconds of audio + video without issues. Note that
>>>> you need to use "gst-launch-1.0 -e" to ensure that EOS is sent on
>>>> Ctrl+C. This is the full command-line I used:
>>>> 
>>>> gst-launch-1.0 -e v4l2src device=/dev/video2 ! queue !
>>>> video/x-h264,width=1920,height=1080,framerate=30/1 ! h264parse ! queue
>>>> ! mux. pulsesrc ! audioconvert ! queue ! avenc_aac ! queue ! mux.
>>>> mpegtsmux name=mux ! filesink location='output.ts'
>>>> 
>>>> The audio dropouts might be an issue with the selected clock, so maybe
>>>> try "pulsesrc provide-clock=false" which will use the system clock.
>>>> Another possibility is that your webcam is not actually outputting
>>>> frames fast enough. This often happens in low light conditions.
>>>> 
>>>> You might also like to see the "min-upstream-latency" and "latency"
>>>> properties on mpegtsmux, in case your devices have a startup delay.
>>>> 
>>>> Cheers,
>>>> Nirbheek
>>>> 
>>>> On Fri, Jul 23, 2021 at 12:15 PM James Linder via gstreamer-devel
>>>> <gstreamer-devel at lists.freedesktop.org> wrote:
>>>>> 
>>>>> My question is so simple that I cannot believe there is no answer
>>>>> 
>>>>> I have a camera providing 1080 at 30Hz in h254
>>>>> I want to record the output together with pulse audio.
>>>>> 
>>>>> Google is fulll of tales of woe: eg
>>>>> 
>>>>> http://gstreamer-devel.966125.n4.nabble.com/How-do-you-record-audio-and-video-off-a-webcam-td4687419.html
>>>>> 
>>>>> Trying his ‘it works’ scenario found it does not work is even worse than mp4:
>>>>> 
>>>>> 
>>>>> Mine: audio cuts out in 15 sec
>>>>> 
>>>>> gst-launch-1.0 $@ v4l2src device=/dev/video2 ! queue ! video/x-h264,width=1920,height=1080,framerate=30/1 ! h264parse ! queue max-size-buffers=0 max-size-bytes=0 max-size-time=1000000000 ! mux. pulsesrc device=0 ! audioconvert ! queue ! avenc_aac ! queue ! mux. mpegtsmux name=mux ! filesink location='output.mp4'
>>>>> 
>>>>> His: audio cust out in 1 sec
>>>>> 
>>>>> gst-launch-1.0 $@ v4l2src device=/dev/video2 ! queue ! video/x-h264,width=1920,height=1080,framerate=30/1 ! h264parse ! queue max-size-buffers=0 max-size-bytes=0 max-size-time=1000000000 ! \
>>>>> mux.  pulsesrc device=alsa_input.usb-Sensoray_Co.__Inc._Sensoray_Model_2263_551645-04.analog-stereo ! audioconvert ! vorbisenc ! matroskamux name=mux ! filesink location=‘output.mkv'
>>>>> 
>>>>> Can anyone help?
>>> 
>>> I guess it is time to walk away, licking my wounds.
>>> Thanks for the help.
>>> I posted my results here: http://tigger.ws/downloads/output.ts
>>> 
>>> What may be intersting/relevant:
>>> I am using an i3 nuc. HTOP shows 4 cores (actually 2 + 2 threads) at 2-5% busy.
>>> I can record audio or video endlessly without any issue, just not together.
>>> I cannot see a reference to provide-clock=false and indeed
>>> 
>>> WARNING: erroneous pipeline: could not set property "provide-clock" in element "pulsesrc0" to "false!”
> 
> Thanks for the help, provide-clock=false definitly made a difference doubling the record time. ie 8 sec to 20 sec.
> During my fool-about I managed to select a silent source and recorded, silently, for 10 min.
> I suspect the answer is in reach, I just cannot see it.
> 
> BTW
> 
>>>> you need to use "gst-launch-1.0 -e" to ensure that EOS is sent on
>>>> Ctrl+C.
> 
> $@ means $ gst.launch -e -v
> means gstreamer inherits the flags

Since I have not made real progress my next step is to build-from-src then try debugging to see what-who
I would wecome any sage words of advice before I set out
In case anybody is interested I attach the full trace below. The errors start after 20sec or so.

Thanks
James

command line again

gst-launch-1.0 $@ v4l2src device=/dev/video2 ! queue ! video/x-h264,width=1920,height=1080,framerate=30/1 ! h264parse ! queue max-size-buffers=0 max-size-bytes=0 max-size-time=1000000000 ! mux. pulsesrc device=0 ! audioconvert ! queue ! avenc_aac ! queue ! mux. mpegtsmux name=mux ! filesink location='output.mp4'

jam at ws101:~> ./gst.sv -e -v
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-h264, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, stream-format=(string)byte-stream, alignment=(string)au, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)2:4:7:1, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/x-h264, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, stream-format=(string)byte-stream, alignment=(string)au, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)2:4:7:1, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = video/x-h264, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, stream-format=(string)byte-stream, alignment=(string)au, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)2:4:7:1, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-h264, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, stream-format=(string)byte-stream, alignment=(string)au, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)2:4:7:1, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, stream-format=(string)byte-stream, alignment=(string)au, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)2:4:7:1, interlace-mode=(string)progressive, parsed=(boolean)true
/GstPipeline:pipeline0/GstQueue:queue1.GstPad:sink: caps = video/x-h264, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, stream-format=(string)byte-stream, alignment=(string)au, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)2:4:7:1, interlace-mode=(string)progressive, parsed=(boolean)true
/GstPipeline:pipeline0/GstQueue:queue1.GstPad:src: caps = video/x-h264, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, stream-format=(string)byte-stream, alignment=(string)au, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)2:4:7:1, interlace-mode=(string)progressive, parsed=(boolean)true
/GstPipeline:pipeline0/GstQueue:queue1.GstPad:src: caps = video/x-h264, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, stream-format=(string)byte-stream, alignment=(string)au, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)2:4:7:1, interlace-mode=(string)progressive, parsed=(boolean)true
/GstPipeline:pipeline0/MpegTsMux:mux.GstPad:sink_65: caps = video/x-h264, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, stream-format=(string)byte-stream, alignment=(string)au, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)2:4:7:1, interlace-mode=(string)progressive, parsed=(boolean)true
/GstPipeline:pipeline0/GstPulseSrc:pulsesrc0: source-output-index = 5
New clock: GstPulseSrcClock
/GstPipeline:pipeline0/GstPulseSrc:pulsesrc0: actual-buffer-time = 200000
/GstPipeline:pipeline0/GstPulseSrc:pulsesrc0: actual-latency-time = 10000
Redistribute latency...
/GstPipeline:pipeline0/GstPulseSrc:pulsesrc0.GstPad:src: caps = audio/x-raw, format=(string)F32LE, layout=(string)interleaved, rate=(int)44100, channels=(int)2, channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:src: caps = audio/x-raw, format=(string)F32LE, layout=(string)interleaved, rate=(int)44100, channels=(int)2, channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/GstQueue:queue2.GstPad:sink: caps = audio/x-raw, format=(string)F32LE, layout=(string)interleaved, rate=(int)44100, channels=(int)2, channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/GstQueue:queue2.GstPad:src: caps = audio/x-raw, format=(string)F32LE, layout=(string)interleaved, rate=(int)44100, channels=(int)2, channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/GstQueue:queue2.GstPad:src: caps = audio/x-raw, format=(string)F32LE, layout=(string)interleaved, rate=(int)44100, channels=(int)2, channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/avenc_aac:avenc_aac0.GstPad:sink: caps = audio/x-raw, format=(string)F32LE, layout=(string)interleaved, rate=(int)44100, channels=(int)2, channel-mask=(bitmask)0x0000000000000003
/GstPipeline:pipeline0/GstPulseSrc:pulsesrc0: volume = 1
/GstPipeline:pipeline0/GstPulseSrc:pulsesrc0: mute = false
/GstPipeline:pipeline0/GstPulseSrc:pulsesrc0: current-device = alsa_input.usb-Sensoray_Co.__Inc._Sensoray_Model_2263_551645-04.analog-stereo
/GstPipeline:pipeline0/avenc_aac:avenc_aac0.GstPad:src: caps = audio/mpeg, channels=(int)2, rate=(int)44100, mpegversion=(int)4, stream-format=(string)raw, base-profile=(string)lc, channel-mask=(bitmask)0x0000000000000003, level=(string)2, profile=(string)lc, codec_data=(buffer)121056e500
/GstPipeline:pipeline0/GstQueue:queue3.GstPad:sink: caps = audio/mpeg, channels=(int)2, rate=(int)44100, mpegversion=(int)4, stream-format=(string)raw, base-profile=(string)lc, channel-mask=(bitmask)0x0000000000000003, level=(string)2, profile=(string)lc, codec_data=(buffer)121056e500
/GstPipeline:pipeline0/GstQueue:queue3.GstPad:src: caps = audio/mpeg, channels=(int)2, rate=(int)44100, mpegversion=(int)4, stream-format=(string)raw, base-profile=(string)lc, channel-mask=(bitmask)0x0000000000000003, level=(string)2, profile=(string)lc, codec_data=(buffer)121056e500
/GstPipeline:pipeline0/MpegTsMux:mux.GstPad:sink_66: caps = audio/mpeg, channels=(int)2, rate=(int)44100, mpegversion=(int)4, stream-format=(string)raw, base-profile=(string)lc, channel-mask=(bitmask)0x0000000000000003, level=(string)2, profile=(string)lc, codec_data=(buffer)121056e500
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, stream-format=(string)byte-stream, alignment=(string)au, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)2:4:7:1, interlace-mode=(string)progressive, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, profile=(string)high, level=(string)4
/GstPipeline:pipeline0/GstQueue:queue1.GstPad:sink: caps = video/x-h264, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, stream-format=(string)byte-stream, alignment=(string)au, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)2:4:7:1, interlace-mode=(string)progressive, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, profile=(string)high, level=(string)4
/GstPipeline:pipeline0/GstQueue:queue1.GstPad:src: caps = video/x-h264, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, stream-format=(string)byte-stream, alignment=(string)au, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)2:4:7:1, interlace-mode=(string)progressive, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, profile=(string)high, level=(string)4
/GstPipeline:pipeline0/MpegTsMux:mux.GstPad:sink_65: caps = video/x-h264, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, stream-format=(string)byte-stream, alignment=(string)au, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)2:4:7:1, interlace-mode=(string)progressive, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, profile=(string)high, level=(string)4
/GstPipeline:pipeline0/MpegTsMux:mux.GstPad:src: caps = video/mpegts, systemstream=(boolean)true, packetsize=(int)188
/GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = video/mpegts, systemstream=(boolean)true, packetsize=(int)188
/GstPipeline:pipeline0/MpegTsMux:mux.GstPad:src: caps = video/mpegts, systemstream=(boolean)true, packetsize=(int)188, streamheader=(buffer)< 47400030a600ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000b00d0001c100000001e020a2c32941, 474020308000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0002b0330001c10000e041f00c050448444d5688040ffffcfc1be041f00a050848444d56ff1b443f0fe042f0060a04656e0000f957d968 >
/GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = video/mpegts, systemstream=(boolean)true, packetsize=(int)188, streamheader=(buffer)< 47400030a600ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000b00d0001c100000001e020a2c32941, 474020308000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0002b0330001c10000e041f00c050448444d5688040ffffcfc1be041f00a050848444d56ff1b443f0fe042f0060a04656e0000f957d968 >
WARNING: from element /GstPipeline:pipeline0/GstPulseSrc:pulsesrc0: Can't record audio fast enough
Additional debug info:
gstaudiobasesrc.c(845): gst_audio_base_src_create (): /GstPipeline:pipeline0/GstPulseSrc:pulsesrc0:
Dropped 8820 samples. This is most likely because downstream can't keep up and is consuming samples too slowly.
WARNING: from element /GstPipeline:pipeline0/GstPulseSrc:pulsesrc0: Can't record audio fast enough
Additional debug info:
gstaudiobasesrc.c(845): gst_audio_base_src_create (): /GstPipeline:pipeline0/GstPulseSrc:pulsesrc0:
Dropped 8820 samples. This is most likely because downstream can't keep up and is consuming samples too slowly.
WARNING: from element /GstPipeline:pipeline0/GstPulseSrc:pulsesrc0: Can't record audio fast enough
Additional debug info:
gstaudiobasesrc.c(845): gst_audio_base_src_create (): /GstPipeline:pipeline0/GstPulseSrc:pulsesrc0:
Dropped 10143 samples. This is most likely because downstream can't keep up and is consuming samples too slowly.
WARNING: from element /GstPipeline:pipeline0/GstPulseSrc:pulsesrc0: Can't record audio fast enough
Additional debug info:
gstaudiobasesrc.c(845): gst_audio_base_src_create (): /GstPipeline:pipeline0/GstPulseSrc:pulsesrc0:
Dropped 10143 samples. This is most likely because downstream can't keep up and is consuming samples too slowly.
WARNING: from element /GstPipeline:pipeline0/GstPulseSrc:pulsesrc0: Can't record audio fast enough
Additional debug info:
gstaudiobasesrc.c(845): gst_audio_base_src_create (): /GstPipeline:pipeline0/GstPulseSrc:pulsesrc0:
Dropped 10584 samples. This is most likely because downstream can't keep up and is consuming samples too slowly.
^Chandling interrupt.
Interrupt: Stopping pipeline ...
EOS on shutdown enabled -- Forcing EOS on the pipeline
Waiting for EOS...
Got EOS from element "pipeline0".
EOS received - stopping pipeline...
Execution ended after 0:00:23.361496705
Setting pipeline to NULL ...
Freeing pipeline ...



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20210731/ee9af13e/attachment-0001.htm>


More information about the gstreamer-devel mailing list