[Bug 110394] Skylake GPU HANG while gstreamer H264 vaapi encoding from MJPEG vaapi decode on drm-tip
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Mon Apr 15 20:48:57 UTC 2019
https://bugs.freedesktop.org/show_bug.cgi?id=110394
--- Comment #31 from Andy Nicholas <andy.nicholas at shield.ai> ---
(In reply to Andy Nicholas from comment #30)
> Created attachment 143979 [details]
> MJPEG - hand-carry video camera outside my house
>
> Enclosed is 1 file for the recipe. This file needs to be transcoded from its
> format of MJPEG into H.264 on the compute stick using vaapi using gstreamer
> on Ubuntu 18.04 Server.
>
> Complete recipe coming after this large upload.
Complete recipe from "No OS":
(1) Install Ubuntu 18.04.2 Server onto compute stick. I used a USB stick to do
this. Select volume manager in settings and SSH enable. Choose to make 52GB of
the compute stick into the large boot partition.
(2) Install these to get current gstreamer and ffmpeg test facilities:
sudo apt install -y libgstreamer1.0-0 gstreamer1.0-plugins-base
gstreamer1.0-plugins-good
sudo apt install -y gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly
gstreamer1.0-libav
sudo apt install -y gstreamer1.0-doc gstreamer1.0-tools gstreamer1.0-x
gstreamer1.0-alsa
sudo apt install -y gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5
gstreamer1.0-pulseaudio
sudo apt install -y ffmpeg
sudo apt install -y gstreamer1.0-vaapi
sudo apt install -y vainfo
sudo apt install -y xserver-xorg-hwe-18.04
sudo apt-get update
sudo apt-get upgrade
(3) Add the line below to /etc/fstab to point /tmp to tmpfs so we are routinely
saving to ram instead of flash:
tmpfs /tmp tmpfs defaults,noatime,nodiratime 0 0
(4) Save the following script to ~/setup-gpu.sh
#!/usr/bin/env bash
echo "This script must be run from sudo su prompt #"
set -ex
echo 500 | tee /sys/class/drm/card0/gt_min_freq_mhz
echo 500 | tee /sys/class/drm/card0/gt_max_freq_mhz
echo 500 | tee /sys/class/drm/card0/gt_boost_freq_mhz
cat /sys/class/drm/card0/gt_min_freq_mhz
cat /sys/class/drm/card0/gt_max_freq_mhz
cat /sys/class/drm/card0/gt_boost_freq_mhz
echo "Intel GPU Frequencies Locked"
echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo performance > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo performance > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
echo performance > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
echo "Intel CPUs set to performance governor"
(5) Save the following script to ~/mjpeg-to-h264.sh:
#!/usr/bin/env bash
set -ex
tcount=0
while true; do
echo "Transcode: iteration $tcount" | tee tcount.txt
# remove old output
rm -f /tmp/transcode-output.mp4
# transcode big-buck-bunny.mp4 using gstreamer
time gst-launch-1.0 filesrc location=
andy-movies/mjpeg-outside-640x480.mkv ! matroskademux ! vaapijpegdec !
vaapih264enc ! qtmux ! filesink location=/tmp/gst-output.mp4
tcount=$((tcount+1))
done
(6) Save the MJPEG movie from this bug reply #30 to:
~/andy-movies/mjpeg-outside-640x480.mkv
(7) Switch to root:
$ sudo su
# ./setup-gpu.sh
<ctrl-D> to exit from root
$./mjpeg-to-h264.sh
Once the compute stick is configured, the last Step #7 is what I do over and
over after rebooting.
NOTE: It's highly possible that this configuration will not reproduce the
issue, even when updated with the drm-tip kernel. We have only been successful
when using the image which was running on compute stick .38 and .36.
andy
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-gfx-bugs/attachments/20190415/5dde8c5f/attachment.html>
More information about the intel-gfx-bugs
mailing list