VideoHelp Forum
+ Reply to Thread
Results 1 to 12 of 12
Thread
  1. hi, sorry for my bad English
    I have some video that takes up a lot of storage space
    I like to reduce the size of it
    I think 720p is a reasonable resolution between quality and video file size
    if the resolution is above 720p
    it will be converted to 720p

    I can show you the full code, but this line is the main issue:
    Code:
    ffmpeg -loglevel quiet -stats -y -hwaccel auto -i "%~1" -vf scale=-1:720 -c:v hevc_nvenc -preset slow "%~dpn1_720p.mp4"
    yes, there is no "-crf XX", once I tried using it and the video is "foggy"

    my first question is, any better command to make the video file size smaller without reducing video quality?
    If not, is there any command to make the "compressing" faster?

    anyway, now the AV1(some said it is H266) is released,
    I test it a year ago, it takes more resources and time than h265,
    but the compression is less than 265
    and my second question: is this AV1 now better than AV1 a year ago?
    can someone show the command?

    thank you for reading, have a nice day
    Quote Quote  
  2. 1. any recoding reduces the quality.
    2. forget about AV1, because very many players (eg TV) can not play it.
    3. you use hardware acceleration. This can limit the quality.
    4. use h264 (avc) or h265 (hevc), most of them can play it. With this you can reach even small files with good quality.
    (90 minutes movie 720p, with h264 900 Mb, with h265 650Mb)
    Quote Quote  
  3. Originally Posted by ProWo View Post
    1. any recoding reduces the quality.
    2. forget about AV1, because very many players (eg TV) can not play it.
    3. you use hardware acceleration. This can limit the quality.
    4. use h264 (avc) or h265 (hevc), most of them can play it. With this you can reach even small files with good quality.
    (90 minutes movie 720p, with h264 900 Mb, with h265 650Mb)
    thank you for reply,
    1. clear
    2. clear
    3. as you can see, my code using it
    4. have you the command?
    Quote Quote  
  4. [QUOTE=kucing;2684441]
    Originally Posted by ProWo View Post
    4. have you the command?
    For a movie, resized form 1920x800 to 1280x536, no hardware acceleration:
    ffmpeg.exe -y -i "input.mkv" -vf scale=1280:536 -map 0:0 -c:v libx264 -preset veryfast -crf 23 -aspect 2.39 -an -sn -dn "output.mkv"
    Quote Quote  
  5. Firstly your command line has basic errors, for modern video codecs working in 4:2:0 sampling scheme it is quite mandatory to expect video size as at least dividable by 2 (at least) without fraction. Secondly your command line has no information about desired bitrate or quality so some default value is used.

    Your command line shall be at least like this:
    Code:
    ffmpeg -loglevel quiet -stats -y -hwaccel auto -i "%~1" -vf scale=-2:720 -c:v hevc_nvenc -preset slow -b:v 8000k -c:a copy "%~dpn1_720p.mp4"
    NVidia recommendation for using HW accelerated NVEnc encoding are provided in: https://docs.nvidia.com/video-codec-sdk/ffmpeg-with-nvidia-gpu/index.html [Command Line for Latency-Tolerant High-Quality Transcoding]

    Command line example bellow:
    Code:
    ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -i input.mp4 -c:a copy -c:v h264_nvenc -preset p6 -tune hq -b:v 5M -bufsize 5M -maxrate 10M -qmin 0 -g 250 -bf 3 -b_ref_mode middle -temporal-aq 1 -rc-lookahead 20 -i_qfactor 0.75 -b_qfactor 1.1 output.mp4
    There are dedicated applications or at least gui's that can help you at the beginning of your journey with ffmpeg.
    Quote Quote  
  6. Older pc's doesnt behave good with h265. MKV and just h264 is better sometimes/ good quality on both types. But unfortunately, the only way to reduce size of the file is h265.
    Last edited by DVDLover00; 19th Mar 2023 at 05:46.
    Quote Quote  
  7. Originally Posted by pandy View Post
    Firstly your command line has basic errors, for modern video codecs working in 4:2:0 sampling scheme it is quite mandatory to expect video size as at least dividable by 2 (at least) without fraction. Secondly your command line has no information about desired bitrate or quality so some default value is used.

    Your command line shall be at least like this:
    Code:
    ffmpeg -loglevel quiet -stats -y -hwaccel auto -i "%~1" -vf scale=-2:720 -c:v hevc_nvenc -preset slow -b:v 8000k -c:a copy "%~dpn1_720p.mp4"
    NVidia recommendation for using HW accelerated NVEnc encoding are provided in: https://docs.nvidia.com/video-codec-sdk/ffmpeg-with-nvidia-gpu/index.html [Command Line for Latency-Tolerant High-Quality Transcoding]

    Command line example bellow:
    Code:
    ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -i input.mp4 -c:a copy -c:v h264_nvenc -preset p6 -tune hq -b:v 5M -bufsize 5M -maxrate 10M -qmin 0 -g 250 -bf 3 -b_ref_mode middle -temporal-aq 1 -rc-lookahead 20 -i_qfactor 0.75 -b_qfactor 1.1 output.mp4
    There are dedicated applications or at least gui's that can help you at the beginning of your journey with ffmpeg.
    Sorry for really late reply, and I quite newbie in FFMPEG
    1. what is the problem with "-vf scale=-1:720"?
    2. because I using batch and the "aspect ratio" or encoding of each video may be different, I really afraid using non-default bitrate or quality,
    3. for nvidia link, I still study it
    4. your command I using "-c:v h264_nvenc", why using h264, not h265?
    4. your command is tell me a lot of new parameters :
    Code:
    -vsync 0 -preset p6 -tune hq -b:v 5M -bufsize 5M -maxrate 10M -qmin 0 -g 250 -bf 3 -b_ref_mode middle -temporal-aq 1 -rc-lookahead 20 -i_qfactor 0.75 -b_qfactor 1.1
    I know it is rude, but can you tell me what that command does?

    and thank you for the reply, I really appreciate it
    Quote Quote  
  8. Originally Posted by kucing View Post
    Sorry for really late reply, and I quite newbie in FFMPEG
    1. what is the problem with "-vf scale=-1:720"?
    There is few problems - usually videos has one of few horizontal resolutions (such as 1280, 1920, 704 etc) - frequently if resolution is not "standard" your player (hardware one not PC) may be not able to play such video correctly - there is more flexibility on lines and usually videos with one of standard resolution but lower number of lines are supported. So it is practical to resize video to one of common/standard horizontal resolutions and number of lines will be direct outcome of SAR.

    Another problem is chrominance sampling scheme used by consumer video codecs - usually number of luminance samples is twice of number of chrominance samples,
    e.g. if your video has 1280 pixels horizontal resolution then it means that you have 1280 luminance (Y) samples and only 640 chrominance samples (Cb,Cr).
    You must avoid situation where number of samples may create situation where you have fractional chrominance samples.
    Using -2 (modulo 2) prevent such situation so "-vf scale=-2:720" is correct if you processing video with 4:2:0 sampling scheme.

    But best will be using "-vf scale=1280:-2" (using even resolution for lines is a heritage of interlace age).

    There are additional factors like macroblock (other names are partition, coding tree unit) size (best is prefer video resolutions where you can use largest macroblock but this in case of modern codecs may lead to very big limitations). But probably it is smart to use smallest transformation block as constrain.

    Originally Posted by kucing View Post
    2. because I using batch and the "aspect ratio" or encoding of each video may be different, I really afraid using non-default bitrate or quality,
    Then use conditional resize so videos with different aspects can be at some point with common denominator (such as 1280x720)
    There is nice guide https://trac.ffmpeg.org/wiki/Scaling - also recommends other guides at this ffmpeg page.

    Originally Posted by kucing View Post
    3. for nvidia link, I still study it
    Highly recommends as NVidia constantly work on NVEnc, also i don't have NVidia card so i'm unable to test practically informations how to use NVEnc in ffmpeg.

    Originally Posted by kucing View Post
    4. your command I using "-c:v h264_nvenc", why using h264, not h265?
    This is not my command but command provided by NVidia - you should compare 'h264_nvenc' and 'hevc_nvenc'.
    Query your ffmpeg - in fact you should always verify each new ffmpeg what was altered/introduced.
    You can query ffmpeg about codec capabilities:

    Code:
    ffmpeg -h encoder=h264_nvenc >h264_nvenc.txt
    in my case ffmpeg (quite old) returns:
    Code:
    Encoder h264_nvenc [NVIDIA NVENC H.264 encoder]:
        General capabilities: delay hardware 
        Threading capabilities: none
        Supported pixel formats: yuv420p nv12 p010le yuv444p p016le yuv444p16le bgr0 rgb0 cuda d3d11
    h264_nvenc AVOptions:
      -preset            <int>        E..V...... Set the encoding preset (from 0 to 11) (default medium)
         default         0            E..V...... 
         slow            1            E..V...... hq 2 passes
         medium          2            E..V...... hq 1 pass
         fast            3            E..V...... hp 1 pass
         hp              4            E..V...... 
         hq              5            E..V...... 
         bd              6            E..V...... 
         ll              7            E..V...... low latency
         llhq            8            E..V...... low latency hq
         llhp            9            E..V...... low latency hp
         lossless        10           E..V...... 
         losslesshp      11           E..V...... 
      -profile           <int>        E..V...... Set the encoding profile (from 0 to 3) (default main)
         baseline        0            E..V...... 
         main            1            E..V...... 
         high            2            E..V...... 
         high444p        3            E..V...... 
      -level             <int>        E..V...... Set the encoding level restriction (from 0 to 51) (default auto)
         auto            0            E..V...... 
         1               10           E..V...... 
         1.0             10           E..V...... 
         1b              9            E..V...... 
         1.0b            9            E..V...... 
         1.1             11           E..V...... 
         1.2             12           E..V...... 
         1.3             13           E..V...... 
         2               20           E..V...... 
         2.0             20           E..V...... 
         2.1             21           E..V...... 
         2.2             22           E..V...... 
         3               30           E..V...... 
         3.0             30           E..V...... 
         3.1             31           E..V...... 
         3.2             32           E..V...... 
         4               40           E..V...... 
         4.0             40           E..V...... 
         4.1             41           E..V...... 
         4.2             42           E..V...... 
         5               50           E..V...... 
         5.0             50           E..V...... 
         5.1             51           E..V...... 
      -rc                <int>        E..V...... Override the preset rate-control (from -1 to INT_MAX) (default -1)
         constqp         0            E..V...... Constant QP mode
         vbr             1            E..V...... Variable bitrate mode
         cbr             2            E..V...... Constant bitrate mode
         vbr_minqp       8388612      E..V...... Variable bitrate mode with MinQP (deprecated)
         ll_2pass_quality 8388616      E..V...... Multi-pass optimized for image quality (deprecated)
         ll_2pass_size   8388624      E..V...... Multi-pass optimized for constant frame size (deprecated)
         vbr_2pass       8388640      E..V...... Multi-pass variable bitrate mode (deprecated)
         cbr_ld_hq       8            E..V...... Constant bitrate low delay high quality mode
         cbr_hq          16           E..V...... Constant bitrate high quality mode
         vbr_hq          32           E..V...... Variable bitrate high quality mode
      -rc-lookahead      <int>        E..V...... Number of frames to look ahead for rate-control (from 0 to INT_MAX) (default 0)
      -surfaces          <int>        E..V...... Number of concurrent surfaces (from 0 to 64) (default 0)
      -cbr               <boolean>    E..V...... Use cbr encoding mode (default false)
      -2pass             <boolean>    E..V...... Use 2pass encoding mode (default auto)
      -gpu               <int>        E..V...... Selects which NVENC capable GPU to use. First GPU is 0, second is 1, and so on. (from -2 to INT_MAX) (default any)
         any             -1           E..V...... Pick the first device available
         list            -2           E..V...... List the available devices
      -delay             <int>        E..V...... Delay frame output by the given amount of frames (from 0 to INT_MAX) (default INT_MAX)
      -no-scenecut       <boolean>    E..V...... When lookahead is enabled, set this to 1 to disable adaptive I-frame insertion at scene cuts (default false)
      -forced-idr        <boolean>    E..V...... If forcing keyframes, force them as IDR frames. (default false)
      -b_adapt           <boolean>    E..V...... When lookahead is enabled, set this to 0 to disable adaptive B-frame decision (default true)
      -spatial-aq        <boolean>    E..V...... set to 1 to enable Spatial AQ (default false)
      -temporal-aq       <boolean>    E..V...... set to 1 to enable Temporal AQ (default false)
      -zerolatency       <boolean>    E..V...... Set 1 to indicate zero latency operation (no reordering delay) (default false)
      -nonref_p          <boolean>    E..V...... Set this to 1 to enable automatic insertion of non-reference P-frames (default false)
      -strict_gop        <boolean>    E..V...... Set 1 to minimize GOP-to-GOP rate fluctuations (default false)
      -aq-strength       <int>        E..V...... When Spatial AQ is enabled, this field is used to specify AQ strength. AQ strength scale is from 1 (low) - 15 (aggressive) (from 1 to 15) (default 8)
      -cq                <float>      E..V...... Set target quality level (0 to 51, 0 means automatic) for constant quality mode in VBR rate control (from 0 to 51) (default 0)
      -aud               <boolean>    E..V...... Use access unit delimiters (default false)
      -bluray-compat     <boolean>    E..V...... Bluray compatibility workarounds (default false)
      -init_qpP          <int>        E..V...... Initial QP value for P frame (from -1 to 51) (default -1)
      -init_qpB          <int>        E..V...... Initial QP value for B frame (from -1 to 51) (default -1)
      -init_qpI          <int>        E..V...... Initial QP value for I frame (from -1 to 51) (default -1)
      -qp                <int>        E..V...... Constant quantization parameter rate control method (from -1 to 51) (default -1)
      -weighted_pred     <int>        E..V...... Set 1 to enable weighted prediction (from 0 to 1) (default 0)
      -coder             <int>        E..V...... Coder type (from -1 to 2) (default default)
         default         -1           E..V...... 
         auto            0            E..V...... 
         cabac           1            E..V...... 
         cavlc           2            E..V...... 
         ac              1            E..V...... 
         vlc             2            E..V...... 
      -b_ref_mode        <int>        E..V...... Use B frames as references (from 0 to 2) (default disabled)
         disabled        0            E..V...... B frames will not be used for reference
         each            1            E..V...... Each B frame will be used for reference
         middle          2            E..V...... Only (number of B frames)/2 will be used for reference
      -a53cc             <boolean>    E..V...... Use A53 Closed Captions (if available) (default true)
      -dpb_size          <int>        E..V...... Specifies the DPB size used for encoding (0 means automatic) (from 0 to INT_MAX) (default 0)
    and for:
    Code:
    ffmpeg -h encoder=hevc_nvenc >hevc_nvenc.txt
    returns:
    Code:
    Encoder hevc_nvenc [NVIDIA NVENC hevc encoder]:
        General capabilities: delay hardware 
        Threading capabilities: none
        Supported pixel formats: yuv420p nv12 p010le yuv444p p016le yuv444p16le bgr0 rgb0 cuda d3d11
    hevc_nvenc AVOptions:
      -preset            <int>        E..V...... Set the encoding preset (from 0 to 11) (default medium)
         default         0            E..V...... 
         slow            1            E..V...... hq 2 passes
         medium          2            E..V...... hq 1 pass
         fast            3            E..V...... hp 1 pass
         hp              4            E..V...... 
         hq              5            E..V...... 
         bd              6            E..V...... 
         ll              7            E..V...... low latency
         llhq            8            E..V...... low latency hq
         llhp            9            E..V...... low latency hp
         lossless        10           E..V...... lossless
         losslesshp      11           E..V...... lossless hp
      -profile           <int>        E..V...... Set the encoding profile (from 0 to 4) (default main)
         main            0            E..V...... 
         main10          1            E..V...... 
         rext            2            E..V...... 
      -level             <int>        E..V...... Set the encoding level restriction (from 0 to 186) (default auto)
         auto            0            E..V...... 
         1               30           E..V...... 
         1.0             30           E..V...... 
         2               60           E..V...... 
         2.0             60           E..V...... 
         2.1             63           E..V...... 
         3               90           E..V...... 
         3.0             90           E..V...... 
         3.1             93           E..V...... 
         4               120          E..V...... 
         4.0             120          E..V...... 
         4.1             123          E..V...... 
         5               150          E..V...... 
         5.0             150          E..V...... 
         5.1             153          E..V...... 
         5.2             156          E..V...... 
         6               180          E..V...... 
         6.0             180          E..V...... 
         6.1             183          E..V...... 
         6.2             186          E..V...... 
      -tier              <int>        E..V...... Set the encoding tier (from 0 to 1) (default main)
         main            0            E..V...... 
         high            1            E..V...... 
      -rc                <int>        E..V...... Override the preset rate-control (from -1 to INT_MAX) (default -1)
         constqp         0            E..V...... Constant QP mode
         vbr             1            E..V...... Variable bitrate mode
         cbr             2            E..V...... Constant bitrate mode
         vbr_minqp       8388612      E..V...... Variable bitrate mode with MinQP (deprecated)
         ll_2pass_quality 8388616      E..V...... Multi-pass optimized for image quality (deprecated)
         ll_2pass_size   8388624      E..V...... Multi-pass optimized for constant frame size (deprecated)
         vbr_2pass       8388640      E..V...... Multi-pass variable bitrate mode (deprecated)
         cbr_ld_hq       8            E..V...... Constant bitrate low delay high quality mode
         cbr_hq          16           E..V...... Constant bitrate high quality mode
         vbr_hq          32           E..V...... Variable bitrate high quality mode
      -rc-lookahead      <int>        E..V...... Number of frames to look ahead for rate-control (from 0 to INT_MAX) (default 0)
      -surfaces          <int>        E..V...... Number of concurrent surfaces (from 0 to 64) (default 0)
      -cbr               <boolean>    E..V...... Use cbr encoding mode (default false)
      -2pass             <boolean>    E..V...... Use 2pass encoding mode (default auto)
      -gpu               <int>        E..V...... Selects which NVENC capable GPU to use. First GPU is 0, second is 1, and so on. (from -2 to INT_MAX) (default any)
         any             -1           E..V...... Pick the first device available
         list            -2           E..V...... List the available devices
      -delay             <int>        E..V...... Delay frame output by the given amount of frames (from 0 to INT_MAX) (default INT_MAX)
      -no-scenecut       <boolean>    E..V...... When lookahead is enabled, set this to 1 to disable adaptive I-frame insertion at scene cuts (default false)
      -forced-idr        <boolean>    E..V...... If forcing keyframes, force them as IDR frames. (default false)
      -spatial_aq        <boolean>    E..V...... set to 1 to enable Spatial AQ (default false)
      -temporal_aq       <boolean>    E..V...... set to 1 to enable Temporal AQ (default false)
      -zerolatency       <boolean>    E..V...... Set 1 to indicate zero latency operation (no reordering delay) (default false)
      -nonref_p          <boolean>    E..V...... Set this to 1 to enable automatic insertion of non-reference P-frames (default false)
      -strict_gop        <boolean>    E..V...... Set 1 to minimize GOP-to-GOP rate fluctuations (default false)
      -aq-strength       <int>        E..V...... When Spatial AQ is enabled, this field is used to specify AQ strength. AQ strength scale is from 1 (low) - 15 (aggressive) (from 1 to 15) (default 8)
      -cq                <float>      E..V...... Set target quality level (0 to 51, 0 means automatic) for constant quality mode in VBR rate control (from 0 to 51) (default 0)
      -aud               <boolean>    E..V...... Use access unit delimiters (default false)
      -bluray-compat     <boolean>    E..V...... Bluray compatibility workarounds (default false)
      -init_qpP          <int>        E..V...... Initial QP value for P frame (from -1 to 51) (default -1)
      -init_qpB          <int>        E..V...... Initial QP value for B frame (from -1 to 51) (default -1)
      -init_qpI          <int>        E..V...... Initial QP value for I frame (from -1 to 51) (default -1)
      -qp                <int>        E..V...... Constant quantization parameter rate control method (from -1 to 51) (default -1)
      -weighted_pred     <int>        E..V...... Set 1 to enable weighted prediction (from 0 to 1) (default 0)
      -b_ref_mode        <int>        E..V...... Use B frames as references (from 0 to 2) (default disabled)
         disabled        0            E..V...... B frames will not be used for reference
         each            1            E..V...... Each B frame will be used for reference
         middle          2            E..V...... Only (number of B frames)/2 will be used for reference
      -dpb_size          <int>        E..V...... Specifies the DPB size used for encoding (0 means automatic) (from 0 to INT_MAX) (default 0)
    They look quite similar to me so probably you can safely change 'h264_nvenc' to 'hevc_nvenc' - seem NVidia unified encoders.


    Originally Posted by kucing View Post
    4. your command is tell me a lot of new parameters :
    Code:
    -vsync 0 -preset p6 -tune hq -b:v 5M -bufsize 5M -maxrate 10M -qmin 0 -g 250 -bf 3 -b_ref_mode middle -temporal-aq 1 -rc-lookahead 20 -i_qfactor 0.75 -b_qfactor 1.1
    I know it is rude, but can you tell me what that command does?

    and thank you for the reply, I really appreciate it
    It is not rude but answer can be long and mostly copy of ffmpeg documentation so probably best if you check ffmpeg documetation by your self but i will try to address some elements:
    Code:
    -vsync 0
    vsync is global switch to set video sync method / framerate mode - currently it is being deprecated so you should instead vsync 0 use '-fps_mode 0' and i will copy ffmpeg documentation:
    Code:
    For compatibility reasons some of the values for vsync can be specified as numbers (shown in parentheses in the following table).
    
    passthrough (0)
    
        Each frame is passed with its timestamp from the demuxer to the muxer. 
    cfr (1)
    
        Frames will be duplicated and dropped to achieve exactly the requested constant frame rate. 
    vfr (2)
    
        Frames are passed through with their timestamp or dropped so as to prevent 2 frames from having the same timestamp. 
    drop
    
        As passthrough but destroys all timestamps, making the muxer generate fresh timestamps based on frame-rate. 
    auto (-1)
    
        Chooses between cfr and vfr depending on muxer capabilities. This is the default method.

    '-preset p6 -tune hq ' are unique for each codec and those values are provided by NVidia - 'preset p6' accordingly to NVidia is bd (BD? blue Disk?) preset - so it should provide compatibility with hardware decoders (me4dia players/ BD players) 'tune hq' is high quality tune so encoder focus ion quality encoding (but you should verify this with NVidia guide)

    '-b:v 5M -bufsize 5M -maxrate 10M'- this one is simple, '-b:v 5M' means you expect video bitrate 5Megabits, '-bufsize 5M' is video buffer size 5Megabits (i.e. video buffer can store 1 second of your video with 5Megabit bitrate - this is important to guide encoder how to shape video bitrate - bufsize is one of methods that directly affect how much your video will be variable bitrate vs constant bitrate), '-maxrate 10M' means that video encoder can produce video with maximum 10 Megabit (this will improve visual quality of parts of your video where video codec need higher bitrate to deal with higher video complexity - this is not easy to explain - perhaps someone will elaborate more on this). my impression is that those values recommended by NVidia are quite reasonable and are good starting point.

    '-g 250 -bf 3' generic for many video codecs '-g 250' means GOP distance is 250 frames (distance between key frames is 250 frames i.e. for 25 fps video it will be 10 seconds), '-bf 3' means maximum 3 B frames present - both settings are kind of default

    ' -qmin 0 -b_ref_mode middle -temporal-aq 1 -rc-lookahead 20 -i_qfactor 0.75 -b_qfactor 1.1'

    NVidia recommends those values - you should verify them with NVidia guide i've provided - they adjust video encoding quality
    Quote Quote  
  9. thank you pandy for the reply
    1. in simple term : the "-vf scale=-1:720" may make the video not able to play correctly
    2,3. clear
    4. to be honest, I am not that smart,
    my first priority reduces video size without reducing the quality,
    and my second priority is to make the encoding video faster,
    do these "commands" do these?

    sorry for my stupidity of me, and thank you a lot for the reply, I really appreciate it
    Quote Quote  
  10. Originally Posted by kucing View Post
    1. in simple term : the "-vf scale=-1:720" may make the video not able to play correctly
    Yes - it should be at least "-vf scale=-2:720" or better "-vf scale=-4:720"

    Originally Posted by kucing View Post
    my first priority reduces video size without reducing the quality,
    and my second priority is to make the encoding video faster,
    do these "commands" do these?
    Using HW compression is usually always faster than pure CPU compression - but usually CPU compression within same bitrate budget is able to deliver higher quality - so if your goal is fast and HQ HW compression then you should be prepared to allow for slightly higher bitrate.
    So commands are for HW HQ compression but you need to verify if bitrate allowed satisfy your quality expectations.

    You may try to use some ffmpeg front end or some conversion app - usually they anyway use ffmpeg but remove from you lot of not intuitive details.
    Also instead ffmpeg you may consider to use dedicated for NVenc tool from Rigaya https://github.com/rigaya/NVEnc - it may be better for your needs.
    Quote Quote  
  11. Originally Posted by pandy View Post
    Originally Posted by kucing View Post
    1. in simple term : the "-vf scale=-1:720" may make the video not able to play correctly
    Yes - it should be at least "-vf scale=-2:720" or better "-vf scale=-4:720"

    Originally Posted by kucing View Post
    my first priority reduces video size without reducing the quality,
    and my second priority is to make the encoding video faster,
    do these "commands" do these?
    Using HW compression is usually always faster than pure CPU compression - but usually CPU compression within same bitrate budget is able to deliver higher quality - so if your goal is fast and HQ HW compression then you should be prepared to allow for slightly higher bitrate.
    So commands are for HW HQ compression but you need to verify if bitrate allowed satisfy your quality expectations.

    You may try to use some ffmpeg front end or some conversion app - usually they anyway use ffmpeg but remove from you lot of not intuitive details.
    Also instead ffmpeg you may consider to use dedicated for NVenc tool from Rigaya https://github.com/rigaya/NVEnc - it may be better for your needs.
    after I read your comment, what I sure is edit from "-1" to "-2", for the rest seem vague,
    Quote Quote  
  12. -1 (mod 1) may result in a frame size that is an odd number. YV12 video (most commercial and streaming sources) cannot have an odd frame width or height. Using -2 (mod 2) will prevent that by force the value to an even number (an inter multiple of 2). I suggest using -4 (an integer multiple of 4) to be even safer. Some older players/editors have problems with mod 2 frame sizes.
    Quote Quote  



Similar Threads

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