Answers.Body: <p>The solution at question &quot; <a href="https://video.stackexchange.com/q/21431/33429">Lower framerate without re-encode</a> &quot; looks promising:</p>
  <pre><code>ffmpeg -discard nokey -i input.mp4 -c copy -vsync 0 I-only.mp4
  </code></pre>
  <p>By manpage there should be 5 levels of frame discarding: none, noref, bidir, nokey, all.</p>
  <p>I tested this with older ffmpeg 4.2.4 and h265 and it had no effect. Probably not implemented yet.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-01-04T08:48:07.803Z
Answers.Text: Comment for the OP question (can't comment yet):  I came looking for the same thing. I need to play 1920x1080@60 files on a hardware player that can't effectively drop frames. I don't want to buy a new box just because people started sending me unnecessarily high quality files.
Answers.UserDisplayName: user185953
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-01-04T08:52:49.750Z
Answers.Text: It is just a matter of time when people start sending me 4k. Do you think it is technically possible to do something like this for halving the resolution?
Answers.UserDisplayName: user185953
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-01-05T11:09:51.303Z
Answers.Text: I personally think it's technically possible (and feasible) to halve the framerate and/or the resolution without a full re-encode, by analyzing and transforming the already encoded data, in much the same way as JPEG files can be rotated by 90 degrees and/or mirrored without re-encoding, or MP3 files could have their volume normalized without a full re-encode. Whether such a tool already exist is another question. I personally bought new hardware, so this question is not relevant to me anymore, but I'll keep it open because if there is a solution, it can be useful to others.
Answers.UserDisplayName: Tobia
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-01-04T08:41:38.653Z
Answers.LastActivityDate: 2021-01-04T11:09:03.530Z
Answers.LastEditDate: 2021-01-04T11:09:03.530Z
Answers.UserDisplayName: user185953
Answers.Body: <p>I think the term for this effort is <a href="https://liu.diva-portal.org/smash/get/diva2:1237211/FULLTEXT01.pdf" rel="nofollow noreferrer">statistical multiplexing</a> where your proposed framework would be an efficient implementation thereof.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-12-27T16:39:20.187Z
Answers.LastActivityDate: 2020-12-27T16:39:20.187Z
Answers.UserDisplayName: Skinkie
Body: <p>Is there any tool that can manipulate / transcode h264 or h265 video streams throwing away approximately half of the frames, without performing a full re-encode?</p>
  <p>I'm thinking it would be theoretically possible to preserve motion vectors and such computed data, preserve all I-frames, and just throw away approximately half of the B- and P-frames (possibly adjusting the remaining ones.) The result does not need to be CFR.</p>
  <p>Is there a way to do this with ffmpeg? (or any other tool)</p>
  
Tags: <ffmpeg><framerate><transcoding>
Title: Halve framerate without complete re-encoding
UserDisplayName: Tobia
ThreadText: # Halve framerate without complete re-encoding
  
  (Asked by: username_0 on 2020-12-22)
  
  Is there any tool that can manipulate / transcode h264 or h265 video streams throwing away approximately half of the frames, without performing a full re-encode?
  
  I'm thinking it would be theoretically possible to preserve motion vectors and such computed data, preserve all I-frames, and just throw away approximately half of the B- and P-frames (possibly adjusting the remaining ones.) The result does not need to be CFR.
  
  Is there a way to do this with ffmpeg? (or any other tool)
  
  **Tags:** ffmpeg, framerate, transcoding
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2021-01-04. Score: 1
  
  The solution at question " [Lower framerate without re-encode](https://video.stackexchange.com/q/21431/33429) " looks promising:
  
  ```
  ffmpeg -discard nokey -i input.mp4 -c copy -vsync 0 I-only.mp4
  
  ```
  
  By manpage there should be 5 levels of frame discarding: none, noref, bidir, nokey, all.
  
  I tested this with older ffmpeg 4.2.4 and h265 and it had no effect. Probably not implemented yet.
  
  > **Comments:**
  > **username_1**: Comment for the OP question (can't comment yet):  I came looking for the same thing. I need to play 1920x1080@60 files on a hardware player that can't effectively drop frames. I don't want to buy a new box just because people started sending me unnecessarily high quality files.  
  > **username_1**: It is just a matter of time when people start sending me 4k. Do you think it is technically possible to do something like this for halving the resolution?  
  > **username_0**: I personally think it's technically possible (and feasible) to halve the framerate and/or the resolution without a full re-encode, by analyzing and transforming the already encoded data, in much the same way as JPEG files can be rotated by 90 degrees and/or mirrored without re-encoding, or MP3 files could have their volume normalized without a full re-encode. Whether such a tool already exist is another question. I personally bought new hardware, so this question is not relevant to me anymore, but I'll keep it open because if there is a solution, it can be useful to others.  
  
  ---
  
  ### Answer by username_2 on 2020-12-27. Score: 0
  
  I think the term for this effort is [statistical multiplexing](https://liu.diva-portal.org/smash/get/diva2:1237211/FULLTEXT01.pdf) where your proposed framework would be an efficient implementation thereof.
  
  
  ---
  
  