Answers.Body: <p>Well. Turns out that if you read <a href="https://developer.apple.com/documentation/http_live_streaming/hls_authoring_specification_for_apple_devices?language=objc" rel="nofollow noreferrer">this guide</a> for HLS streams, it gives a bunch of details on how the actual video formats should be set up. In particular, for HEVC, it says: </p>
  
  <blockquote>
    <p>1.10. You SHOULD use video formats in which the parameter sets are stored in the > sample descriptions, rather than the samples. (i.e., Use ‘avc1’, ‘hvc1’, or 
    ‘dvh1’ rather than ‘avc3’, ‘hev1’, or ‘dvhe’.) </p>
  </blockquote>
  
  <p>So I thought I could give it a shot. </p>
  
  <p>ffmpeg, by default, uses hev1. So if I take my previous command line and add <code>-tag:v hvc1</code>:</p>
  
  <p><code>ffmpeg -i hank_vlog_orig_short.mp4 -c:v libx265 -c:a copy -tag:v hvc1 hank_vlog_orig_short_hvec.mp4</code></p>
  
  <p>Presto, it works. </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-10T18:36:56.260Z
Answers.LastActivityDate: 2019-04-10T18:36:56.260Z
Answers.UserDisplayName: Juan Pablo
Body: <p>Take <a href="https://descript-public.s3.amazonaws.com/so_question_data/h265_vs_fcpx/hank_vlog_orig_short.mp4" rel="nofollow noreferrer">this file</a>, the first 10s of <a href="https://youtu.be/zoy-x9VBhVc" rel="nofollow noreferrer">Hank Green's "editing challenge"</a>. It is H264 video + AAC audio. You can take that file and import it into Final Cut Pro X (FCPX for short), and edit it to your heart's content.</p>
  
  <p>Now, take that file, and convert it using ffmpeg, like so:</p>
  
  <p><code>ffmpeg -i hank_vlog_orig_short.mp4 -c:v libx265 -c:a copy hank_vlog_orig_short_hvec.mp4</code></p>
  
  <p>...which produces <a href="https://descript-public.s3.amazonaws.com/so_question_data/h265_vs_fcpx/hank_vlog_orig_short_hevc.mp4" rel="nofollow noreferrer">this file</a>. Same thing, but reencoded in HEVC (which FCPX supports). Only now</p>
  
  <ol>
  <li>You can't drag/import the file into FCPX (won't let you)</li>
  <li>If you have an .fcpxml file that refers to such a file, the session will be imported but instead of audio/video you'll get the "missing plugin" placeholder.</li>
  <li>Quicktime player refuses to preview/open the file</li>
  </ol>
  
  <p>Any HEVC file created with, say, an iPhone can be readily previewed in qt and imported into FCPX. Both Adobe Premiere and VLC open and play the file just fine (though I now see that firefox just plays the audio, and does not render the video... download the file if you want to play with it).</p>
  
  <p>Given that HEVC is a <em>standard</em>, can someone tell me</p>
  
  <ul>
  <li>Why does FCPX refuse to open the file? </li>
  <li>Is there some special joo-joo in Apple's HVEC files that is needed? What?</li>
  <li>Is it possible to generate such a file with, say, ffmpeg, or is it only possible through AVFoundation or similar?</li>
  </ul>
  
  <p>BTW, this is with FCPX 10.4.6, QT player 10.5, on OSX 10.14.4.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-04-09T20:51:36.463Z
