VideoHelp Forum




+ Reply to Thread
Results 1 to 9 of 9
  1. Member
    Join Date
    May 2016
    Location
    Lithopolis, OH United States
    Search Comp PM
    Can anyone talk a look at this script? I am to make this setup into a FFMPEG script and even an AVISynth/AVS script. Here is what I am trying to do:
    1. Using Virtualdub I was going to do two resizes using Nearest Neighbor and later Lanzcos3. The Nearest Neighbor resize filter was going to upscale the video while the other filter was for aspect ratio correction via "Compute Height from Ratio" on Lanzcos3. I know you do not have to do this in FFMPEG or AVISynth but you could in Virtualdub2.
    2. I was to resize it to four times bigger than usual since that is considered HD and I do not want it to be bigger than what it can allowed to be.
    3. I was put in a .mp4 video container with .aac as the audio container. Someone recommended me libopus as a possible audio codec but I want to play it safe with .aac.
    4. As for codecs and compression, I mostly use x264 8 bit with a Slower compression with the constant rate factor being either 16 or lossless.
    5. I wanted colorspace from RGB to YUV. I mostly work with pixels from old video games.

    I was wondering how can I do so with this FFMPEG script? Do those options that I have about match what I want do? And if possible, how can export it to AVISynth or AVS.

    Here is the script in question:

    Code:
    ffmpeg -i input -vf "scale=iwX:ihX" -sws_flags neighbor -pix_fmt yuv420p -c:v libx264 -preset slower -crf 16 -c:a libopus -b:a 128k
    Last edited by Guernsey; 6th Dec 2022 at 23:44.
    Quote Quote  
  2. Your syntax for -vf is all wrong.

    Code:
    -vf "scale=iw*4:ih*4:sws_flags=neighbor,format=yuv420p"
    Quote Quote  
  3. you can even simplify scale syntax further (and force scale to particular behavior):
    Code:
    -vf "scale=iw*4:-2:sws_flags=neighbor+accurate_rnd+full_chroma_int+full_chroma_inp,format=pix_fmts=yuv420p"
    If your source is pixel graphic then you may consider to use pixel art dedicated scaler like xBR , hqx , epx or Super2xSaI .
    Quote Quote  
  4. Member
    Join Date
    May 2016
    Location
    Lithopolis, OH United States
    Search Comp PM
    Alright I will give those a shot. Is there a way to those on AVISynth so that I can make an AVS script from it?
    Quote Quote  
  5. Originally Posted by Guernsey View Post
    Is there a way to those on AVISynth so that I can make an AVS script from it?
    There are some pixel art resamplers featured in PointSize for avisynth
    http://avisynth.nl/index.php/PointSize
    Quote Quote  
  6. Not sure why you are using AVISynth - in case you need real time (depends on you CPU) preview then you may use pipe from ffmpeg to ffplay
    Code:
    ffmpeg.exe -i yourfile -vf yourvideofilter -c:v yourvideocodec -c:a youraudiocodec -vsync 0 -f NUT - | ffplay.exe -hide_banner -loglevel 32 -autoexit -i -
    Quote Quote  
  7. Member
    Join Date
    May 2016
    Location
    Lithopolis, OH United States
    Search Comp PM
    Since my laptop is gone, I mostly used FFMPEG. Will that tell me the end result? I also want to trim before a certain time.
    Quote Quote  
  8. Originally Posted by Guernsey View Post
    I also want to trim before a certain time.

    You can use -vf trim to specify frames or times to include (and by extension, exclude)

    https://ffmpeg.org/ffmpeg-filters.html#trim
    Quote Quote  
  9. Or use -ss to start at a specific time.

    Code:
    ffmpeg -i input.ext -ss 00:05:00.000 output.ext
    That will skip the first 5 minutes or the source.
    Quote Quote  



Similar Threads

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