unable to record desktop using latest gstreamer in ubuntu 22.04

cfd new newcfd at yahoo.com
Thu Jun 8 19:39:24 UTC 2023


 Sorry I messed up with decoder. vah264enc is in 1.21.1. Therefore, you may not be able to use vah264enc unless you upgrade your gstreamer. 
If you are not making product, you can upgrade Ubuntu to 23.04. Then the gstreamer version is 1.22.1.
UbuntuUpdates - Package "gstreamer1.0-plugins-bad" (lunar 23.04)

| 
| 
| 
|  |  |

 |

 |
| 
|  | 
UbuntuUpdates - Package "gstreamer1.0-plugins-bad" (lunar 23.04)


 |

 |

 |


It is very very messy to build the latest gstreamer on Ubuntu 22.04. I did it. But better to upgrade Ubuntu.

Do not mix vapostproc with vaapih264enc.vapostproc is for VA-API(new version to replace VAAPI)
Try 
to use vaapipostproc and vaapih264enc
in your case.

   Joe

    On Thursday, June 8, 2023, 03:00:47 p.m. EDT, tapas .. via gstreamer-devel <gstreamer-devel at lists.freedesktop.org> wrote:  
 
 Hi
here is the output :

iskconsandiego at iskconsandiego-zoom:~$ gst-inspect-1.0 va 
Plugin Details:
  Name                     va
  Description              VA-API codecs plugin
  Filename                 /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstva.so
  Version                  1.20.1
  License                  LGPL
  Source module            gst-plugins-bad
  Source release date      2022-03-14
  Binary package           GStreamer Bad Plugins (Ubuntu)
  Origin URL               https://launchpad.net/distros/ubuntu/+source/gst-plugins-bad1.0

  vadeinterlace: VA-API Deinterlacer
  vah264dec: VA-API H.264 Decoder
  vampeg2dec: VA-API Mpeg2 Decoder
  vapostproc: VA-API Video Postprocessor
  vavp8dec: VA-API VP8 Decoder

  5 features:
  +-- 5 elements

iskconsandiego at iskconsandiego-zoom:~$ gst-inspect-1.0 vaapi
Plugin Details:
  Name                     vaapi
  Description              VA-API based elements
  Filename                 /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvaapi.so
  Version                  1.20.1
  License                  LGPL
  Source module            gstreamer-vaapi
  Source release date      2022-03-14
  Binary package           gstreamer-vaapi
  Origin URL               https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/issues

  vaapidecodebin: VA-API Decode Bin
  vaapih264dec: VA-API H264 decoder
  vaapih264enc: VA-API H264 encoder
  vaapijpegdec: VA-API JPEG decoder
  vaapimpeg2dec: VA-API MPEG2 decoder
  vaapimpeg2enc: VA-API MPEG-2 encoder
  vaapioverlay: VA-API overlay
  vaapipostproc: VA-API video postprocessing
  vaapisink: VA-API sink
  vaapivc1dec: VA-API VC1 decoder
  vaapivp8dec: VA-API VP8 decoder

  11 features:
  +-- 11 elements

iskconsandiego at iskconsandiego-zoom:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.1 LTS
Release: 22.04
Codename: jammy
iskconsandiego at iskconsandiego-zoom:~$ 


I see vapostproc but not vah264enc 

But I see both vaapipostproc and vaapih264enc 

I also tried below which uses vapostproc and vaapih264enc . But it didn't solve my gstreamer pipeline stuck issues. 


gst-launch-1.0 ximagesrc use-damage=0 show-pointer=false ! video/x-raw,framerate=30/1 ! vapostproc ! queue ! vaapih264enc dct8x8=true cabac=true rate-control=cbr bitrate=1000 keyframe-period=30 max-bframes=1 ! queue ! flvmux name=mux ! queue ! progressreport ! queue ! rtmpsink sync=false async=true location="rtmp://xxxxx" pulsesrc do-timestamp=true device="alsa_output.pci-0000_00_1b.0.analog-stereo.monitor" ! queue ! audioconvert ! queue ! voaacenc bitrate=128000 ! queue ! mux. 


 
On Thu, 8 Jun 2023 at 10:41, cfd new <newcfd at yahoo.com> wrote:

 I am working as well on Ubuntu 22.04 and know they are available. Can you send me the output ofgst-inspect-1.0 va 

    On Thursday, June 8, 2023, 01:30:46 p.m. EDT, tapas .. via gstreamer-devel <gstreamer-devel at lists.freedesktop.org> wrote:  
 
 here is the default gstreamer version on ubuntu 22.04 


