Answers.Body: <p>If you don't have a high-bit-depth video card and monitor, you then you can just make a temporary lossless file for viewing that will put the same pixels on your monitor:</p>
  
  <pre><code>ffmpeg -i input.mp4 -codec copy -pix_fmt yuv420p -c:v libx264 -qp 0 -preset ultrafast -movflags +faststart output.mp4
  </code></pre>
  
  <p>or <code>-c:v utvideo</code> might be faster to encode.</p>
  
  <p>Or if you have a fast enough storage setup, <code>-c:v yuv4</code> (raw yuv420 planar).  You may need to put that in an mkv container, if ffmpeg can't mux that into an mp4.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-01-15T11:44:20.813Z
Answers.LastActivityDate: 2015-01-15T11:44:20.813Z
Answers.UserDisplayName: Peter Cordes
Answers.Body: <p>No this is not possible. Looking at this theoretically disregarding the codec you can not take away information and call it lossless, thats already a terminology problem.</p>
  
  <p>Applying a new color space without transcoding is also not possible
  It's not so easy to say whether this is even possible with certain codecs other than h264, it really depends on how you define certain terminology.</p>
  
  <p>Regarding h264 its simply not possible in the way the codec works, color information is essential in how the codec encodes frames as its based on motion estimation and the color information between frames is what defines the in between frames that don't hold the information of a whole frame but only the differences between keyframes.
  So just applying different color values to each existing pixel is not really possible. It would result in major artifacts.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-07-20T16:34:54.207Z
Answers.LastActivityDate: 2014-07-20T16:53:28.087Z
Answers.LastEditDate: 2014-07-20T16:53:28.087Z
Answers.UserDisplayName: timonsku
Body: <p>I have an mp4 movie, containing an <code>h264</code> video stream (pixel format <code>yuv420p10le</code>), and an <code>AAC</code> audio stream.</p>
  
  <p>My favorite player cannot read the <code>yuv420p10le</code> pixel format. I was wondering if it is possible to convert losslessly the pixel format of the movie from <code>yuv420p10le</code> to <code>yuv420p</code>. More specifically, is it <em>possible</em> (theoretically speaking), and if so, can any program do it and how?</p>
  
  <p>I've tried the following with <code>ffmpeg</code>, but it does not work:</p>
  
  <pre><code>ffmpeg -i super_movie.mp4 -vcodec copy -acodec copy -pix_fmt yuv420p super_movie_yuv420p.mp4
  </code></pre>
  
  <p>Thanks in advance for any help.</p>
  
Tags: <ffmpeg>
Title: Lossless conversion of yuv420p10le to yuv420p
UserDisplayName: Frizlab
ThreadText: # Lossless conversion of yuv420p10le to yuv420p
  
  (Asked by: username_0 on 2014-07-20)
  
  I have an mp4 movie, containing an `h264` video stream (pixel format `yuv420p10le`), and an `AAC` audio stream.
  
  My favorite player cannot read the `yuv420p10le` pixel format. I was wondering if it is possible to convert losslessly the pixel format of the movie from `yuv420p10le` to `yuv420p`. More specifically, is it *possible* (theoretically speaking), and if so, can any program do it and how?
  
  I've tried the following with `ffmpeg`, but it does not work:
  
  ```
  ffmpeg -i super_movie.mp4 -vcodec copy -acodec copy -pix_fmt yuv420p super_movie_yuv420p.mp4
  
  ```
  
  Thanks in advance for any help.
  
  **Tags:** ffmpeg
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2014-07-20. Score: 7 | Accepted answer
  
  No this is not possible. Looking at this theoretically disregarding the codec you can not take away information and call it lossless, thats already a terminology problem.
  
  Applying a new color space without transcoding is also not possible
  It's not so easy to say whether this is even possible with certain codecs other than h264, it really depends on how you define certain terminology.
  
  Regarding h264 its simply not possible in the way the codec works, color information is essential in how the codec encodes frames as its based on motion estimation and the color information between frames is what defines the in between frames that don't hold the information of a whole frame but only the differences between keyframes.
  So just applying different color values to each existing pixel is not really possible. It would result in major artifacts.
  
  
  ---
  
  ### Answer by username_1 on 2015-01-15. Score: 3
  
  If you don't have a high-bit-depth video card and monitor, you then you can just make a temporary lossless file for viewing that will put the same pixels on your monitor:
  
  ```
  ffmpeg -i input.mp4 -codec copy -pix_fmt yuv420p -c:v libx264 -qp 0 -preset ultrafast -movflags +faststart output.mp4
  
  ```
  
  or `-c:v utvideo` might be faster to encode.
  
  Or if you have a fast enough storage setup, `-c:v yuv4` (raw yuv420 planar). You may need to put that in an mkv container, if ffmpeg can't mux that into an mp4.
  
  
  ---
  
  