<p>So I am re-encoding an old AVI:
<a href="https://pastebin.com/KqcHMVAx" rel="nofollow noreferrer">https://pastebin.com/KqcHMVAx</a></p>
<p>I have written a batch to re-encode a bunch of similar AVI's and the same problem occurs with each.
When I try and play the resulting MKV in VLC the video freezes after a few seconds, but the audio continues. I get the following VLC messages:</p>
<blockquote>
<p>avcodec info: Using D3D11VA (NVIDIA GeForce GTX 1080, vendor 10de(NVIDIA), device 1b80, revision a1) for hardware decoding
avcodec error: hardware acceleration picture allocation failed
avcodec error: avcodec_send_packet critical error</p>
</blockquote>
<p>My FFMpeg arguments are as follows:</p>
<pre><code>-y -i &quot;{0}&quot; -c:v libx265 -crf 23 -preset slow -tune fastdecode -c:a copy -x265-params &quot;colorprim=5:transfer=1:colormatrix=6:refine-mv=1&quot; &quot;{1}&quot;
</code></pre>
<p>Which results in: <a href="https://pastebin.com/VTstcKF7" rel="nofollow noreferrer">https://pastebin.com/VTstcKF7</a></p>
<p>If I repeat the same encoding in Handbrake, the playback is fine, no problems. That results in: <a href="https://pastebin.com/v3ix1caA" rel="nofollow noreferrer">https://pastebin.com/v3ix1caA</a></p>
<p>Now I've compared the two and the only difference in the encoding settings is</p>
<pre><code>frame-threads=3 instead of 2 in my batch
numa-pools=4 appears in my batch but not Handbrake
refine-mv=1 instead of 0 in my batch. 
</code></pre>
<p>To clarify my FFMPEG sets frame-threads to 2, numa-pools to 4 and refine-mv to 0. I have set the refine-mv to 1 but it seems to have been ignored.</p>
<p>Now I am running handbrake on Linux with x265 version 3.2.1+1 and the batch is running under Windows with version 3.1+19.</p>
<p>I have tried running FFMpeg on the Linux machine with the same settings, same result in failure.</p>
<p>I've mirrored the settings as close as I can to Handbrake but I cannot seem to achieve a file free of issues. Can anyone point me in the right direction?</p>

CC BY-SA 4.0
2020-09-13T04:49:16.383Z
What happens with ffplay?
Gyan
CC BY-SA 4.0
2020-09-13T11:09:04.987Z
FFPlay seems to work just fine. And the Windows inbuilt Media player plays it fine. I was initially going to submit this as a VLC bug, but the internet had compression options suggestions. So I decided to do a comparison with Handbrake. And as you can see the same settings with Handbrake produce an error free file. I am assuming it's a parameter/setting I'm not including rather than an FFMpeg bug.
Tod
<ffmpeg><playback><vlc>
Playback from FFMPEG x265 freezes video but not audio
Tod
# Playback from FFMPEG x265 freezes video but not audio

(Asked by: username_0 on 2020-09-12)

So I am re-encoding an old AVI:
https://pastebin.com/KqcHMVAx
I have written a batch to re-encode a bunch of similar AVI's and the same problem occurs with each.
When I try and play the resulting MKV in VLC the video freezes after a few seconds, but the audio continues. I get the following VLC messages:

avcodec info: Using D3D11VA (NVIDIA GeForce GTX 1080, vendor 10de(NVIDIA), device 1b80, revision a1) for hardware decoding
avcodec error: hardware acceleration picture allocation failed
avcodec error: avcodec_send_packet critical error

My FFMpeg arguments are as follows:
-y -i "{0}" -c:v libx265 -crf 23 -preset slow -tune fastdecode -c:a copy -x265-params "colorprim=5:transfer=1:colormatrix=6:refine-mv=1" "{1}"

Which results in: https://pastebin.com/VTstcKF7
If I repeat the same encoding in Handbrake, the playback is fine, no problems. That results in: https://pastebin.com/v3ix1caA
Now I've compared the two and the only difference in the encoding settings is
frame-threads=3 instead of 2 in my batch
numa-pools=4 appears in my batch but not Handbrake
refine-mv=1 instead of 0 in my batch. 

To clarify my FFMPEG sets frame-threads to 2, numa-pools to 4 and refine-mv to 0. I have set the refine-mv to 1 but it seems to have been ignored.
Now I am running handbrake on Linux with x265 version 3.2.1+1 and the batch is running under Windows with version 3.1+19.
I have tried running FFMpeg on the Linux machine with the same settings, same result in failure.
I've mirrored the settings as close as I can to Handbrake but I cannot seem to achieve a file free of issues. Can anyone point me in the right direction?

**Tags:** ffmpeg, playback, vlc

> **Comments:**
> **username_1**: What happens with ffplay?  
> **username_0**: FFPlay seems to work just fine. And the Windows inbuilt Media player plays it fine. I was initially going to submit this as a VLC bug, but the internet had compression options suggestions. So I decided to do a comparison with Handbrake. And as you can see the same settings with Handbrake produce an error free file. I am assuming it's a parameter/setting I'm not including rather than an FFMpeg bug.  

---

## 0 answers

