Answers.Body: <p>Conversion always will involve <em>some</em> loss, only copy (-c) is lossless. </p>
  
  <p>There are some suggestions for "lossless" encoding in this <a href="https://stackoverflow.com/questions/6701805/h264-lossless-coding">Q&amp;A</a>, but I can't test them on my phone. There are UpVoted and have an accepted answer: the intermediate and output file will be uncompressed, and huge.</p>
  
  <p>You can minimize loss when converting your <strong>existing</strong> videos by choosing an excessively high bitrate, since it's a cellphone video it will be of a limited length and thus only expand so much. </p>
  
  <p>The <a href="http://trac.ffmpeg.org/wiki/Encode/H.264#LosslessH.264" rel="nofollow noreferrer">ffmpeg H.264 Video Encoding Guide</a> claims to offer lossless encoding using the <code>-crf 0</code> command. It also mentions that you should expect incompatibility problems with some programs.</p>
  
  <p>The section: <strong>Choose a CRF value</strong> says:</p>
  
  <blockquote>
    <p>The range of the CRF scale is 0–51, where 0 is lossless, 23 is the default, and 51 is worst quality possible. A lower value generally leads to higher quality, and a subjectively sane range is 17–28. Consider 17 or 18 to be visually lossless or nearly so; it should look the same or nearly the same as the input but it isn't technically lossless. </p>
  </blockquote>
  
  <p>Using '0' isn't so much a "conversion" as it is a decompression and wrapping up the uncompressed video, the so-called converted video isn't recompressed.</p>
  
  <p>You can correct the <em>problem</em> at it's source (in future) by:</p>
  
  <p>On your iPhone, go to Settings > Camera > Formats > change "High Efficiency" to "Most Compatible".</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-26T13:27:16.320Z
