gstreamer : record a stream while playing

MaZderMind ml at mazdermind.de
Tue Feb 5 15:47:11 UTC 2019


Hi

you probably need a `queue`-Element in each branch after the tee element.

-Peter


Am 05.02.19 um 16:40 schrieb Duchassin Frederic:
> Hello all,
> 
> 
> If i want to record a stream while playing, i think that I can use this
> pipeline :
> 
> gst-launch-1.0 filesrc location=/home/sefram/TS/Samsung.ts ! queue !
> typefind ! tee name=t t. ! decodebin ! queue ! kmssink t. ! queue !
> filesink location=/home/firsttry.ts
> 
> 
> this pipeline should do this :
> 
> 
>                                              /  [ decodebin | queue |
> kmssink ]           (playing_branch)
> filesrc | queue | typefind | tee
>                                              \  [ queue | filesink ]    
>                             (recording_branch)
> 
> 
> but it doesn't work the pipeline never start :
> 
> gst-launch-1.0 filesrc location=/home/sefram/TS/Samsung.ts ! queue !
> typefind ! tee name=t t. ! decodebin ! queue ! kmssink t. ! queue !
> filesink location=/home/firsttry.ts
> Setting pipeline to PAUSED ...
> Pipeline is PREROLLING ...
> 
> ====== AIUR: 4.3.5 build on Jan 21 2019 17:47:10. ======
>         Core: BLN_MAD-MMLAYER_MPG2PARSER_04.05.16  build on Sep 14 2017
> 02:37:53
>  file: /usr/lib/imx-mm/parser/lib_mpg2_parser_arm_elinux.so.3.1
> 
> whereas if I delete the recording branch, it works correctly.
> 
> root at cl-som-imx8:~# gst-launch-1.0 filesrc
> location=/home/sefram/TS/Samsung.ts ! queue ! typefind ! tee name=t t. !
> decodebin ! queue ! kmssink t. ! queue ! filesink location=/home/firsttry.ts
> Setting pipeline to PAUSED ...
> Pipeline is PREROLLING ...
> 
> ====== AIUR: 4.3.5 build on Jan 21 2019 17:47:10. ======
>         Core: BLN_MAD-MMLAYER_MPG2PARSER_04.05.16  build on Sep 14 2017
> 02:37:53
>  file: /usr/lib/imx-mm/parser/lib_mpg2_parser_arm_elinux.so.3.1
> ^Chandling interrupt.
> Interrupt: Stopping pipeline ...
> ERROR: pipeline doesn't want to preroll.
> Setting pipeline to NULL ...
> Freeing pipeline ...
> root at cl-som-imx8:~# gst-launch-1.0 filesrc
> location=/home/sefram/TS/Samsung.ts ! queue ! typefind ! tee name=t t. !
> decodebin ! queue ! kmssink
> Setting pipeline to PAUSED ...
> Pipeline is PREROLLING ...
> 
> ====== AIUR: 4.3.5 build on Jan 21 2019 17:47:10. ======
>         Core: BLN_MAD-MMLAYER_MPG2PARSER_04.05.16  build on Sep 14 2017
> 02:37:53
>  file: /usr/lib/imx-mm/parser/lib_mpg2_parser_arm_elinux.so.3.1
> ------------------------
>     Track 00 [video_0] Enabled
>         Duration: 0:01:58.601811000
>         Language: und
>     Mime:
>         video/x-h265, parsed=(boolean)true, alignment=(string)au,
> stream-format=(string)byte-stream, width=(int)3840, height=(int)2160,
> framerate=(fraction)30/1
> ------------------------
> ------------------------
>     Track 01 [audio_0] Enabled
>         Duration: 0:01:58.528000000
>         Language: und
>     Mime:
>         audio/mpeg, mpegversion=(int)4, channels=(int)2,
> rate=(int)48000, bitrate=(int)192000
> ------------------------
> ====== VPUDEC: 4.3.5 build on Jan 21 2019 17:47:26. ======
>         wrapper: 3.0.0 (VPUWRAPPER_ARM64_LINUX Build on Jan 21 2019
> 17:02:05)
>         vpulib: 1.1.1
>         firmware: 1.1.1.65535
> 
> ====== BEEP: 4.3.5 build on Jan 21 2019 17:47:16. ======
>         Core: AAC decoder Wrapper  build on Dec  7 2017 18:13:51
>  file: /us[ 1437.616914] alloc_contig_range: 42 callbacks suppressed
> r/lib/imx-mm/audio-codec/wrap/lib[ 1437.616918] alloc_contig_range:
> [5eb00, 5f9d5) PFNs busy
> _aacd_wrap_arm_elinux.so.3
>  1437.631555] alloc_contig_range: [5ec00, 5fad5) PFNs busy
> 3mCODEC: BLN_MAD-MMCODECS_AACD_AR[ 1437.639743] alloc_contig_range:
> [5ec00, 5fbd5) PFNs busy
> M_03.09.00_ARMV8  build on Sep 20[ 1437.648085] alloc_contig_range:
> [5ec00, 5fcd5) PFNs busy
>  2017 15:02:50.
> [ 1437.656130] alloc_contig_range: [5ec00, 5fdd5) PFNs busy
> [ 1437.662854] alloc_contig_range: [5f000, 5fed5) PFNs busy
> [ 1437.668731] alloc_contig_range: [5f000, 5ffd5) PFNs busy
> [ 1437.674615] alloc_contig_range: [5f000, 600d5) PFNs busy
> [ 1437.681140] alloc_contig_range: [5f000, 601d5) PFNs busy
> [ 1437.687145] alloc_contig_range: [5f000, 602d5) PFNs busy
> Pipeline is PREROLLED ...
> Setting pipeline to PLAYING ...
> New clock: GstSystemClock
> 
> If someone has an idea about the problem...
> 
> 
> Thanks
> 
> 
> Frederic
> 
> 
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> 


More information about the gstreamer-devel mailing list