<p>I would like to apply some kind of super-resolution (SR) to the keyframes in an H.264 video. The SR process should target the keyframes and upscale them by a factor of 2.</p>

<p>For the past few days, I've been trying to see where can I hold the key frame, in the C src code, in order to scale it. I'm confused whether to apply the scaling in the parsing packet part, or in the decoding part.</p>

<p>I also don't know if upscaling the B &amp; P frames would be enough to not damage the video frames.</p>

<p>I hope you guide me as there are no sufficient documentation about FFmpeg. If you have any suggestions please let me know.</p>

<p>Thank you!</p>

CC BY-SA 4.0
2019-02-07T18:41:21.877Z
hemoali - I think what gyan is saying is that you have no other option.
Dr Mayhem
CC BY-SA 4.0
2019-01-26T05:01:05.327Z
Scaling and other pixel operations operate upon raster data i.e. decoded frames. So you to decode and encode again. I don't think this will turn out as you expect.
Gyan
CC BY-SA 4.0
2019-01-26T11:21:19.660Z
I don't actually want to encode again. I want to display the decoded upscaled frames only.
Ibrahim Radwan
<ffmpeg><codec><keyframes><scale><decoding>
Upscale the key frames while decoding!
Ibrahim Radwan
# Upscale the key frames while decoding!

(Asked by: username_0 on 2019-01-25)

I would like to apply some kind of super-resolution (SR) to the keyframes in an H.264 video. The SR process should target the keyframes and upscale them by a factor of 2.

For the past few days, I've been trying to see where can I hold the key frame, in the C src code, in order to scale it. I'm confused whether to apply the scaling in the parsing packet part, or in the decoding part.

I also don't know if upscaling the B & P frames would be enough to not damage the video frames.

I hope you guide me as there are no sufficient documentation about FFmpeg. If you have any suggestions please let me know.

Thank you!

**Tags:** ffmpeg, codec, keyframes, scale, decoding

> **Comments:**
> **username_2**: Scaling and other pixel operations operate upon raster data i.e. decoded frames. So you to decode and encode again. I don't think this will turn out as you expect.  
> **username_0**: I don't actually want to encode again. I want to display the decoded upscaled frames only.  
> **username_1**: hemoali - I think what gyan is saying is that you have no other option.  

---

## 0 answers

