Body: <p>I obtained this video from directly reading the memory of a hardware encoder. The encoder supposedly produces a HEVC (H.265) or H.264 video stream, but I can't accurately play or convert the file with <code>ffplay</code> or <code>ffmpeg</code>.</p>
  
  <p>Given the information below, is this something I might be able to play correctly? Is it incomplete data, and something more may be needed to reconstruct the video?</p>
  
  <p><a href="https://drive.google.com/file/d/1yRWzAhVp7SJeUS2gX80jnM5NsM3Q2WqS/view?usp=sharing" rel="nofollow noreferrer">Link to the file I'm trying to play.</a></p>
  
  <p>This is what <code>ffmplay</code> is producing when trying to play the file. It's possible to view the outlines of the actual recorded objects. Seems like information about the pixels that change? That would be something to be expected from a H264 or H265 stream...</p>
  
  <p><code>ffplay -f rawvideo -video_size 1920x1088 -framerate 5 -pixel_format yuv420p stream.bin</code></p>
  
  <p><a href="https://i.sstatic.net/uC3I9.gif" rel="nofollow noreferrer"><img src="https://i.sstatic.net/uC3I9.gif" alt="enter image description here"></a></p>
  
  <p>And this is a sample of the actual recorded footage, for comparison purposes:</p>
  
  <p><a href="https://i.sstatic.net/9lXOw.gif" rel="nofollow noreferrer"><img src="https://i.sstatic.net/9lXOw.gif" alt="enter image description here"></a></p>
  
  <p>When I try to play it using <code>ffplay</code>, no arguments:</p>
  
  <pre><code>$ ffplay stream.bin
  [NULL @ 00000183f45bee20] [IMGUTILS @ 0000001b95bfef00] Picture size 1280x5222400 is invalid
  [bin @ 00000183f45ac600] Failed to open codec in avformat_find_stream_info
  [bintext @ 00000183f45bee20] [IMGUTILS @ 0000001b95bfedd0] Picture size 0x0 is invalid
  [bintext @ 00000183f45bee20] video_get_buffer: image parameters invalid
  [bintext @ 00000183f45bee20] get_buffer() failed
  [bintext @ 00000183f45bee20] reget_buffer() failed
  [bin @ 00000183f45ac600] Stream #0: not enough frames to estimate rate; consider increasing probesize
  [bin @ 00000183f45ac600] decoding for stream 0 failed
  [bin @ 00000183f45ac600] Could not find codec parameters for stream 0 (Video: bintext, pal8): unspecified size
  Consider increasing the value for the 'analyzeduration' and 'probesize' options
  Input #0, bin, from '238F.bin':
    Duration: N/A, bitrate: N/A
  25 tbn, 25 tbc0: Video: bintext, pal8, 25 tbr,     nan    :  0.000 fd=   0 aq=    0KB vq=    0KB sq=    0B f=0/0
  [bintext @ 00000183f45bf7c0] [IMGUTILS @ 0000001b95dff340] Picture size 0x0 is invalid
  [bintext @ 00000183f45bf7c0] video_get_buffer: image parameters invalid
  [bintext @ 00000183f45bf7c0] get_buffer() failed
  [bintext @ 00000183f45bf7c0] reget_buffer() failed
      nan M-V:    nan fd=   0 aq=    0KB vq=    0KB sq=    0B f=0/0
  </code></pre>
  
  <p>Trying to force H265 and H264:</p>
  
  <pre><code>$ ffplay -f hevc stream.bin
  [hevc @ 00000130c4fe6e60] Invalid NAL unit 0, skipping.  0B f=0/0
  [hevc @ 00000130c4fe6e60] Invalid NAL unit 0, skipping.  0B f=0/0
      Last message repeated 5 times
      Last message repeated 5 times
  Invalid NAL unit 8, skipping. nan    :  0.000 fd=   0 aq=    0KB vq=    0KB sq=    0B f=0/0
  [hevc @ 00000130c4fe6e60] Invalid NAL unit 0, skipping.
      Last message repeated 1 times
  [hevc @ 00000130c4fe6e60] Invalid NAL unit 0, skipping.  0B f=0/0
      Last message repeated 1 times
      Last message repeated 1 times
  Invalid NAL unit 24, skipping.nan    :  0.000 fd=   0 aq=    0KB vq=    0KB sq=    0B f=0/0
  [hevc @ 00000130c4fe6e60] Invalid NAL unit 0, skipping.
      Last message repeated 2 times
  [hevc @ 00000130c4fe6e60] Invalid NAL unit 0, skipping.  0B f=0/0
      Last message repeated 4 times
      Last message repeated 4 times
  [hevc @ 00000130c4fe6e60] missing picture in access unit 0B f=0/0
  (...)
  </code></pre>
  
  <pre><code>$ ffplay -f h264 stream.bin
  [h264 @ 0000022a70567080] non-existing PPS 1 referenced  0B f=0/0
  [h264 @ 0000022a70567080] data partitioning is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
  [h264 @ 0000022a70567080] If you want to help, upload a sample of this file to ftp://upload.ffmpeg.org/incoming/ and contact the ffmpeg-devel mailing list. (ffmpeg-devel@ffmpeg.org)
  [h264 @ 0000022a70567080] slice type 22 too large at 1
  [h264 @ 0000022a70567080] decode_slice_header error
  [h264 @ 0000022a70567080] non-existing PPS 2 referenced
  [h264 @ 0000022a70567080] decode_slice_header error
  [h264 @ 0000022a70567080] no frame!
  [h264 @ 0000022a70567080] non-existing PPS 2 referenced
      Last message repeated 1 times
  [h264 @ 0000022a70567080] decode_slice_header error
  [h264 @ 0000022a70567080] no frame!
  [h264 @ 0000022a70567080] non-existing PPS 0 referenced  0B f=0/0
      Last message repeated 1 times
  [h264 @ 0000022a70567080] decode_slice_header error
  (...)
  </code></pre>
  
  <hr>
  
  <p><strong>EDIT</strong></p>
  
  <p>There's another dump I'd like you to take a look at: <a href="https://drive.google.com/file/d/1nTcFvyOvm1rNtZ-wnwmRyjt4WYeUqVpJ/view?usp=sharing" rel="nofollow noreferrer">link to file</a>.</p>
  
  <p><code>ffplay -f rawvideo -video_size 1920x1088 -framerate 5 -pixel_format yuyv422 -vf scale=320:-1 0x239F.bin</code></p>
  
  <p><a href="https://i.sstatic.net/iOW9Q.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/iOW9Q.png" alt="enter image description here"></a></p>
  
  <p>And the correct image, for reference:</p>
  
  <p><a href="https://i.sstatic.net/KVqY2.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/KVqY2.png" alt="enter image description here"></a></p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-03-12T02:41:05.543Z
