Usage of tee to split encoder output

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Usage of tee to split encoder output

pchaurasia
Hi Folks,

1. I am looking to build this pipeline -

camera_rd --> encode --> tee t1 --> queue1 --> filesink t1. --> queue2 -->
decode --> opencv processing

2. First I am trying to accomplish -

camera_rd --> encode --> tee t1 --> queue1 --> filesink t1. --> queue2 -->
playbin --> nveglglessink

3. I have following pipeline that is not working -

ubuntu@tegra-ubuntu:~/tegra_multimedia_api/argus/samples$ gst-launch-1.0
nvcamerasrc fpsRange="30.0 30.0" ! 'video/x-raw(memory:NVMM),
width=(int)1920, height=(int)1080, format=(string)I420,
framerate=(fraction)30/1'  ! omxh265enc bitrate=3000000 ! h265parse! queue
name=queenc ! matroskamux name=mux ! tee name=t ! queue ! filesink
location=test_file.mkv async=0 t. ! queue ! playbin

WARNING: erroneous pipeline: could not link queue2 to playbin0


Any idea how to connect (last queue) queue  to playbin ?


Thanks,



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Usage of tee to split encoder output

pchaurasia
Hi Folks,

Could you someone please help ? I am not sure how to connect queue to
playing/decoding elements. I tried, individual decode elements instead of
'playbin' . However need some learning here about how to connect tee branch
to decoder elements (like demux).

gst-launch-1.0 nvcamerasrc fpsRange="30.0 30.0" !
'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080,
format=(string)I420, framerate=(fraction)30/1'  ! omxh265enc
bitrate=3000000 ! h265parse! queue name=queenc ! matroskamux name=mux !
tee name=t ! queue ! filesink location=test_file.mkv async=0 t. !
qtdemux ! queue ! omxh264dec ! nveglglessink -e
WARNING: erroneous pipeline: could not link t to qtdemux0


THis one also does not work -

ubuntu@tegra-ubuntu:~/tegra_multimedia_api/argus/samples$ gst-launch-1.0
nvcamerasrc fpsRange="30.0 30.0" ! 'video/x-raw(memory:NVMM),
width=(int)1920, height=(int)1080, format=(string)I420,
framerate=(fraction)30/1'  ! omxh265enc bitrate=3000000 ! h265parse!
queue name=queenc ! matroskamux name=mux ! tee name=t ! queue ! filesink
location=test_file.mkv async=0 t. ! qtdemux ! omxh264dec ! nveglglessink -e
WARNING: erroneous pipeline: could not link t to qtdemux0


Thanks



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Usage of tee to split encoder output

killerrats
Administrator
This post was updated on .
one question is does the mux to demux work at all? I have tried once and
never able to do that?

see if this is a success for testing.

gst-launch-1.0 -e nvcamerasrc fpsRange="30.0 30.0" ! 'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)I420, framerate=(fraction)30/1'  ! omxh265enc bitrate=3000000 ! h265parse ! queue ! matroskamux name=mux ! qtdemux ! queue ! omxh264dec ! audioconvert ! nveglglessink

--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
------------------------------
Gstreamer 1.16.2
------------------------------
Windows
Reply | Threaded
Open this post in threaded view
|

Re: Usage of tee to split encoder output

killerrats
Administrator
In reply to this post by pchaurasia
if you just want to display whats happening you could just get rid of the
demux and tee the h265parse maybe. this is just trial and error for me to so
i have never tested that.

gst-launch-1.0 -e nvcamerasrc fpsRange="30.0 30.0" !
'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080,
format=(string)I420, framerate=(fraction)30/1'  ! omxh265enc bitrate=3000000
! h265parse ! tee name= tee ! queue ! matroskamux tee. ! queue ! omxh264dec
! audioconvert ! nveglglessink



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
------------------------------
Gstreamer 1.16.2
------------------------------
Windows
Reply | Threaded
Open this post in threaded view
|

Re: Usage of tee to split encoder output

Nicolas Dufresne-5
In reply to this post by pchaurasia
Le mardi 19 septembre 2017 à 16:41 -0700, pchaurasia a écrit :

> Hi Folks,
>
> Could you someone please help ? I am not sure how to connect queue to
> playing/decoding elements. I tried, individual decode elements
> instead of
> 'playbin' . However need some learning here about how to connect tee
> branch
> to decoder elements (like demux).
>
> gst-launch-1.0 nvcamerasrc fpsRange="30.0 30.0" !
> 'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080,
> format=(string)I420, framerate=(fraction)30/1'  ! omxh265enc
> bitrate=3000000 ! h265parse! queue name=queenc ! matroskamux name=mux
> !
> tee name=t ! queue ! filesink location=test_file.mkv async=0 t. !
> qtdemux ! queue ! omxh264dec ! nveglglessink -e
> WARNING: erroneous pipeline: could not link t to qtdemux0

You are trying to link matroskamux ! qtdemux, through a tee. If you
want to demux matroska, use a matroska demuxer, a ISOMP4 demuxer won't
handle that format.

