VideoHelp Forum




+ Reply to Thread
Results 1 to 9 of 9
  1. Hi folks,
    I need some help with compressing a very large 4K video. I have a Plex server with a ton of content from over the years. One particular title is an old HBO TV movie that was never released to Blu-Ray. I have the original recording (the best quality of it that is publicly available, same quality as on Max). It had two issues: weird juddery frame rate, and low quality. The quality is simply due to being an old TV movie, but the recording is reference quality of the original. The original movie is 59.94 FPS (Apple TV also shows this when streaming it from Max) however when you scrub through, there is a new frame perhaps every 2-3 frames, but the pattern is uneven.

    I used ffmpeg's mpdecimate command to remove the duplicate frames. I then used Topaz AI to upscale it to 4K. It now looks tremendous and plays smoothly. The problem is that this file is almost 200GB, far too big for a movie; it needs compression to get to the normal 50 GB range.

    Usually after using Topaz AI I use an ffmpeg command to compress it near lossless visually to get it to a normal 4K movie size. The problem is my ffmpeg command (and any changes I make) are resulting in duplicate frames in the output, as well as colors that are a bit flatter than the original Topaz AI output. I tried 59.940 and 60000/1001 for frame rate, both resulted in some duplicate frames in the output. I tried putting bt709 metadata in the command and not, both resulted in worse colors than the Topaz AI output.

    Here is the MediaInfo of the Topaz AI output. Could someone please help with an ffmpeg command that can compress this down to normal size while not affecting the frame rate (adding duplicate frames) or colors?

    Thanks.

    MediaInfo:
    Code:
    Video
    ID                                       : 1
    Format                                   : AVC
    Format/Info                              : Advanced Video Codec
    Format profile                           : High@L5.2
    Format settings                          : CABAC / 3 Ref Frames
    Format settings, CABAC                   : Yes
    Format settings, Reference frames        : 3 frames
    Format settings, GOP                     : M=1, N=30
    Codec ID                                 : V_MPEG4/ISO/AVC
    Duration                                 : 1 h 41 min
    Bit rate mode                            : Variable
    Bit rate                                 : 271 Mb/s
    Maximum bit rate                         : 120 Mb/s
    Width                                    : 3 840 pixels
    Height                                   : 2 160 pixels
    Display aspect ratio                     : 16:9
    Frame rate mode                          : Variable
    Original frame rate                      : 59.940 FPS
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Scan type                                : Progressive
    Stream size                              : 192 GiB (97%)
    Default                                  : No
    Forced                                   : No
    Color range                              : Limited
    Matrix coefficients                      : BT.709
    Last edited by Boxcart; 31st May 2025 at 10:14.
    Quote Quote  
  2. have you tried: Clever-FFmpeg-GUI ?
    there might be few settings you can try.

    You can also re-post here: forum
    Quote Quote  
  3. Originally Posted by videoAI View Post
    have you tried: Clever-FFmpeg-GUI ?
    there might be few settings you can try.

    You can also re-post here: forum
    I tried that and it wasn't any better than using ffmpeg alone. It looks like when I use ffmpeg to try and compress the video, the new video gets frame duplication in this pattern (this frame duplication is not present in the Topaz AI upscale raw output):

    - New frame
    - New frame
    - New frame
    - Duplicate frame
    - New frame
    - New frame
    - New frame
    - Duplicate frame
    - etc.

    Here is the ffmpeg command I used:

    Code:
    ffmpeg -i TopazAIOutput.mkv -c:a copy -c:v hevc_nvenc -b:v 70M -bufsize:v 120M -maxrate 80M -minrate 60M -g 4 -s 3840x2160 CompressedUpscale.mkv
    Here is the MediaInfo of the compressed video generated using this command (the MediaInfo of the original Topaz AI upscale video (input) is in the original post):

    Code:
    Video
    ID                                       : 1
    Format                                   : HEVC
    Format/Info                              : High Efficiency Video Coding
    Format profile                           : Main@L5.1@High
    Codec ID                                 : V_MPEGH/ISO/HEVC
    Duration                                 : 1 h 41 min
    Bit rate                                 : 23.9 Mb/s
    Width                                    : 3 840 pixels
    Height                                   : 2 160 pixels
    Display aspect ratio                     : 16:9
    Frame rate mode                          : Variable
    Original frame rate                      : 59.940 FPS
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Stream size                              : 16.9 GiB (87%)
    Writing library                          : Lavc62.1.102 hevc_nvenc
    Default                                  : No
    Forced                                   : No
    Color range                              : Limited
    Matrix coefficients                      : BT.709
    Here is the MediaInfo of the output video using Clever-FFmpeg-GUI to compress:

    Code:
    Video
    ID                                       : 1
    Format                                   : HEVC
    Format/Info                              : High Efficiency Video Coding
    Format profile                           : Main 10@L5.1@Main
    Codec ID                                 : V_MPEGH/ISO/HEVC
    Duration                                 : 1 h 41 min
    Bit rate                                 : 5 565 kb/s
    Width                                    : 3 840 pixels
    Height                                   : 2 160 pixels
    Display aspect ratio                     : 16:9
    Frame rate mode                          : Constant
    Frame rate                               : 59.940 (60000/1001) FPS
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Bits/(Pixel*Frame)                       : 0.011
    Stream size                              : 3.93 GiB (98%)
    Writing library                          : Lavc62.1.102 hevc_nvenc
    Default                                  : No
    Forced                                   : No
    Color range                              : Limited
    Color primaries                          : BT.709
    Transfer characteristics                 : BT.709
    Matrix coefficients                      : BT.709
    Here are the settings I used in Clever-FFmpeg-GUI for this:
    Image
    [Attachment 87221 - Click to enlarge]


    The ffmpeg GUI output file has worse frame duplication, in this pattern (which might just be random):
    - New frame
    - Duplicate frame
    - New frame
    - Duplicate frame
    - New frame
    - Duplicate frame
    - Duplicate frame
    - New frame
    - Duplicate frame
    - Duplicate frame
    - New frame
    - Duplicate frame
    - Duplicate frame
    - New frame
    - New frame
    ...
    Quote Quote  
  4. Try posting this message in the Clever GUI forum [link below]

    Originally Posted by videoAI View Post
    have you tried: Clever-FFmpeg-GUI ?
    there might be few settings you can try.

    You can also re-post here: forum
    Quote Quote  
  5. Originally Posted by videoAI View Post
    Try posting this message in the Clever GUI forum [link below]

    Originally Posted by videoAI View Post
    have you tried: Clever-FFmpeg-GUI ?
    there might be few settings you can try.

    You can also re-post here: forum
    I don't see why ffmpeg alone can't do it. I've never had an issue with ffmpeg and commands before. I'm not familiar with that GUI.
    Quote Quote  
  6. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    It's possible the "-g 4" is messing it up. Try taking it out
    Quote Quote  
  7. @Boxcart

    It wasn't my intention to get you to use a tool other than FFMPEG which it is clear that you are already comfortable using.

    Since this forum doesn't have an official FFMPEG support thread, I wanted to point you to another thread where a
    lot of advanced FFMPEG users hang out (including ProWo, Developer of the GUI) in the hopes that one or more of them
    can help you out with your issue.

    I also suggested the GUI because it supports advanced FFMPEG features, and Avisynth scripts, which may be required to
    eliminate the duplicate frames issue. The tool also support changes to color spaces and color ranges (you mentioned issues
    with color).

    Good luck in resolving your issue ..

    Originally Posted by Boxcart View Post

    I don't see why ffmpeg alone can't do it. I've never had an issue with ffmpeg and commands before. I'm not familiar with that GUI.
    Quote Quote  
  8. Originally Posted by davexnet View Post
    It's possible the "-g 4" is messing it up. Try taking it out
    Thanks this solved it. I use that because it creates more keyframes which helps with cutting and remuxing in MKVToolNix but didn't realize it can create duplicate frames.
    Quote Quote  
  9. Originally Posted by videoAI View Post
    @Boxcart

    It wasn't my intention to get you to use a tool other than FFMPEG which it is clear that you are already comfortable using.

    Since this forum doesn't have an official FFMPEG support thread, I wanted to point you to another thread where a
    lot of advanced FFMPEG users hang out (including ProWo, Developer of the GUI) in the hopes that one or more of them
    can help you out with your issue.

    I also suggested the GUI because it supports advanced FFMPEG features, and Avisynth scripts, which may be required to
    eliminate the duplicate frames issue. The tool also support changes to color spaces and color ranges (you mentioned issues
    with color).

    Good luck in resolving your issue ..

    Originally Posted by Boxcart View Post

    I don't see why ffmpeg alone can't do it. I've never had an issue with ffmpeg and commands before. I'm not familiar with that GUI.
    No worries, thanks
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!