Results 1 to 10 of 13

Thread: [VDPAU] Can only get MPEG1/2 decoding to work

Hybrid View

  1. #1
    Join Date
    Oct 2013
    Posts
    12

    Default [VDPAU] Can only get MPEG1/2 decoding to work

    After arguing back and forth whether I should do it or not, today I eventually decided to drop FGLRX for good see what the FOSS drivers have to offer. I upgraded my system to Linux 3.12RC7, updated the graphics stack with Oibaf's fantastic PPA and did all the configurations necessary to get the new DPM and VDPAU support to work. It has been a great experience so far and I regret not having switched to radeon earlier. And I'd also like to thank everyone here on the forum. Your detailed posts have been of tremendous help to me

    The one thing I've been struggling with though, is getting VDPAU to work properly. I am using
    Code:
    libg3dvl-mesa
    from oibaf's PPA but VLC and mplayer will only use VDPAU with MPEG videos.

    Here are some diagnostics I did:

    Code:
    vdpauinfo
    gives me the following output:

    Code:
    $ vdpauinfo
    display: :0   screen: 0
    API version: 1
    Information string: G3DVL VDPAU Driver Shared Library version 1.0
    
    Video surface:
    
    name   width height types
    -------------------------------------------
    420    16384 16384  NV12 YV12 
    422    16384 16384  UYVY YUYV 
    444    16384 16384  Y8U8V8A8 V8U8Y8A8 
    
    Decoder capabilities:
    
    name               level macbs width height
    -------------------------------------------
    MPEG1                 0 1048576 16384 16384
    MPEG2_SIMPLE          3 1048576 16384 16384
    MPEG2_MAIN            3 1048576 16384 16384
    
    Output surface:
    
    name              width height nat types
    ----------------------------------------------------
    B8G8R8A8         16384 16384    y  NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 
    R8G8B8A8         16384 16384    y  NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 
    R10G10B10A2      16384 16384    y  NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 
    B10G10R10A2      16384 16384    y  NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 
    
    Bitmap surface:
    
    name              width height
    ------------------------------
    B8G8R8A8         16384 16384
    R8G8B8A8         16384 16384
    R10G10B10A2      16384 16384
    B10G10R10A2      16384 16384
    A8               16384 16384
    
    Video mixer:
    
    feature name                    sup
    ------------------------------------
    DEINTERLACE_TEMPORAL             -
    DEINTERLACE_TEMPORAL_SPATIAL     -
    INVERSE_TELECINE                 -
    NOISE_REDUCTION                  y
    SHARPNESS                        y
    LUMA_KEY                         -
    HIGH QUALITY SCALING - L1        -
    HIGH QUALITY SCALING - L2        -
    HIGH QUALITY SCALING - L3        -
    HIGH QUALITY SCALING - L4        -
    HIGH QUALITY SCALING - L5        -
    HIGH QUALITY SCALING - L6        -
    HIGH QUALITY SCALING - L7        -
    HIGH QUALITY SCALING - L8        -
    HIGH QUALITY SCALING - L9        -
    
    parameter name                  sup      min      max
    -----------------------------------------------------
    VIDEO_SURFACE_WIDTH              y        48    16384
    VIDEO_SURFACE_HEIGHT             y        48    16384
    CHROMA_TYPE                      y  
    LAYERS                           y         0        4
    
    attribute name                  sup      min      max
    -----------------------------------------------------
    BACKGROUND_COLOR                 y  
    CSC_MATRIX                       y  
    NOISE_REDUCTION_LEVEL            y      0.00     1.00
    SHARPNESS_LEVEL                  y     -1.00     1.00
    LUMA_KEY_MIN_LUMA                y  
    LUMA_KEY_MAX_LUMA                y
    This is the output I get with qvdpautest:

    Code:
    qvdpautest 0.5.2
    Intel(R) Core(TM) i5 CPU       M 450  @ 2.40GHz
    Unknown GPU
    
    VDPAU API version : 1
    VDPAU implementation : G3DVL VDPAU Driver Shared Library version 1.0
    
    FATAL: get_bits failed : No backend implementation could be loaded.!!
    
    MPEG DECODING (1920x1080): 146 frames/s
    MPEG DECODING (1280x720): 309 frames/s
    Profile unsupported.
    Profile unsupported.
    Profile unsupported.
    Profile unsupported.
    
    radeon: The kernel rejected CS, see dmesg for more information.
    radeon: The kernel rejected CS, see dmesg for more information.
    radeon: The kernel rejected CS, see dmesg for more information.
    radeon: The kernel rejected CS, see dmesg for more information.
    radeon: The kernel rejected CS, see dmesg for more information.
    radeon: The kernel rejected CS, see dmesg for more information.
    radeon: The kernel rejected CS, see dmesg for more information.
    radeon: The kernel rejected CS, see dmesg for more information.
    radeon: The kernel rejected CS, see dmesg for more information.
    radeon: The kernel rejected CS, see dmesg for more information.
    radeon: The kernel rejected CS, see dmesg for more information.
    radeon: The kernel rejected CS, see dmesg for more information.
    radeon: The kernel rejected CS, see dmesg for more information.
    radeon: The kernel rejected CS, see dmesg for more information.
    [...]
    Output of glxinfo.

    Some more information on my machine:

    - Ubuntu 12.04.3 LTS with Kernel 3.12RC7, precise Xorg stack and Oibaf's Mesa packages
    - AMD HD5650 Mobility Radeon
    - back on FGLRX I was able to get hardware accelerated H264 playback with
    Code:
    xvba-va-driver



    Do you guys have any idea what could be wrong here? Did I muss anything while switching to the FOSS drivers? Is there something I still need to install/configure?

    I'd really appreciate any input on this. At this point I am pretty much lost.


    P.S.: Just in case this is related: Whatever flags I set in Chrome, I can't get webgl to work. It will work fine in FF but not in Chrome/Chromium. Any idea what could be wrong?

  2. #2
    Join Date
    Jun 2013
    Posts
    48

    Default

    Do you have updated *_rlc.bin? If you don't that might be the problem...
    Download this and move it to /lib/firmware/radeon
    Make sure you have the *_uvd.bin too and move it to the same location.
    Reboot and run vdpauinfo to see if you have decoder support for other formats (h264 etc.)
    Last edited by Bushido_root; 10-28-2013 at 06:54 PM.

  3. #3
    Join Date
    Oct 2007
    Location
    Toronto-ish
    Posts
    7,281

    Default

    radeon: The kernel rejected CS, see dmesg for more information.
    Can you look in dmesg output and pick up some of the detailed "CS rejected" messages ?

    If you're missing microcode files (per previous post) you'll get some clues from dmesg about that as well.

  4. #4

    Default

    Quote Originally Posted by tiredoffglrx View Post
    Code:
    vdpauinfo
    gives me the following output:

    Code:
    $ vdpauinfo
    display: :0   screen: 0
    API version: 1
    Information string: G3DVL VDPAU Driver Shared Library version 1.0
    
    Video surface:
    
    name   width height types
    -------------------------------------------
    420    16384 16384  NV12 YV12 
    422    16384 16384  UYVY YUYV 
    444    16384 16384  Y8U8V8A8 V8U8Y8A8 
    
    Decoder capabilities:
    
    name               level macbs width height
    -------------------------------------------
    MPEG1                 0 1048576 16384 16384
    MPEG2_SIMPLE          3 1048576 16384 16384
    MPEG2_MAIN            3 1048576 16384 16384
    
    Output surface:
    
    name              width height nat types
    ----------------------------------------------------
    B8G8R8A8         16384 16384    y  NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 
    R8G8B8A8         16384 16384    y  NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 
    R10G10B10A2      16384 16384    y  NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 
    B10G10R10A2      16384 16384    y  NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 
    
    Bitmap surface:
    
    name              width height
    ------------------------------
    B8G8R8A8         16384 16384
    R8G8B8A8         16384 16384
    R10G10B10A2      16384 16384
    B10G10R10A2      16384 16384
    A8               16384 16384
    
    Video mixer:
    
    feature name                    sup
    ------------------------------------
    DEINTERLACE_TEMPORAL             -
    DEINTERLACE_TEMPORAL_SPATIAL     -
    INVERSE_TELECINE                 -
    NOISE_REDUCTION                  y
    SHARPNESS                        y
    LUMA_KEY                         -
    HIGH QUALITY SCALING - L1        -
    HIGH QUALITY SCALING - L2        -
    HIGH QUALITY SCALING - L3        -
    HIGH QUALITY SCALING - L4        -
    HIGH QUALITY SCALING - L5        -
    HIGH QUALITY SCALING - L6        -
    HIGH QUALITY SCALING - L7        -
    HIGH QUALITY SCALING - L8        -
    HIGH QUALITY SCALING - L9        -
    
    parameter name                  sup      min      max
    -----------------------------------------------------
    VIDEO_SURFACE_WIDTH              y        48    16384
    VIDEO_SURFACE_HEIGHT             y        48    16384
    CHROMA_TYPE                      y  
    LAYERS                           y         0        4
    
    attribute name                  sup      min      max
    -----------------------------------------------------
    BACKGROUND_COLOR                 y  
    CSC_MATRIX                       y  
    NOISE_REDUCTION_LEVEL            y      0.00     1.00
    SHARPNESS_LEVEL                  y     -1.00     1.00
    LUMA_KEY_MIN_LUMA                y  
    LUMA_KEY_MAX_LUMA                y
    This is the output I get with qvdpautest:

    Code:
    qvdpautest 0.5.2
    Intel(R) Core(TM) i5 CPU       M 450  @ 2.40GHz
    Unknown GPU
    
    VDPAU API version : 1
    VDPAU implementation : G3DVL VDPAU Driver Shared Library version 1.0
    
    FATAL: get_bits failed : No backend implementation could be loaded.!!
    
    MPEG DECODING (1920x1080): 146 frames/s
    MPEG DECODING (1280x720): 309 frames/s
    Profile unsupported.
    Profile unsupported.
    Profile unsupported.
    Profile unsupported.
    
    radeon: The kernel rejected CS, see dmesg for more information.
    radeon: The kernel rejected CS, see dmesg for more information.
    radeon: The kernel rejected CS, see dmesg for more information.
    radeon: The kernel rejected CS, see dmesg for more information.
    radeon: The kernel rejected CS, see dmesg for more information.
    radeon: The kernel rejected CS, see dmesg for more information.
    radeon: The kernel rejected CS, see dmesg for more information.
    radeon: The kernel rejected CS, see dmesg for more information.
    radeon: The kernel rejected CS, see dmesg for more information.
    radeon: The kernel rejected CS, see dmesg for more information.
    radeon: The kernel rejected CS, see dmesg for more information.
    radeon: The kernel rejected CS, see dmesg for more information.
    radeon: The kernel rejected CS, see dmesg for more information.
    radeon: The kernel rejected CS, see dmesg for more information.
    [...]
    Definitely soomething wrong there. The UVD implementation in your card is capable of much more.

    - back on FGLRX I was able to get hardware accelerated H264 playback with
    Code:
    xvba-va-driver
    xvba-va is a joke (as is nvidia-va BTW). The only true xvba decoding is possible with the xbmc media player's already frozen (because they are focusing on radeon/vdpau now) FernetMenta's sub-branch which didnt made it into the main version.

    Do you guys have any idea what could be wrong here? Did I muss anything while switching to the FOSS drivers? Is there something I still need to install/configure?
    Definitely something wrong. Make sure you have new libdrm, xf86-ati, and mesa is compiled with vdpau support. I have everything compiled myself and VDPAU rocks on 7560D (which is a modified 6xxx series igp).

    P.S.: Just in case this is related: Whatever flags I set in Chrome, I can't get webgl to work. It will work fine in FF but not in Chrome/Chromium. Any idea what could be wrong?
    Chrome/Chromium has some bug in the webgl implementation i guess. I never got it to work with FOSS, while Firefox and derivates (Seamonkey) work just fine with the demos on the chromeexperiments site. Chrome's accelerated GPU thread always crashes.

  5. #5
    Join Date
    Feb 2008
    Location
    Linuxland
    Posts
    4,723

    Default

    You shouldn't be using g3dvl, that's XvMC (mpeg1 and mpeg2) only. Use the vdpau state tracker.

  6. #6
    Join Date
    Dec 2007
    Posts
    2,272

    Default

    Your vdpau driver looks like it was built without UVD support or UVD failed to initialize in the kernel. Make sure you have the appropriate UVD and RLC firmware installed.

  7. #7
    Join Date
    Oct 2013
    Posts
    12

    Default

    Thank you for all the answers guys. I had some spare time so I did some more digging in accordance with your suggestions.

    -- unnecessary wall of diagnostics used to be here --


    Edit:

    Oh wow, I was just compiling a thoroughly researched answer with different information on my mesa versions, dmesg outputs, etc. when I decided to simply run vdpauinfo again. And - look at that - it works! Here's the output:

    Code:
    $ vdpauinfo
    display: :0   screen: 0
    API version: 1
    Information string: G3DVL VDPAU Driver Shared Library version 1.0
    
    Video surface:
    
    name   width height types
    -------------------------------------------
    420    16384 16384  NV12 YV12 
    422    16384 16384  UYVY YUYV 
    444    16384 16384  Y8U8V8A8 V8U8Y8A8 
    
    Decoder capabilities:
    
    name               level macbs width height
    -------------------------------------------
    MPEG1                 0  9216  2048  1152
    MPEG2_SIMPLE          3  9216  2048  1152
    MPEG2_MAIN            3  9216  2048  1152
    H264_BASELINE        41  9216  2048  1152
    H264_MAIN            41  9216  2048  1152
    H264_HIGH            41  9216  2048  1152
    VC1_SIMPLE            1  9216  2048  1152
    VC1_MAIN              2  9216  2048  1152
    VC1_ADVANCED          4  9216  2048  1152
    Why this suddenly works? I have no idea. It could be related to the update I just did but I didn't check with vdpauinfo before so it might have been a simple reboot that fixed issue.

    Anyway, thank you very much for your help!


    Edit 2:

    Sorry about all the edits but I've just tried playing back a H264 encoded video in Mplayer and I not sure about the output. Would you say this means that everything is working fine or do we still have a problem on our hands?:

    Code:
    $ mplayer ./test.mp4
    MPlayer svn r34540 (Ubuntu), built with gcc-4.6 (C) 2000-2012 MPlayer Team
    mplayer: could not connect to socket
    mplayer: No such file or directory
    Failed to open LIRC support. You will not be able to use your remote control.
    
    Playing ./test.mp4.
    libavformat version 53.21.1 (external)
    Mismatching header version 53.19.0
    libavformat file format detected.
    [lavf] stream 0: video (h264), -vid 0
    [lavf] stream 1: audio (aac), -aid 0, -alang und
    VIDEO:  [H264]  1280x720  0bpp  23.976 fps  2294.4 kbps (280.1 kbyte/s)
    Clip info:
     major_brand: mp42
     minor_version: 0
     compatible_brands: mp42mp41isomavc1
     creation_time: 2013-06-20 11:01:31
    Load subtitles in ./
    ==========================================================================
    Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
    libavcodec version 53.35.0 (external)
    Mismatching header version 53.32.2
    Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
    ==========================================================================
    ==========================================================================
    Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
    AUDIO: 48000 Hz, 2 ch, s16le, 157.4 kbit/10.25% (ratio: 19671->192000)
    Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))
    ==========================================================================
    AO: [pulse] 48000Hz 2ch s16le (2 bytes per sample)
    Starting playback...
    Unsupported PixelFormat 61
    Unsupported PixelFormat 53
    Unsupported PixelFormat 81
    Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
    VO: [vdpau] 1280x720 => 1280x720 Planar YV12 
    A:  44.1 V:  44.1 A-V:  0.000 ct: -0.001   0/  0 25%  2%  0.3% 0 0 
    
    
    MPlayer interrupted by signal 2 in module: sleep_timer
    A:  44.2 V:  44.2 A-V:  0.000 ct: -0.001   0/  0 25%  2%  0.3% 0 0 
    
    Exiting... (Quit)

    VLC output doesn't sound promising, but it's an older version:

    Code:
    vlc ./test.mp4
    VLC media player 2.0.9 Twoflower (revision 2.0.8+git20130930+r616)
    [0x22ad048] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
    
    "sni-qt/30473" WARN  01:38:23.954 void StatusNotifierItemFactory::connectToSnw() Invalid interface to SNW_SERVICE 
    libva: VA-API version 0.32.0
    libva: va_getDriverName() returns 0
    libva: Trying to open /usr/lib/x86_64-linux-gnu/dri/r600_drv_video.so
    libva: va_openDriver() returns -1
    [h264 @ 0x7ff18cc4db60] Cannot parallelize deblocking type 1, decoding such frames in sequential order
    What do you guys think?

  8. #8
    Join Date
    Jun 2013
    Posts
    48

    Default

    With mplayer you need to run vc=ffh264vdpau,ffmpeg12vdpau,ffwmv3vdpau,ffvc1vdpa u
    E.g.:

    mplayer --vo=vdpau --vc=ffh264vdpau,ffmpeg12vdpau,ffwmv3vdpau,ffvc1vdpa u /you/file/here.mkv

    In the mplayer output of the VO line you should get something like

    Code:
    VO: [vdpau] 1280x692 => 1280x692 H.264 VDPAU acceleration
    Which means you're using hardware video decoding; you can also check dmesg (dmesg | grep power)

    EDIT: I don't think VDPAU on mplayer is all that good... You might want to consider updating to mplayer2, better yet, mpv.
    Last edited by Bushido_root; 10-30-2013 at 11:48 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •