From: bugzilla-daemon@freedesktop.org Subject: [Bug 104920] Broken hardware video encoding with vaapi/ffmpeg Date: Tue, 27 Feb 2018 19:36:20 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1855391508==" Return-path: Received: from culpepper.freedesktop.org (culpepper.freedesktop.org [IPv6:2610:10:20:722:a800:ff:fe98:4b55]) by gabe.freedesktop.org (Postfix) with ESMTP id F2A8A6E10B for ; Tue, 27 Feb 2018 19:36:19 +0000 (UTC) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1855391508== Content-Type: multipart/alternative; boundary="15197601790.57bBf2C.15940" Content-Transfer-Encoding: 7bit --15197601790.57bBf2C.15940 Date: Tue, 27 Feb 2018 19:36:19 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated https://bugs.freedesktop.org/show_bug.cgi?id=3D104920 --- Comment #3 from Luke McKee --- it's -profile v: constrained_baseline --level 3.1 or 3.0 on newer ffmpeg versions. Even with that I'm having corrupted encoding so I'll open a new ticket. As a favour can you test your hardware encoded videos with totem (it uses gstreamer) and see if they load. vlc says the first 2 frames don't work but plays, and mpv can play it fine. Hardware players also bork at the encoded content. This is the ffmeg command line I'm using... GST_DEBUG=3D3 reports this: qtdemux qtdemux.c:9719:qtdemux_parse_trak: Track shorter than 20% (2881879/24000 vs. 5834998/1000) of the stream found, assuming preview imag= e or something; skipping track ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format vaapi -ss 120 -t 120 -i a-movie.mkv -map 0:0 -map 0:1 -c:v h264_vaapi -b:v 4000k -qp 20 -bf 0 -profile:v 578 (or constrained_base= line in ffmpeg-git) -movflags +faststart -quality:v 0 -level:v 3.1 -coder:v cavlc -c:a aac -ab 128k -ar 48000 -ac 2 vaapitest.mp4 Here's the full specs on the created ffmpeg file using ffprobe: https://pastebin.com/TRVM9XiH --=20 You are receiving this mail because: You are the assignee for the bug.= --15197601790.57bBf2C.15940 Date: Tue, 27 Feb 2018 19:36:19 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated

Commen= t # 3 on bug 10492= 0 from Luke McKee
it's -profile v: constrained_baseline --level 3.1 or 3.0 on ne=
wer ffmpeg
versions.

Even with that I'm having corrupted encoding so I'll open a new ticket.

As a favour can you test your hardware encoded videos with totem (it uses
gstreamer) and see if they load. vlc says the first 2 frames don't work but
plays, and mpv can play it fine. Hardware players also bork at the encoded
content. This is the ffmeg command line I'm using...

GST_DEBUG=3D3 reports this:
qtdemux qtdemux.c:9719:qtdemux_parse_trak:<qtdemux0> Track shorter th=
an 20%
(2881879/24000 vs. 5834998/1000) of the stream found, assuming preview imag=
e or
something; skipping track

ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128
-hwaccel_output_format vaapi -ss 120 -t 120 -i a-movie.mkv -map 0:0 -map 0:1
-c:v h264_vaapi -b:v 4000k -qp 20 -bf 0 -profile:v 578 (or constrained_base=
line
in ffmpeg-git) -movflags +faststart -quality:v 0 -level:v 3.1 -coder:v cavlc
-c:a aac -ab 128k -ar 48000 -ac 2 vaapitest.mp4

Here's the full specs on the created ffmpeg file using ffprobe:

https://pastebin.com/TRVM9XiH=


You are receiving this mail because:
  • You are the assignee for the bug.
= --15197601790.57bBf2C.15940-- --===============1855391508== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============1855391508==--