>
>
> THis one also does not work -
>
> ubuntu@tegra-ubuntu:~/tegra_multimedia_api/argus/samples$ gst-launch-
> 1.0
> nvcamerasrc fpsRange="30.0 30.0" ! 'video/x-raw(memory:NVMM),
> width=(int)1920, height=(int)1080, format=(string)I420,
> framerate=(fraction)30/1'  ! omxh265enc bitrate=3000000 ! h265parse!
> queue name=queenc ! matroskamux name=mux ! tee name=t ! queue !
> filesink
> location=test_file.mkv async=0 t. ! qtdemux ! omxh264dec !
> nveglglessink -e
> WARNING: erroneous pipeline: could not link t to qtdemux0
>
>
> Thanks
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Usage of tee to split encoder output

pchaurasia
Hi Nicolas
Thanks for your help. After fixing the cmd line per your suggestion - I
think I am almost there. Following is my command line
-

gst-launch-1.0 nvcamerasrc fpsRange="30.0 30.0" ! 'video/x-raw(memory:NVMM),
width=(int)1920, height=(int)1080, format=(string)I420,
framerate=(fraction)30/1' ! omxh265enc bitrate=3000000 ! h265parse !
matroskamux name=mux ! tee name=t ! queue ! filesink location=test_file.mkv
async=0 t. !  matroskademux name=demux.video_0  !  h265parse ! omxh265dec !
nveglglessink -e


I do see that decoder  throws two or three frames on screen after which the
pipeline seem to choke with following messages. I should mention, that I am
using nvidia specific plugins and I am asking them same question, but I
think it wouldn't hurt to ask you, as well..

Setting pipeline to PAUSED ...

Available Sensor modes :
3864 x 2174 FR=60.000000 CF=0x1009208a10 SensorModeType=4
CSIPixelBitDepth=10 DynPixelBitDepth=10
Pipeline is live and does not need PREROLL ...
Got context from element 'eglglessink0': gst.egl.EGLDisplay=context,
display=(GstEGLDisplay)NULL;

NvCameraSrc: Trying To Set Default Camera Resolution. Selected
sensorModeIndex = 0 WxH = 3864x2174 FrameRate = 60.000000 ...

Setting pipeline to PLAYING ...
New clock: GstSystemClock
Framerate set to : 30 at NvxVideoEncoderSetParameterNvMMLiteOpen : Block :
BlockType = 8
===== MSENC =====
NvMMLiteBlockCreate : Block : BlockType = 8
===== NVENC blits (mode: 1) into block linear surfaces =====
NvMMLiteOpen : Block : BlockType = 279
TVMR: NvMMLiteTVMRDecBlockOpen: 7907: NvMMLiteBlockOpen
NvMMLiteBlockCreate : Block : BlockType = 279
TVMR: cbBeginSequence: 1223: BeginSequence  1920x1088, bVPR = 0
TVMR: LowCorner Frequency = 180000
TVMR: cbBeginSequence: 1622: DecodeBuffers = 3, pnvsi->eCodec = 10, codec =
9
TVMR: cbBeginSequence: 1693: Display Resolution : (1920x1080)
TVMR: cbBeginSequence: 1694: Display Aspect Ratio : (1920x1080)
TVMR: cbBeginSequence: 1762: ColorFormat : 5
TVMR: cbBeginSequence:1776 ColorSpace = NvColorSpace_YCbCr601
TVMR: cbBeginSequence: 1904: SurfaceLayout = 3
TVMR: cbBeginSequence: 2005: NumOfSurfaces = 10, InteraceStream = 0,
InterlaceEnabled = 0, bSecure = 0, MVC = 0 Semiplanar = 1, bReinit = 1,
BitDepthForSurface = 8 LumaBitDepth = 8, ChromaBitDepth = 8, ChromaFormat =
5
TVMR: cbBeginSequence: 2007: BeginSequence  ColorPrimaries = 2,
TransferCharacteristics = 2, MatrixCoefficients = 2
Allocating new output: 1920x1088 (x 10), ThumbnailMode = 0
OPENMAX: HandleNewStreamFormat: 3464: Send OMX_EventPortSettingsChanged :
nFrameWidth = 1920, nFrameHeight = 1088
TVMR: FrameRate = 1000
TVMR: NVDEC LowCorner Freq = (576000 * 1024)
ERROR: from element
/GstPipeline:pipeline0/GstOMXH265Enc-omxh265enc:omxh265enc-omxh265enc0:
Internal data stream error.
Additional debug info:
/dvs/git/dirty/git-master_linux/external/gstreamer/gst-omx/omx/gstomxvideoenc.c(1351):
gst_omx_video_enc_loop ():
/GstPipeline:pipeline0/GstOMXH265Enc-omxh265enc:omxh265enc-omxh265enc0:
stream stopped, reason error
EOS on shutdown enabled -- waiting for EOS after Error
TVMR: NvMMLiteTVMRDecDoWork: 6768: NVMMLITE_TVMR: EOS detected
Waiting for EOS...
TVMR: TVMRBufferProcessing: 5723: Processing of EOS
TVMR: TVMRBufferProcessing: 5800: Processing of EOS Done
Got EOS from element "pipeline0".
EOS received - stopping pipeline...
Execution ended after 0:00:01.870566352
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
TVMR: TVMRFrameStatusReporting: 6369: Closing TVMR Frame Status Thread
-------------
TVMR: TVMRVPRFloorSizeSettingThread: 6179: Closing
TVMRVPRFloorSizeSettingThread -------------
TVMR: TVMRFrameDelivery: 6219: Closing TVMR Frame Delivery Thread
-------------
TVMR: NvMMLiteTVMRDecBlockClose: 8105: Done
Setting pipeline to NULL ...
Freeing pipeline ...




--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel