VideoHelp Forum

+ Reply to Thread
Results 1 to 13 of 13
Thread
  1. is there any command convert 720p video to lower bitrate 480p using ffmpeg CMD
    Last edited by grabyea; 28th Sep 2021 at 20:52.
    Quote Quote  
  2. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    yes there is. Any reason you require FFmpeg?
    Quote Quote  
  3. The basic command is:
    Code:
    ffmpeg -i source.mp4 -vf scale=-4:480 -c:v libx264 -b:v X -c:a copy output.mp4
    Change the video bitrate (-b:v X) to something lower than the source bitrate. For example, if your source has a video bitrate of 3000k, using "-b:v 1500k" will get a video stream that's half the size of the source video stream (the file may not be half the size because the size of the audio isn't changing).
    Quote Quote  
  4. Member
    Join Date
    Jan 2019
    Location
    hawaii
    Search PM
    bad section. this is Video Streaming Downloading section.
    for your question is better Video Conversion or Editing section.
    Quote Quote  
  5. Originally Posted by jagabo View Post
    The basic command is:
    Code:
    ffmpeg -i source.mp4 -vf scale=-4:480 -c:v libx264 -b:v X -c:a copy output.mp4
    Change the video bitrate (-b:v X) to something lower than the source bitrate. For example, if your source has a video bitrate of 3000k, using "-b:v 1500k" will get a video stream that's half the size of the source video stream (the file may not be half the size because the size of the audio isn't changing).

    THANKS its worked

    also check this thread
    https://forum.videohelp.com/threads/403271-convert-ts-to-mp4-using-ffmpeg
    Quote Quote  
  6. bad section. this is Video Streaming Downloading section.
    for your question is better Video Conversion or Editing section.
    Indeed. “Video conversion” or “Newbies / General discussions” (no editing issue here).

    ffmpeg -i source.mp4 -vf scale=-4:480 -c:v libx264 -b:v X -c:a copy output.mp4
    Unless you have specific size constraints, it's more efficient to use a CRF setting (“Constant Rate Factor”), which is basically a target quality setting. That way you don't have to guesstimate the optimal bitrate for each video and each set of parameters, the encoder does it on its own, and the quality will be consistent when processing various files with the same CRF setting. (For instance, if a whole season of a television series is processed with the same target bitrate, and some episodes have little action and a good lighting, while others are full of action-packed scenes shot at night with heavy rain, the resulting quality of the latter videos will be significantly worse, because those characteristics intrinsically increase the frames' complexity and therefore the bitrate requirement.) A CRF value of 20 is usually considered a good compromise between compression and quality preservation (a lower value like 18 yields a slightly better quality but larger files, a higher value like 22 yields smaller files but the quality loss is slightly higher — the threshold between what is acceptable and what is egregiously overcompressed is highly variable depending on who you ask). Also you can specify a “preset”, which will affect both the resulting quality and the encoding time. If you're not in a hurry and/or have a powerful computer, using “slower” or “veryslow” should yield smaller files and/or a better encoding quality ; if you have an old computer and/or want to use the file ASAP, using “faster” or “veryfast” should speed up the encoding a great deal, but the compression will be less optimized with regards to the size and/or quality (the default being “medium”, which is supposedly a good compromize between speed / size / quality with a current mid-range machine).
    Code:
    ffmpeg -i "source.mp4" -vf scale=-4:480 -c:v libx264 -crf 20 -preset slower -c:a copy output.mp4
    Last edited by abolibibelot; 4th Oct 2021 at 13:19.
    Quote Quote  
  7. Originally Posted by jagabo View Post
    The basic command is:
    Code:
    ffmpeg -i source.mp4 -vf scale=-4:480 -c:v libx264 -b:v X -c:a copy output.mp4
    Change the video bitrate (-b:v X) to something lower than the source bitrate. For example, if your source has a video bitrate of 3000k, using "-b:v 1500k" will get a video stream that's half the size of the source video stream (the file may not be half the size because the size of the audio isn't changing).
    and 1080p to 720p? command?
    Quote Quote  
  8. Member
    Join Date
    Jan 2019
    Location
    hawaii
    Search PM
    replace -vf scale=-4:480 with -vf scale=-1:720
    Quote Quote  
  9. With "-vf scale=X:Y" the first number (X) is the desired width, the second number (Y) the desired height. If the value is a negative number ffmpeg will automatically calculate the value based on the other dimension but will be rounded to the nearest multiple of -N. Progressive YV12 video requires mod2 widths and heights, interlaced YV12 requires mod 4 heights, mod2 widths. Some players require mod4 for both width and height. I recommend you stick with mod4 to be safe (even though it may give a small aspect ratio error).

    For example, if you start with a 1920x1080 video and downscale to 900 pixels wide with "-vf scale=900:-4" ffmpeg will calculate the height to nearest mod4 value (integer multiple of 4, ie 4, 8, 12, 16, 20...). The perfect height would be 506.25 but the height has to be an integer. The nearest integer is 506 but that is mod2, not mod4 (506/4=126.5). 508 is the nearest mod4 value to 506.25 (508/4=127). That results in about a 1/2 percent aspect ratio error -- but you won't notice that small an error upon viewing the new video.
    Quote Quote  
  10. @lomero
    @jagabo

    THANKS
    Quote Quote  
  11. @lomero
    @jagabo

    from last few days if i try to download live strea =m m38 url in streamlink its giving this error but when i uninstall and install streamlink again it only works 1 time and than again eror any idea whats wrong?

    Could Not Find C:\Program Files (x86)\Streamlink\Python\VCRUNTIME140.dll.dat
    File "J:\Streamlink\bin\streamlink.exe", line 1
    SyntaxError: Non-UTF-8 code starting with '\x90' in file J:\Streamlink\bin\streamlink.exe on line 1, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

    i have tried all streamlink version new and

    im using this command since long time never had issue but now

    streamlink "m3u8 link" best -o video.ts
    Last edited by grabyea; 24th Nov 2021 at 20:25.
    Quote Quote  
  12. Try (re)installing Microsoft Visual Studio 2015 Runtime: https://www.microsoft.com/en-gb/download/details.aspx?id=48145
    Quote Quote  
  13. Originally Posted by grabyea View Post
    @lomero
    @jagabo

    from last few days if i try to download live strea =m m38 url in streamlink its giving this error but when i uninstall and install streamlink again it only works 1 time and than again eror any idea whats wrong?

    Could Not Find C:\Program Files (x86)\Streamlink\Python\VCRUNTIME140.dll.dat
    File "J:\Streamlink\bin\streamlink.exe", line 1
    SyntaxError: Non-UTF-8 code starting with '\x90' in file J:\Streamlink\bin\streamlink.exe on line 1, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

    i have tried all streamlink version new and

    im using this command since long time never had issue but now

    streamlink "m3u8 link" best -o video.ts
    You've answered your own question without realising it.
    Discord welcome - codehound#0348
    Quote Quote