Comments.Text: "why" is not really a good question here. The answer is just that standards are not consistently applied. Especially with organisations like Apple.
Comments.UserDisplayName: Dr Mayhem
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-04-10T06:32:54.330Z
Comments.Text: Apple s/w are fussy about codec tags. Share the log of `ffmpeg -i OpensInFCP.mp4`
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-04-10T12:41:37.880Z
Comments.Text: Ok, I recorded a video with my phone, and produced [this output](https://descript-public.s3.amazonaws.com/so_question_data/h265_vs_fcpx/hvec_from_iphone.txt) with ffprobe (which produces the same info as ffmpeg). I did try copying the file level metadata (com.apple.quicktime.X) to no avail, though. Are the Core Media Metadata streams the secret, then?
Comments.UserDisplayName: Juan Pablo
Tags: <h.264><fcpx><hevc><apple>
Title: What's special about Apple-device generated HEVC files that (apparently) x265 can't produce?
UserDisplayName: Juan Pablo
ThreadText: # What's special about Apple-device generated HEVC files that (apparently) x265 can't produce?
  
  (Asked by: username_0 on 2019-04-09)
  
  Take [this file](https://descript-public.s3.amazonaws.com/so_question_data/h265_vs_fcpx/hank_vlog_orig_short.mp4), the first 10s of [Hank Green's "editing challenge"](https://youtu.be/zoy-x9VBhVc). It is H264 video + AAC audio. You can take that file and import it into Final Cut Pro X (FCPX for short), and edit it to your heart's content.
  
  Now, take that file, and convert it using ffmpeg, like so:
  
  `ffmpeg -i hank_vlog_orig_short.mp4 -c:v libx265 -c:a copy hank_vlog_orig_short_hvec.mp4`
  
  ...which produces [this file](https://descript-public.s3.amazonaws.com/so_question_data/h265_vs_fcpx/hank_vlog_orig_short_hevc.mp4). Same thing, but reencoded in HEVC (which FCPX supports). Only now
  
  1. You can't drag/import the file into FCPX (won't let you)
  2. If you have an .fcpxml file that refers to such a file, the session will be imported but instead of audio/video you'll get the "missing plugin" placeholder.
  3. Quicktime player refuses to preview/open the file
  
  Any HEVC file created with, say, an iPhone can be readily previewed in qt and imported into FCPX. Both Adobe Premiere and VLC open and play the file just fine (though I now see that firefox just plays the audio, and does not render the video... download the file if you want to play with it).
  
  Given that HEVC is a *standard*, can someone tell me
  
  * Why does FCPX refuse to open the file?
  * Is there some special joo-joo in Apple's HVEC files that is needed? What?
  * Is it possible to generate such a file with, say, ffmpeg, or is it only possible through AVFoundation or similar?
  
  BTW, this is with FCPX 10.4.6, QT player 10.5, on OSX 10.14.4.
  
  **Tags:** h.264, fcpx, hevc, apple
  
  > **Comments:**
  > **username_1**: "why" is not really a good question here. The answer is just that standards are not consistently applied. Especially with organisations like Apple.  
  > **username_2**: Apple s/w are fussy about codec tags. Share the log of `ffmpeg -i OpensInFCP.mp4`  
  > **username_0**: Ok, I recorded a video with my phone, and produced [this output](https://descript-public.s3.amazonaws.com/so_question_data/h265_vs_fcpx/hvec_from_iphone.txt) with ffprobe (which produces the same info as ffmpeg). I did try copying the file level metadata (com.apple.quicktime.X) to no avail, though. Are the Core Media Metadata streams the secret, then?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2019-04-10. Score: 4 | Accepted answer
  
  Well. Turns out that if you read [this guide](https://developer.apple.com/documentation/http_live_streaming/hls_authoring_specification_for_apple_devices?language=objc) for HLS streams, it gives a bunch of details on how the actual video formats should be set up. In particular, for HEVC, it says:
  
  > 1.10. You SHOULD use video formats in which the parameter sets are stored in the > sample descriptions, rather than the samples. (i.e., Use ‘avc1’, ‘hvc1’, or
  > ‘dvh1’ rather than ‘avc3’, ‘hev1’, or ‘dvhe’.)
  
  So I thought I could give it a shot.
  
  ffmpeg, by default, uses hev1. So if I take my previous command line and add `-tag:v hvc1`:
  
  `ffmpeg -i hank_vlog_orig_short.mp4 -c:v libx265 -c:a copy -tag:v hvc1 hank_vlog_orig_short_hvec.mp4`
  
  Presto, it works.
  
  
  ---
  
  