<p>Just an FYI - you can't just force a codec if the <code>moov atom</code> or <code>headers</code> are missing.</p>
<p>For that you need to repair the file by copying valid headers and atoms from another functional file created the same way.</p>
<p>The only utility that worked for me was <a href="https://codecpack.co/download/recover-mp4.html" rel="nofollow noreferrer">https://codecpack.co/download/recover-mp4.html</a> - which gives instructions when run without arguments, runs fine on <code>wine</code>, and worked, unlike <code>untrunc</code> and a bunch of other ffpmeg-based utilities.</p>
<p>(The file is archived here: <a href="http://web.archive.org/web/20220320003709/https://download1491.mediafire.com/u39upc91ggmg/yf8ct3b58ipbc3l/recover_mp4.zip" rel="nofollow noreferrer">http://web.archive.org/web/20220320003709/https://download1491.mediafire.com/u39upc91ggmg/yf8ct3b58ipbc3l/recover_mp4.zip</a>)</p>

CC BY-SA 4.0
2022-09-05T13:11:23.393Z
2023-03-24T09:18:59.317Z
2023-03-24T09:18:59.317Z
abcsec
<p>If you know the compatible codec in ffmpeg, you can remux the file to generate a standard file, e.g.</p>
<pre><code>ffmpeg -c:v hevc -i in.avi -c copy out.avi
</code></pre>

CC BY-SA 4.0
2020-06-18T16:56:58.230Z
2020-06-18T16:56:58.230Z
Gyan
<p>I am dealing with a video that as a codec tag of <code>none</code>, but the actual codec is <code>GHEC</code>.  I am aware this is a proprietary codec from GeoVision.  The video will not play unless I use ffplay with the <code>-vcodec hevc</code> argument.  Since <code>GHEC</code> codec will play via <code>hevc</code> codec, is there any way I can force the codec to be <code>hevc</code> on this video so I can watch it in other media players like VLC?</p>
<p>Here are the streams from ffprobe:</p>
<pre><code>    Stream #0:0: Video: none (GHEC / 0x43454847), none, 1920x1080, 451 kb/s, 30 fps, 30 tbr, 30 tbn, 30 tbc
    Stream #0:1: Subtitle: none, 3 kb/s
    Stream #0:2: Subtitle: none
</code></pre>

CC BY-SA 4.0
2020-06-18T05:41:16.387Z
Remux via ffmpeg with the decoder specified.
Gyan
CC BY-SA 4.0
2020-06-18T16:10:19.997Z
@Gyan anything I try keeps giving me this error: `Output file #0 does not contain any stream`.  I have tried `ffmpeg -i in.avi -vcodec:hevc out.avi`, `ffmpeg -i in.avi -vcodec hevc out.avi`, and `ffmpeg -i -c:v codec hevc out.avi`.  Are my commands correct?
Agrejus
CC BY-SA 4.0
2020-06-18T16:33:06.767Z
Got it, looks like it `-c:v hevc` must come before the `-i` argument.
Agrejus
CC BY-SA 4.0
2020-06-18T16:33:37.980Z
@Gyan If you want to answer my question I can accept the answer
Agrejus
<ffmpeg><h.265>
FFMpeg Force Codec
Agrejus
# FFMpeg Force Codec

(Asked by: username_0 on 2020-06-17)

I am dealing with a video that as a codec tag of none, but the actual codec is GHEC.  I am aware this is a proprietary codec from GeoVision.  The video will not play unless I use ffplay with the -vcodec hevc argument.  Since GHEC codec will play via hevc codec, is there any way I can force the codec to be hevc on this video so I can watch it in other media players like VLC?
Here are the streams from ffprobe:
    Stream #0:0: Video: none (GHEC / 0x43454847), none, 1920x1080, 451 kb/s, 30 fps, 30 tbr, 30 tbn, 30 tbc
    Stream #0:1: Subtitle: none, 3 kb/s
    Stream #0:2: Subtitle: none

**Tags:** ffmpeg, h.265

> **Comments:**
> **username_1**: Remux via ffmpeg with the decoder specified.  
> **username_0**: @username_1 anything I try keeps giving me this error: `Output file #0 does not contain any stream`.  I have tried `ffmpeg -i in.avi -vcodec:hevc out.avi`, `ffmpeg -i in.avi -vcodec hevc out.avi`, and `ffmpeg -i -c:v codec hevc out.avi`.  Are my commands correct?  
> **username_0**: Got it, looks like it `-c:v hevc` must come before the `-i` argument.  
> **username_0**: @username_1 If you want to answer my question I can accept the answer  

---

## 2 answers

### Answer by username_1 on 2020-06-18. Score: 3 | Accepted answer

If you know the compatible codec in ffmpeg, you can remux the file to generate a standard file, e.g.
ffmpeg -c:v hevc -i in.avi -c copy out.avi


---

### Answer by username_2 on 2022-09-05. Score: 1

Just an FYI - you can't just force a codec if the `moov atom` or `headers` are missing.

For that you need to repair the file by copying valid headers and atoms from another functional file created the same way.

The only utility that worked for me was <https://codecpack.co/download/recover-mp4.html> - which gives instructions when run without arguments, runs fine on `wine`, and worked, unlike `untrunc` and a bunch of other ffpmeg-based utilities.

(The file is archived here: <http://web.archive.org/web/20220320003709/https://download1491.mediafire.com/u39upc91ggmg/yf8ct3b58ipbc3l/recover_mp4.zip>)


---