Comments.Text: The file is definitely not h264 or h.265. It is an uncompressed format of some kind.
Comments.UserDisplayName: SlimSCSI
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-03-12T06:00:29.930Z
Comments.Text: Ueah, this is raw raster. You'll need the correct frame size and pixel format..
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-03-12T10:23:15.457Z
Comments.Text: @SlimSCSI, Gyan, I edited the question to add a new file, that seems to have another format. Would you mind taking a look? Thank you.
Comments.UserDisplayName: Telmo Marques
Tags: <ffmpeg><hardware><h.264><h265><decoding>
Title: Help decoding video from hardware encoder
UserDisplayName: Telmo Marques
ThreadText: # Help decoding video from hardware encoder
  
  (Asked by: username_0 on 2019-03-11)
  
  I obtained this video from directly reading the memory of a hardware encoder. The encoder supposedly produces a HEVC (H.265) or H.264 video stream, but I can't accurately play or convert the file with `ffplay` or `ffmpeg`.
  
  Given the information below, is this something I might be able to play correctly? Is it incomplete data, and something more may be needed to reconstruct the video?
  
  [Link to the file I'm trying to play.](https://drive.google.com/file/d/1yRWzAhVp7SJeUS2gX80jnM5NsM3Q2WqS/view?usp=sharing)
  
  This is what `ffmplay` is producing when trying to play the file. It's possible to view the outlines of the actual recorded objects. Seems like information about the pixels that change? That would be something to be expected from a H264 or H265 stream...
  
  `ffplay -f rawvideo -video_size 1920x1088 -framerate 5 -pixel_format yuv420p stream.bin`
  
  [![enter image description here](https://i.sstatic.net/uC3I9.gif)](https://i.sstatic.net/uC3I9.gif)
  
  And this is a sample of the actual recorded footage, for comparison purposes:
  
  [![enter image description here](https://i.sstatic.net/9lXOw.gif)](https://i.sstatic.net/9lXOw.gif)
  
  When I try to play it using `ffplay`, no arguments:
  
  ```
  $ ffplay stream.bin
  [NULL @ 00000183f45bee20] [IMGUTILS @ 0000001b95bfef00] Picture size 1280x5222400 is invalid
  [bin @ 00000183f45ac600] Failed to open codec in avformat_find_stream_info
  [bintext @ 00000183f45bee20] [IMGUTILS @ 0000001b95bfedd0] Picture size 0x0 is invalid
  [bintext @ 00000183f45bee20] video_get_buffer: image parameters invalid
  [bintext @ 00000183f45bee20] get_buffer() failed
  [bintext @ 00000183f45bee20] reget_buffer() failed
  [bin @ 00000183f45ac600] Stream #0: not enough frames to estimate rate; consider increasing probesize
  [bin @ 00000183f45ac600] decoding for stream 0 failed
  [bin @ 00000183f45ac600] Could not find codec parameters for stream 0 (Video: bintext, pal8): unspecified size
  Consider increasing the value for the 'analyzeduration' and 'probesize' options
  Input #0, bin, from '238F.bin':
    Duration: N/A, bitrate: N/A
  25 tbn, 25 tbc0: Video: bintext, pal8, 25 tbr,     nan    :  0.000 fd=   0 aq=    0KB vq=    0KB sq=    0B f=0/0
  [bintext @ 00000183f45bf7c0] [IMGUTILS @ 0000001b95dff340] Picture size 0x0 is invalid
  [bintext @ 00000183f45bf7c0] video_get_buffer: image parameters invalid
  [bintext @ 00000183f45bf7c0] get_buffer() failed
  [bintext @ 00000183f45bf7c0] reget_buffer() failed
      nan M-V:    nan fd=   0 aq=    0KB vq=    0KB sq=    0B f=0/0
  
  ```
  
  Trying to force H265 and H264:
  
  ```
  $ ffplay -f hevc stream.bin
  [hevc @ 00000130c4fe6e60] Invalid NAL unit 0, skipping.  0B f=0/0
  [hevc @ 00000130c4fe6e60] Invalid NAL unit 0, skipping.  0B f=0/0
      Last message repeated 5 times
      Last message repeated 5 times
  Invalid NAL unit 8, skipping. nan    :  0.000 fd=   0 aq=    0KB vq=    0KB sq=    0B f=0/0
  [hevc @ 00000130c4fe6e60] Invalid NAL unit 0, skipping.
      Last message repeated 1 times
  [hevc @ 00000130c4fe6e60] Invalid NAL unit 0, skipping.  0B f=0/0
      Last message repeated 1 times
      Last message repeated 1 times
  Invalid NAL unit 24, skipping.nan    :  0.000 fd=   0 aq=    0KB vq=    0KB sq=    0B f=0/0
  [hevc @ 00000130c4fe6e60] Invalid NAL unit 0, skipping.
      Last message repeated 2 times
  [hevc @ 00000130c4fe6e60] Invalid NAL unit 0, skipping.  0B f=0/0
      Last message repeated 4 times
      Last message repeated 4 times
  [hevc @ 00000130c4fe6e60] missing picture in access unit 0B f=0/0
  (...)
  
  ```
  
  ```
  $ ffplay -f h264 stream.bin
  [h264 @ 0000022a70567080] non-existing PPS 1 referenced  0B f=0/0
  [h264 @ 0000022a70567080] data partitioning is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
  [h264 @ 0000022a70567080] If you want to help, upload a sample of this file to ftp://upload.ffmpeg.org/incoming/ and contact the ffmpeg-devel mailing list. (ffmpeg-devel@ffmpeg.org)
  [h264 @ 0000022a70567080] slice type 22 too large at 1
  [h264 @ 0000022a70567080] decode_slice_header error
  [h264 @ 0000022a70567080] non-existing PPS 2 referenced
  [h264 @ 0000022a70567080] decode_slice_header error
  [h264 @ 0000022a70567080] no frame!
  [h264 @ 0000022a70567080] non-existing PPS 2 referenced
      Last message repeated 1 times
  [h264 @ 0000022a70567080] decode_slice_header error
  [h264 @ 0000022a70567080] no frame!
  [h264 @ 0000022a70567080] non-existing PPS 0 referenced  0B f=0/0
      Last message repeated 1 times
  [h264 @ 0000022a70567080] decode_slice_header error
  (...)
  
  ```
  
  ---
  
  **EDIT**
  
  There's another dump I'd like you to take a look at: [link to file](https://drive.google.com/file/d/1nTcFvyOvm1rNtZ-wnwmRyjt4WYeUqVpJ/view?usp=sharing).
  
  `ffplay -f rawvideo -video_size 1920x1088 -framerate 5 -pixel_format yuyv422 -vf scale=320:-1 0x239F.bin`
  
  [![enter image description here](https://i.sstatic.net/iOW9Q.png)](https://i.sstatic.net/iOW9Q.png)
  
  And the correct image, for reference:
  
  [![enter image description here](https://i.sstatic.net/KVqY2.png)](https://i.sstatic.net/KVqY2.png)
  
  **Tags:** ffmpeg, hardware, h.264, h265, decoding
  
  > **Comments:**
  > **username_1**: The file is definitely not h264 or h.265. It is an uncompressed format of some kind.  
  > **username_2**: Ueah, this is raw raster. You'll need the correct frame size and pixel format..  
  > **username_0**: @username_1, username_2, I edited the question to add a new file, that seems to have another format. Would you mind taking a look? Thank you.  
  
  ---
  
  ## 0 answers
  
  