Tool

Shrinking GoPro and Action-Cam Videos: Build an ffmpeg Command Without gpmd/tmcd Stream Errors

Action-cam files often carry data streams such as telemetry (gpmd) and timecode (tmcd) besides the video and audio. If a plain ffmpeg command gave you a stream-related error, these tracks are usually the first suspects. Paste the ffprobe output of one file and the tool lays out the stream makeup, then shows a command that explicitly picks only the video and audio, plus the expected savings range read from our measured curves. The input is analyzed only inside this browser.

Run ffprobe -hide_banner filename in a terminal and paste the whole output. In PowerShell, add 2>&1 at the end. The example buttons hold made-up output that only shows the format; they are not measurements of a real camera.

Why do errors show up only with action-cam files?

By default ffmpeg picks just one video and one audio stream for the output. But if you put “everything” in with -map 0, or try to copy every stream, the data streams come along too. In ffprobe these tracks appear as Data: none (gpmd / 0x646D7067) and Data: none (tmcd / 0x64636D74), with the codec name shown as none or bin_data, and there are reports on the ffmpeg bug tracker and mailing lists, as far as we know, of errors in the “Could not find tag for codec none in stream” family when such streams are moved into an MP4. The fix is simple: pick the streams you need yourself, as in -map 0:v:0 -map 0:a:0. That is how this tool’s main command is built.

How to read the stream names

  • gpmd: a track known to be GoPro telemetry (GPMF). It is known to hold records such as GPS, acceleration and gyro data, and speed and route overlay programs read it. It disappears from the shrunk file, so keep the original if you plan to make an overlay.
  • tmcd: the timecode track. It is not needed to play the shrunk video.
  • fdsc: a device-information track known to appear in GoPro files. It is not needed for playback.
  • handler_name: names such as GoPro MET and GoPro TCD are attached as metadata under a stream. Even when there is no codec tag, this tool uses these names to make its guess.

What the command does

  • Picks only video and audio: the data streams are never selected, so the command never goes down the error path above.
  • -tag:v hvc1 for HEVC output: iPhones and Macs are known not to open HEVC tagged hev1. To fix a file whose tag is already the problem, see the hvc1/hev1 tag checker.
  • Option to keep 10-bit: if the source is 10-bit, you choose between keeping the color steps with yuv420p10le and dropping to 8-bit for compatibility. Whether a device decodes 10-bit is covered by the rules table in the playability checker.
  • Audio: AAC is copied; anything else is converted to AAC 160k. How big a share the audio takes of the total can be calculated with the audio bitrate tool.
  • Metadata: -map_metadata 0 brings over the global metadata (such as the shooting time). Check the result with ffprobe to see which values survive.

How the expected-savings table is built

Every number comes only from the CSV of our measured CRF sweep (four 10-second 1080p25 clips, x264 and x265 at medium). The tool scales them in proportion to pixel count × frame count to match the resolution and fps you pasted, gets an expected bitrate for each clip, and compares it with the video bitrate you pasted to calculate the percentage saved. When the CRF falls between measured points, it interpolates by joining the log bitrates with a straight line. Which CRF suits your purpose is covered by the CRF recommender and the bitrate sufficiency judge, using the same measurements. Another way to estimate size in advance is the re-encode size predictor.

Limits worth knowing

  • These are not values measured on GoPro originals. We did not measure action-cam footage, and the four clips are ordinary 1080p25 video. The width of the table only shows that bitrate at the same CRF differs a lot between clips; which row your video comes closest to you can only find out by encoding one segment yourself. For choosing a segment, see the representative segment tool.
  • The efficiency difference between a camera’s built-in encoder and x265 is not reflected. Converting the source’s bits per pixel into a CRF on our clips is only approximate.
  • Quality is not guaranteed. The tool only estimates size. Quality (VMAF) at the same CRF differs from clip to clip, so check it by eye.
  • The gpmd copy command was not tested. It may or may not work depending on the ffmpeg version and the file, so it is offered only as an option.
  • Hardware encoders were not measured, and speed is not covered. 360° video (two lenses), HDR color conversion and joining chapters from several files are out of scope. To run many files at once, see the folder batch encode script tool.
  • It reads only ffprobe’s default text output and judges only the first file. The input is never sent to a server.