<p>I am trying to use ffmpeg to extract thumbnails from a partial dump of a MPEGTS, coming off a multicast network. The dump contains the video PID only, in MPEGTS format, but I am unable to get ffmpeg to recognize the HEVC, and I am looking for a command-line parameter to force it to decode it as HEVC.</p>

<p>This is what I am trying to run, and which is not working. Using "-f mpegts" it tries to probe the codec and fails:</p>

<pre><code>ffmpeg -f mpegts -c:v:0 hevc -i dump.ts -vframes1 dump.jpg
ffmpeg version N-52628-g79e3c4dd74-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 8 (Debian 8.3.0-6)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg
  libavutil      56. 43.100 / 56. 43.100
  libavcodec     58. 82.100 / 58. 82.100
  libavformat    58. 42.102 / 58. 42.102
  libavdevice    58.  9.103 / 58.  9.103
  libavfilter     7. 80.100 /  7. 80.100
  libswscale      5.  6.101 /  5.  6.101
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
[mpegts @ 0x6282180] probed stream 0 failed
[mpegts @ 0x6282180] Could not find codec parameters for stream 0 (Unknown: none): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mpegts, from 'dump.ts':
  Duration: 00:00:02.37, start: 59946.297300, bitrate: 16213 kb/s
    Stream #0:0[0x65]: Unknown: none
Output #0, image2, to 'dump.jpg':
Output file #0 does not contain any stream
</code></pre>

<p>Using "-f mpegtsraw" it says codec unknown:</p>

<pre><code>ffmpeg -f mpegtsraw -c:v:0 hevc -i dump.ts -vframes1 dump.jpg
ffmpeg version N-52628-g79e3c4dd74-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 8 (Debian 8.3.0-6)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg
  libavutil      56. 43.100 / 56. 43.100
  libavcodec     58. 82.100 / 58. 82.100
  libavformat    58. 42.102 / 58. 42.102
  libavdevice    58.  9.103 / 58.  9.103
  libavfilter     7. 80.100 /  7. 80.100
  libswscale      5.  6.101 /  5.  6.101
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
[mpegtsraw @ 0x6715180] Estimating duration from bitrate, this may be inaccurate
Input #0, mpegtsraw, from 'dump.ts':
  Duration: 00:00:02.38, start: 59946.153588, bitrate: 16146 kb/s
Codec 0x20000 is not in the full list.
    Stream #0:0[0x0]: Data: unknown_codec, 16146 kb/s
Output #0, image2, to 'dump.jpg':
Output file #0 does not contain any stream
</code></pre>

CC BY-SA 4.0
2020-05-22T09:09:46.770Z
Dump the stream and then try: `ffmpeg -f mpegtsraw -i dump.ts -c copy -map 0 -f data stream.bin` and then `ffmpeg -f hevc -i stream.bin -vframes 1 dump.jpg`
Gyan
CC BY-SA 4.0
2020-05-22T13:06:23.383Z
With that, I get a green 1920×540 JPEG (with a gray upper-left corner), so it doesn't like the stream (I was trying something similar by modifying the code that generates the file, getting the same result as doing it with ffmpeg).
nafmo
<ffmpeg><file-formats>
Forcing input video codec in ffmpeg for raw MPEGTS dump
nafmo
# Forcing input video codec in ffmpeg for raw MPEGTS dump

(Asked by: username_0 on 2020-05-22)

I am trying to use ffmpeg to extract thumbnails from a partial dump of a MPEGTS, coming off a multicast network. The dump contains the video PID only, in MPEGTS format, but I am unable to get ffmpeg to recognize the HEVC, and I am looking for a command-line parameter to force it to decode it as HEVC.
This is what I am trying to run, and which is not working. Using "-f mpegts" it tries to probe the codec and fails:
ffmpeg -f mpegts -c:v:0 hevc -i dump.ts -vframes1 dump.jpg
ffmpeg version N-52628-g79e3c4dd74-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 8 (Debian 8.3.0-6)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg
  libavutil      56. 43.100 / 56. 43.100
  libavcodec     58. 82.100 / 58. 82.100
  libavformat    58. 42.102 / 58. 42.102
  libavdevice    58.  9.103 / 58.  9.103
  libavfilter     7. 80.100 /  7. 80.100
  libswscale      5.  6.101 /  5.  6.101
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
[mpegts @ 0x6282180] probed stream 0 failed
[mpegts @ 0x6282180] Could not find codec parameters for stream 0 (Unknown: none): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mpegts, from 'dump.ts':
  Duration: 00:00:02.37, start: 59946.297300, bitrate: 16213 kb/s
    Stream #0:0[0x65]: Unknown: none
Output #0, image2, to 'dump.jpg':
Output file #0 does not contain any stream

Using "-f mpegtsraw" it says codec unknown:
ffmpeg -f mpegtsraw -c:v:0 hevc -i dump.ts -vframes1 dump.jpg
ffmpeg version N-52628-g79e3c4dd74-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 8 (Debian 8.3.0-6)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg
  libavutil      56. 43.100 / 56. 43.100
  libavcodec     58. 82.100 / 58. 82.100
  libavformat    58. 42.102 / 58. 42.102
  libavdevice    58.  9.103 / 58.  9.103
  libavfilter     7. 80.100 /  7. 80.100
  libswscale      5.  6.101 /  5.  6.101
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
[mpegtsraw @ 0x6715180] Estimating duration from bitrate, this may be inaccurate
Input #0, mpegtsraw, from 'dump.ts':
  Duration: 00:00:02.38, start: 59946.153588, bitrate: 16146 kb/s
Codec 0x20000 is not in the full list.
    Stream #0:0[0x0]: Data: unknown_codec, 16146 kb/s
Output #0, image2, to 'dump.jpg':
Output file #0 does not contain any stream

**Tags:** ffmpeg, file-formats

> **Comments:**
> **username_1**: Dump the stream and then try: `ffmpeg -f mpegtsraw -i dump.ts -c copy -map 0 -f data stream.bin` and then `ffmpeg -f hevc -i stream.bin -vframes 1 dump.jpg`  
> **username_0**: With that, I get a green 1920×540 JPEG (with a gray upper-left corner), so it doesn't like the stream (I was trying something similar by modifying the code that generates the file, getting the same result as doing it with ffmpeg).  

---

## 0 answers