Answers.Text: *so-called converted video isn't recompressed* --> it is. The error residuals simply aren't quantized,
Answers.UserDisplayName: Gyan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-26T14:08:01.370Z
Answers.Text: Link to source?
Answers.UserDisplayName: Rob
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-26T15:11:50.653Z
Answers.Text: http://x265.readthedocs.io/en/default/lossless.html
Answers.UserDisplayName: Gyan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-26T17:28:03.640Z
Answers.Text: @Gyan - Thanks for providing a link. **That** link is for MulticoreWare's x265 and not ffmpeg's implementation. On our site [SuperUser](https://superuser.com/questions/1054268/lossless-video-using-ffmpeg-ffv1-on-jpeg-images-is-not-compressed-but-expanded) a user reports a +3x **expansion** of input vs. output, if you obtain a tiny bit of compression over **raw** that doesn't help much when the end result is +3x bigger (for *that* particular example). Here's a [second example](https://superuser.com/questions/976230/how-to-correctly-use-x265-lossless-parameter-with-avconv), also bigger.
Answers.UserDisplayName: Rob
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-26T17:47:17.810Z
Answers.Text: The `0` CRF value you're referring to is for x264. x265 started with x264's codebase. There is no ffmpeg implementation of x264 or x265. They use those encoders via a wrapper. Lossless compression is always in reference to the uncompressed full raster frames. Any historical compressed version of those images are irrelevant. The result turns out bigger because much of the lossiness shows up as 'noise' during prediction and the lossless encoder can't throw those differences away, unlike lossy compressors.
Answers.UserDisplayName: Gyan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-27T16:27:49.977Z
Answers.Text: Using High efficiency as it can record up to 40% more footage on iPhone vs h264. On desktop I do not mind any file size after conversion. Please write a command to test it out. HEVC from iphonex is around 24000kbps.
Answers.UserDisplayName: Azz Kawa
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-27T17:43:18.277Z
Answers.Text: @AzzKawa - Both links in the answer have commands described at length.
Answers.UserDisplayName: Rob
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-26T04:10:02.293Z
Answers.LastActivityDate: 2018-05-26T04:10:02.293Z
Answers.UserDisplayName: Rob
Body: <p>Looking for a ffmpeg command that would convert IphoneX HEVC 4K 25fps videos to any format that will work on PC - PremierePro and keep it lossless.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-05-31T18:43:35.740Z
Comments.Text: Why not just directly import the HEVC file into Premiere Pro?
Comments.UserDisplayName: llogan
Tags: <ffmpeg><standards-converter><hevc>
Title: Loseless conversion from IphoneX HEVC for PC - PPro
UserDisplayName: Azz Kawa
ThreadText: # Loseless conversion from IphoneX HEVC for PC - PPro
  
  (Asked by: username_0 on 2018-05-24)
  
  Looking for a ffmpeg command that would convert IphoneX HEVC 4K 25fps videos to any format that will work on PC - PremierePro and keep it lossless.
  
  **Tags:** ffmpeg, standards-converter, hevc
  
  > **Comments:**
  > **username_1**: Why not just directly import the HEVC file into Premiere Pro?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2018-05-26. Score: 1 | Accepted answer
  
  Conversion always will involve *some* loss, only copy (-c) is lossless.
  
  There are some suggestions for "lossless" encoding in this [Q&A](https://stackoverflow.com/questions/6701805/h264-lossless-coding), but I can't test them on my phone. There are UpVoted and have an accepted answer: the intermediate and output file will be uncompressed, and huge.
  
  You can minimize loss when converting your **existing** videos by choosing an excessively high bitrate, since it's a cellphone video it will be of a limited length and thus only expand so much.
  
  The [ffmpeg H.264 Video Encoding Guide](http://trac.ffmpeg.org/wiki/Encode/H.264#LosslessH.264) claims to offer lossless encoding using the `-crf 0` command. It also mentions that you should expect incompatibility problems with some programs.
  
  The section: **Choose a CRF value** says:
  
  > The range of the CRF scale is 0–51, where 0 is lossless, 23 is the default, and 51 is worst quality possible. A lower value generally leads to higher quality, and a subjectively sane range is 17–28. Consider 17 or 18 to be visually lossless or nearly so; it should look the same or nearly the same as the input but it isn't technically lossless.
  
  Using '0' isn't so much a "conversion" as it is a decompression and wrapping up the uncompressed video, the so-called converted video isn't recompressed.
  
  You can correct the *problem* at it's source (in future) by:
  
  On your iPhone, go to Settings > Camera > Formats > change "High Efficiency" to "Most Compatible".
  
  > **Comments:**
  > **username_3**: *so-called converted video isn't recompressed* --> it is. The error residuals simply aren't quantized,  
  > **username_2**: Link to source?  
  > **username_3**: http://x265.readthedocs.io/en/default/lossless.html  
  > **username_2**: @username_3 - Thanks for providing a link. **That** link is for MulticoreWare's x265 and not ffmpeg's implementation. On our site [SuperUser](https://superuser.com/questions/1054268/lossless-video-using-ffmpeg-ffv1-on-jpeg-images-is-not-compressed-but-expanded) a user reports a +3x **expansion** of input vs. output, if you obtain a tiny bit of compression over **raw** that doesn't help much when the end result is +3x bigger (for *that* particular example). Here's a [second example](https://superuser.com/questions/976230/how-to-correctly-use-x265-lossless-parameter-with-avconv), also bigger.  
  > **username_3**: The `0` CRF value you're referring to is for x264. x265 started with x264's codebase. There is no ffmpeg implementation of x264 or x265. They use those encoders via a wrapper. Lossless compression is always in reference to the uncompressed full raster frames. Any historical compressed version of those images are irrelevant. The result turns out bigger because much of the lossiness shows up as 'noise' during prediction and the lossless encoder can't throw those differences away, unlike lossy compressors.  
  > **username_0**: Using High efficiency as it can record up to 40% more footage on iPhone vs h264. On desktop I do not mind any file size after conversion. Please write a command to test it out. HEVC from iphonex is around 24000kbps.  
  > **username_2**: @username_0 - Both links in the answer have commands described at length.  
  
  ---
  
  