harware decoding gstreamer Udoo Ultra

Discussion in 'UDOO X86' started by maxbond, Jul 11, 2017.

  1. maxbond

    maxbond New Member

    Joined:
    Jul 10, 2017
    Messages:
    2
    Likes Received:
    0
    Hello everyone , I'm currently on a Udoo ultra with ubuntu trusty 14.04 installed on it .
    I saw there was a encoder and decoder for h264 format on the board . I wanted to stream the camera (a common c920 logitech for example),which has an output in h264, and decode it using gstreamer with hardware decoder.
    I saw that i need to install vaapi plugins for gstreamer to work that way
    https://stackoverflow.com/questions...erated-video-encoding-of-gstreamer-on-android
    but I didn't find a proper way to install it on my configuration , And didnt find any clue if it will work at all .
    I started by trying installing libva to work with vaapi from source.
    Configuration is ok, make and make install too .
    But when i want to run command " sudo vainfo" to check everything is correct i get :
    Code:
    error: XDG_RUNTIME_DIR not set in the environment.
    error: can't connect to X server!
    libva info: VA-API version 0.35.0
    libva info: va_getDriverName() returns 0
    libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
    libva info: Found init function __vaDriverInit_0_35
    libva error: /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so init failed
    libva info: va_openDriver() returns -1
    vaInitialize failed with error code -1 (unknown libva error),exit
    
    Is the proccesor currently supported by vaapi ? if not,
    Is vaapi the correct plugins I need to install to work with HW encoder/decoder ?
    Does anybody have advices/tutorials on that ?
    thank you for your answers !
     
    Last edited: Jul 11, 2017
  2. maxbond

    maxbond New Member

    Joined:
    Jul 10, 2017
    Messages:
    2
    Likes Received:
    0
    I tried to install gstreamer1.0-vaapi after libav installated like i said before , when i try using the command :
    Code:
    gst-launch-1.0 v4l2src device=/dev/video0 ! tee name=t ! queue  ! video/x-h264,framerate=30/1,width=1920,height=1080 ! h264parse ! mp4mux ! fakesink -e t. ! queue ! vaapidecode ! videoscale ! videorate ! video/x-raw,framerate=30/1,width=720,height=480 ! jpegenc ! jpegparse ! rtpjpegpay ! udpsink host=192.158.1.18 port=5000
    
    so in trying using vaapidecode i get :
    Code:
    libva info: VA-API version 0.40.0
    libva info: va_getDriverName() returns 1
    libva error: va_getDriverName() failed with operation failed,driver_name=i965
    libva info: VA-API version 0.40.0
    libva info: va_getDriverName() returns 1
    libva error: va_getDriverName() failed with operation failed,driver_name=i965
    libva info: VA-API version 0.40.0
    libva info: va_getDriverName() returns 1
    libva error: va_getDriverName() failed with operation failed,driver_name=i965
    libva info: VA-API version 0.40.0
    libva info: va_getDriverName() returns 1
    libva error: va_getDriverName() failed with operation failed,driver_name=i965
    WARNING: erroneous pipeline: could not link queue1 to vaapidecode0
    
    seems like libav cannot access the driver of the HW decoder . any ideas ?
     
  3. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
  4. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
    When I run sudo vainfo on Ubuntu 16.04 with updated drivers I get:
    Code:
    error: XDG_RUNTIME_DIR not set in the environment.
    libva info: VA-API version 0.39.2
    libva info: va_getDriverName() returns 0
    libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
    libva info: Found init function __vaDriverInit_0_39
    libva info: va_openDriver() returns 0
    vainfo: VA-API version: 0.39 (libva 1.7.1)
    vainfo: Driver version: Intel i965 driver for Intel(R) CherryView - 1.7.1
    vainfo: Supported profile and entrypoints
          VAProfileMPEG2Simple            :    VAEntrypointVLD
          VAProfileMPEG2Simple            :    VAEntrypointEncSlice
          VAProfileMPEG2Main              :    VAEntrypointVLD
          VAProfileMPEG2Main              :    VAEntrypointEncSlice
          VAProfileH264ConstrainedBaseline:    VAEntrypointVLD
          VAProfileH264ConstrainedBaseline:    VAEntrypointEncSlice
          VAProfileH264Main               :    VAEntrypointVLD
          VAProfileH264Main               :    VAEntrypointEncSlice
          VAProfileH264High               :    VAEntrypointVLD
          VAProfileH264High               :    VAEntrypointEncSlice
          VAProfileH264MultiviewHigh      :    VAEntrypointVLD
          VAProfileH264MultiviewHigh      :    VAEntrypointEncSlice
          VAProfileH264StereoHigh         :    VAEntrypointVLD
          VAProfileH264StereoHigh         :    VAEntrypointEncSlice
          VAProfileVC1Simple              :    VAEntrypointVLD
          VAProfileVC1Main                :    VAEntrypointVLD
          VAProfileVC1Advanced            :    VAEntrypointVLD
          VAProfileNone                   :    VAEntrypointVideoProc
          VAProfileJPEGBaseline           :    VAEntrypointVLD
          VAProfileJPEGBaseline           :    VAEntrypointEncPicture
          VAProfileVP8Version0_3          :    VAEntrypointVLD
          VAProfileVP8Version0_3          :    VAEntrypointEncSlice
          VAProfileHEVCMain               :    VAEntrypointVLD
    
     

Share This Page