video compression quality

#7
by legenerateur - opened

Hey man I really appreciate your tool. Its been working very well for me for video shot against a cyc wall. Is there away I can adjust one of the text files to increase the quality of the output video file. I keep having issues with strong compression artifacts.

hi @legenerateur . im sorry i cant fully understand what you meant, but the result video quality and resolution should stay the same as original video on "Normal" mode, but it may decrease on "Fast" mode because of its processing precision.

Thanks for your reply. Sorry if i was unclear. I was trying to see if i could increase the bitrate of the video encoder. I think you are using ffmpeg. I could be totally wrong about this. I think it might be possible to increase the bit rate for the compression so it looks less jpg'd. I am using 4k Arri footage and I think the bit rate on the exported finished video is not high enough bit rate for footage of this rez. This guy's post is talking about the same issue I am having but he is just using ffmpeg alone and not with RVB. I thought seeing his pictures might help be clearer what i'm asking about. https://stackoverflow.com/questions/63460919/how-to-improve-the-output-video-quality-with-ffmpeg-and-h264-videotoolbox-flag

BTW it works with the 4k footage great on my little rtx2080. Thanks again for your great project.

hi again. i did some research about this since it was not happening for me, (maybe because my test videos didnt had high bitrate) and i found some solutions that may fix your problem:

  1. im not using ffmpeg, but you can combine ffmpeg with open cv, Like this guy:
    https://stackoverflow.com/questions/38686359/opencv-videowriter-control-bitrate (pretty similar approaches but not same as your code)

  2. you said "increase the bit rate for the compression so it looks less jpg'd", this can be changed with VIDEOWRITER_PROP_QUALITY (0 - 100) and you can set it like this:
    writer.set(VIDEOWRITER_PROP_QUALITY, 100)
    as described here: https://docs.opencv.org/3.4/d4/d15/group__videoio__flags__base.html#ga41c5cfa7859ae542b71b1d33bbd4d2b4

  3. this opencv approach on the current code saves the video with H.264 format by extracting input video frames one by one and then removing their background and putting them together as a new video. so there is a chance that if your input video is on H.265, by converting it to H.264 (you can achieve that with ffmpeg) and then giving it to this code the result gets better

amirgame197 changed discussion status to closed

Sign up or log in to comment