gst-inspect-1.0 --version
gst-inspect-1.0 version 1.20.3
GStreamer 1.20.3
https://launchpad.net/distros/ubuntu/+source/gstreamer1.0


 
On Thu, 8 Jun 2023 at 09:12, tapas .. <tapascst at gmail.com> wrote:


I guess va-api is replacing vaapi. 
videoconvert ==> vapostprocvaapih264enc ==>vah264enc
try it out and good luck.

That doesn't help anything. current gstreamer which comes with ubuntu 22.04 doesn't have  vapostproc/vah264enc
But I tried below and it didn't help. I see same issue of getting stuck

gst-launch-1.0 ximagesrc use-damage=0 show-pointer=false ! video/x-raw,framerate=30/1 ! queue ! vaapipostproc width=1920 height=1080 ! queue ! vaapih264enc dct8x8=true cabac=true rate-control=cbr bitrate=1000 keyframe-period=30 max-bframes=1 ! queue ! flvmux name=mux ! queue ! progressreport ! queue ! rtmpsink sync=false async=true location="rtmp://xxxxx" pulsesrc do-timestamp=true device="alsa_output.pci-0000_00_1b.0.analog-stereo.monitor" ! queue ! audioconvert ! queue ! voaacenc bitrate=128000 ! queue ! mux.

On Thu, 8 Jun 2023 at 08:27, cfd new <newcfd at yahoo.com> wrote:

 
I guess va-api is replacing vaapi. 
videoconvert ==> vapostprocvaapih264enc ==>vah264enc
try it out and good luck.
   Joe
    On Thursday, June 8, 2023, 10:46:57 a.m. EDT, tapas .. via gstreamer-devel <gstreamer-devel at lists.freedesktop.org> wrote:  
 
 I can broadcast my desktop to a rtmp server successfully using 

```
gst-launch-1.0 ximagesrc use-damage=0 show-pointer=false ! video/x-raw,framerate=30/1 ! videoconvert ! queue ! x264enc ! queue ! flvmux name=mux ! queue ! progressreport ! queue ! rtmpsink sync=false async=true location="rtmp://xxxxxx" pulsesrc do-timestamp=true device="alsa_output.pci-0000_00_1b.0.analog-stereo.monitor" ! queue ! audioconvert ! queue ! voaacenc bitrate=128000 ! queue ! mux. 
```



But If I try to do same using hw acceleration vaapi then it does not work !! 


```
gst-launch-1.0 ximagesrc use-damage=0 show-pointer=false ! video/x-raw,framerate=30/1 ! videoconvert ! queue ! vaapih264enc dct8x8=true cabac=true rate-control=cbr bitrate=1000 keyframe-period=30 max-bframes=1 ! queue ! flvmux name=mux ! queue ! progressreport ! queue ! rtmpsink sync=false async=true location="rtmp://xxxx" pulsesrc do-timestamp=true device="alsa_output.pci-0000_00_1b.0.analog-stereo.monitor" ! queue ! audioconvert ! queue ! voaacenc bitrate=128000 ! queue ! mux.
```


It is just stuck at below if i use hw acceleration: 


> letting pipeline to PAUSED ... Pipeline is live and does not need
> PREROLL ... Got context from element 'vaapiencodeh264-0':
> gst.vaapi.Display=context,
> gst.vaapi.Display=(GstVaapiDisplay)"\(GstVaapiDisplayGLX\)\
> vaapidisplayglx0"; Pipeline is PREROLLED ... Setting pipeline to
> PLAYING ... Redistribute latency... New clock: GstPulseSrcClock



  

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


More information about the gstreamer-devel mailing list