Answers.Body: <p>Use</p>
  
  <pre><code>ffmpeg -i in.MOV -an -vcodec rawvideo -pix_fmt yuv420p rawbitstream.yuv
  
  ffmpeg -s 640x480 -i rawbitstream.yuv -vf select="not(mod(n+1\,2))" -c:v rawvideo -vsync 0 -an even.yuv
  
  ffmpeg -f rawvideo -s 640x480 -pix_fmt yuv420p -i even.yuv -c:v libx264 -preset ultrafast -profile:v high -qp 1 even.mp4
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-04-30T19:45:52.950Z
Answers.Text: Thanks a lot. I would like also to understand what is -qp and how it works. Hard to find info about it.
Answers.UserDisplayName: R S
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-05-01T07:17:42.990Z
Answers.Text: Quantization parameter. It controls how the raw coefficients - the error residuals - are transformed. You need to wade into DSP for the details - see https://en.wikipedia.org/wiki/Quantization_(image_processing)
Answers.UserDisplayName: Gyan
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-04-30T16:44:00.553Z
Answers.LastActivityDate: 2018-04-30T16:44:00.553Z
Answers.UserDisplayName: Gyan
Body: <p>I tried consequentially commands below. On output I'm getting video with a mess (even.mp4).</p>
  
  <pre><code>ffmpeg -i in.MOV -an -vcodec rawvideo -pix_fmt yuv420p rawbitstream.yuv
  
  ffmpeg -r 2 -s 640x480 -i rawbitstream.yuv -vf select="not(mod(n-1\,2))" -c:v rawvideo -r 1 -format rawvideo -pix_fmt yuv420p -an even.yuv
  
  ffmpeg -f rawvideo -vcodec rawvideo -s 640x480 -r 25 -pix_fmt yuv420p -i even.yuv -c:v libx264 -preset ultrafast -qp 0 even.mp4
  </code></pre>
  
  <p><a href="https://i.sstatic.net/DMuje.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/DMuje.jpg" alt="enter image description here"></a></p>
  
  <p>Here is <a href="https://drive.google.com/open?id=1SQEPPZGB4ogf6cbczejbiyTdwK-1twfm" rel="nofollow noreferrer">full log</a>.
  Video files are <a href="https://drive.google.com/open?id=1YfIwWo4FloOONNA8Fw05czAmWg3K__ei" rel="nofollow noreferrer">here</a>.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-04-29T19:16:03.290Z
Comments.Text: Share full log of commands
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-04-29T19:30:07.537Z
Comments.Text: @Gyan see above.
Comments.UserDisplayName: R S
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-04-29T19:42:11.560Z
Comments.Text: How are you playing the output? Can you share the input?
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-04-29T21:37:12.983Z
Comments.Text: @Gyan See the link above. Before I tried to play it with VLC (mess), but it worked in Parole Media Player.
Comments.UserDisplayName: R S
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-04-30T05:17:45.500Z
Comments.Text: So, the issue is with the profile. Do you need lossless?
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-04-30T09:25:40.680Z
Comments.Text: @Gyan I would like do not lose quality of original video.
Comments.UserDisplayName: R S
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-04-30T10:50:35.020Z
Comments.Text: Lossless is unnecessary and most players can't play it.
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-04-30T12:45:18.307Z
Comments.Text: @Gyan got it, could you provide answer with edited command(s) ?
Comments.UserDisplayName: R S
Tags: <ffmpeg><editing><conversion><raw>
Title: ffmpeg. Converting through rawbitstream results to noise
UserDisplayName: R S
ThreadText: # ffmpeg. Converting through rawbitstream results to noise
  
  (Asked by: username_0 on 2018-04-29)
  
  I tried consequentially commands below. On output I'm getting video with a mess (even.mp4).
  
  ```
  ffmpeg -i in.MOV -an -vcodec rawvideo -pix_fmt yuv420p rawbitstream.yuv
  
  ffmpeg -r 2 -s 640x480 -i rawbitstream.yuv -vf select="not(mod(n-1\,2))" -c:v rawvideo -r 1 -format rawvideo -pix_fmt yuv420p -an even.yuv
  
  ffmpeg -f rawvideo -vcodec rawvideo -s 640x480 -r 25 -pix_fmt yuv420p -i even.yuv -c:v libx264 -preset ultrafast -qp 0 even.mp4
  
  ```
  
  [![enter image description here](https://i.sstatic.net/DMuje.jpg)](https://i.sstatic.net/DMuje.jpg)
  
  Here is [full log](https://drive.google.com/open?id=1SQEPPZGB4ogf6cbczejbiyTdwK-1twfm).
  Video files are [here](https://drive.google.com/open?id=1YfIwWo4FloOONNA8Fw05czAmWg3K__ei).
  
  **Tags:** ffmpeg, editing, conversion, raw
  
  > **Comments:**
  > **username_1**: Share full log of commands  
  > **username_0**: @username_1 see above.  
  > **username_1**: How are you playing the output? Can you share the input?  
  > **username_0**: @username_1 See the link above. Before I tried to play it with VLC (mess), but it worked in Parole Media Player.  
  > **username_1**: So, the issue is with the profile. Do you need lossless?  
  > **username_0**: @username_1 I would like do not lose quality of original video.  
  > **username_1**: Lossless is unnecessary and most players can't play it.  
  > **username_0**: @username_1 got it, could you provide answer with edited command(s) ?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-04-30. Score: 1 | Accepted answer
  
  Use
  
  ```
  ffmpeg -i in.MOV -an -vcodec rawvideo -pix_fmt yuv420p rawbitstream.yuv
  
  ffmpeg -s 640x480 -i rawbitstream.yuv -vf select="not(mod(n+1\,2))" -c:v rawvideo -vsync 0 -an even.yuv
  
  ffmpeg -f rawvideo -s 640x480 -pix_fmt yuv420p -i even.yuv -c:v libx264 -preset ultrafast -profile:v high -qp 1 even.mp4
  
  ```
  
  > **Comments:**
  > **username_0**: Thanks a lot. I would like also to understand what is -qp and how it works. Hard to find info about it.  
  > **username_1**: Quantization parameter. It controls how the raw coefficients - the error residuals - are transformed. You need to wade into DSP for the details - see https://en.wikipedia.org/wiki/Quantization_(image_processing)  
  
  ---
  
  