VideoHelp Forum




+ Reply to Thread
Page 3 of 4
FirstFirst 1 2 3 4 LastLast
Results 61 to 90 of 94
  1. Capturing Memories dellsam34's Avatar
    Join Date
    Jan 2016
    Location
    Member Since 2005, Re-joined in 2016
    Search PM
    Anyone? I need an additional script for encoding to add to the following sequence:

    Code:
    AviSource("C:\Users\......\file.avi")
    QTGMC(Preset="Faster")
    prefetch(3)
    Crop(8, 4, -16, -8)
    LanczosResize(1440, 1080)
    Quote Quote  
  2. Since your crop values are all mod4 you can move the crop before QTGMC for a little more speed.
    Code:
    AviSource("C:\Users\......\file.avi")
    Crop(8, 4, -16, -8)
    QTGMC(Preset="Faster")
    LanczosResize(1440, 1080)
    prefetch(3) # maybe more or less
    Quote Quote  
  3. Originally Posted by dellsam34 View Post
    Poisondeathray what is a good script for encoding those HuffYUV de-interlaced 59.94 fps 1440x1080 files @ 4:2:2 and 192Kbps audio?
    Depends on what it's for / target / how it's going to be viewed

    Didn't you already ask about this before or some variation ?
    Quote Quote  
  4. Capturing Memories dellsam34's Avatar
    Join Date
    Jan 2016
    Location
    Member Since 2005, Re-joined in 2016
    Search PM
    Playback target is smart devices and TV's and possible online sharing. It's ok if I have to down sample to 4:2:0.
    Quote Quote  
  5. Originally Posted by dellsam34 View Post
    Playback target is smart devices and TV's and possible online sharing. It's ok if I have to down sample to 4:2:0.

    I would downsample to 4:2:0, AVC video, AAC audio, and MP4 for highest compatibility for current devices

    4:2:0 (YV12) before QTGMC would probably make your avs script run faster too, but you might have to make some adjustments in the order due to crop limitations, and where you do it (interlaced=true/false)

    You still need colormatrix or equivalent to convert to "HD" colors if upscaling


    If you send 4:2:0 video, with audio , corrected 709, from the script into something like ffmpeg, it would look something like this for unrestricted

    Code:
    ffmpeg -i input.avs -vf setsar=sar=1/1 -c:v libx264 -crf 18 -x264opts colorprim=bt709:transfer=bt709:colormatrix=bt709:force-cfr -c:a aac -b:a 192k -movflags +faststart output.mp4

    The problem is encoding can be determined by device profiles and restrictions. Some devices require specific settings and bufsize/maxrate settings

    You can let ffmpeg do 422=>420 downsample too, but it's probably faster doing it in script
    Quote Quote  
  6. Video Restorer lordsmurf's Avatar
    Join Date
    Jun 2003
    Location
    dFAQ.us/lordsmurf
    Search Comp PM
    Smart TVs have very narrow allowances, so 4:2:0 may be required.
    Best to research the specs.
    Wide compatibility requires lower quality specs almost always. So watch fps, colorspace, resolution, etc.
    Want my help? Ask here! (not via PM!)
    FAQs: Best Blank DiscsBest TBCsBest VCRs for captureRestore VHS
    Quote Quote  
  7. AVC L4.1 is almost universally supported by modern devices, TV's in the last ~10years. If you encode it compatible with BD or similar settings, it will usually play

    The problem is 1280x720p59.94 (or 960x720 for you; or 720 height) is the max resolution for 59.94 frame rate . You need L4.2 for 1440x1080p59.94, and L4.2 is a big cutoff for many devices and older "smart" TV's. BD doesn't support it either (L4.1)

    So 960x720p59.94 might be a better option for you , and it would also process and encode faster. That still triggers "HD" and enables 59.94 fps on YT

    Or you'd have to make some decision on tradeoffs vs. compatibility, or multiple versions for different scenarios

    You're starting from Video8 . 960x720p59.94 is more than enough and probably overkill already
    Quote Quote  
  8. Capturing Memories dellsam34's Avatar
    Join Date
    Jan 2016
    Location
    Member Since 2005, Re-joined in 2016
    Search PM
    Originally Posted by poisondeathray View Post

    If you send 4:2:0 video, with audio , corrected 709, from the script into something like ffmpeg, it would look something like this for unrestricted

    Code:
    ffmpeg -i input.avs -vf setsar=sar=1/1 -c:v libx264 -crf 18 -x264opts colorprim=bt709:transfer=bt709:colormatrix=bt709:force-cfr -c:a aac -b:a 192k -movflags +faststart output.mp4

    The problem is encoding can be determined by device profiles and restrictions. Some devices require specific settings and bufsize/maxrate settings

    You can let ffmpeg do 422=>420 downsample too, but it's probably faster doing it in script
    How do I integrate that command in AvsPmod? Just like this?

    Code:
    AviSource("C:\Users\......\file.avi")
    QTGMC(Preset="Faster")
    prefetch(3)
    Crop(8, 4, -16, -8)
    LanczosResize(1440, 1080)
    ffmpeg -i input.avs -vf setsar=sar=1/1 -c:v libx264 -crf 18 -x264opts colorprim=bt709:transfer=bt709:colormatrix=bt709:force-cfr -c:a aac -b:a 192k -movflags +faststart output.mp4
    Quote Quote  
  9. Originally Posted by dellsam34 View Post
    How do I integrate that command in AvsPmod? Just like this?
    No;

    It would be tools => script encoder (CLI) .

    I typically don't use avspmod for encoding - I typically use a commandline or batch file if I have a few to do. You can queue a bunch up that will process automatically and sequentially (eg overnight ...or a few weeks for you ) .

    I think avspmod can only encode 1 at a time (but there might be some python script or macro that can add batch capabilities, not sure)

    I think some GUI's might be able to queue up a bunch too,such as staxrip, megui, hybrid


    One issue that I dislike very much with avisynth is each file requires a different .avs script. SO if you had 50 files to do you would need 50 avs. scripts. There are batch scripters using templates, that generate the scripts, but it still not ideal
    Quote Quote  
  10. Capturing Memories dellsam34's Avatar
    Join Date
    Jan 2016
    Location
    Member Since 2005, Re-joined in 2016
    Search PM
    Yeah I think I should do the encoding separately, I've had success with FFmpeg_Batch_2.2.2.
    Quote Quote  
  11. colorprim=bt709:transfer=bt709:colormatrix=bt709:f orce-cfr
    Is it useful / necessary to specify those color matrix parameters in the ffmpeg command if the Avisynth input is already correct in that regard ?
    Or, isn't it preferred to get that right in the Avisynth script, and then encode it as-is ? Or is there a drawback I've missed in the previous posts ?

    -c:a aac -b:a 192k
    For optimal quality in AAC, using qaac (based on the Apple AAC encoder) would be recommended over ffmpeg's internal encoder. Since qaac is not available from within ffmpeg, audio has to be encoded separately, then muxed as-is. The command then becomes, if I'm not mistaken :
    Code:
    ffmpeg -i "input.avs" -vn -c:a pcm_s16le -f wav - | qaac - -o "input.m4a"
    ffmpeg -i "input.avs" -i "input.m4a" -map 0:0 -map 1:0 -vf setsar=sar=1/1 -c:v libx264 -crf 18 -x264opts colorprim=bt709:transfer=bt709:colormatrix=bt709:force-cfr -c:a copy -movflags +faststart "output.mp4"
    (Custom settings can be used for the qaac command, but the default settings produce a VBR file of excellent quality.)
    (It's also available in MeGUI.)
    (Quotation marks are required if there's at least one space in the file's name or path.)
    (If the .exe files are not in the same folder as the .bat script, or in the folder currently opened from the command prompt, then the complete path must be specified, for instance, "C:\command line tools\ffmpeg\ffmpeg.exe" instead of ffmpeg.)
    (Conversely, if an input file is not in the same folder as the script and executables, its complete path must be specified. Or a different folder or even partition can be specified for the output file, by putting a complete path instead of a mere file name.)
    Quote Quote  
  12. Originally Posted by abolibibelot View Post
    colorprim=bt709:transfer=bt709:colormatrix=bt709:f orce-cfr
    Is it useful / necessary to specify those color matrix parameters in the ffmpeg command if the Avisynth input is already correct in that regard ?
    Or, isn't it preferred to get that right in the Avisynth script, and then encode it as-is ? Or is there a drawback I've missed in the previous posts ?
    You need to get the avs script right, because that's the actual video data

    Those -x264opts commands in ffmpeg are just metadata. They are just "flags" or "labels". When you open the file in mediainfo (view=>text), those entries will show up. The underlying video data is unchanged. 99.9% of hardware and software actually ignore those flags. eg. Most software players base their conversion to RGB (for display) based on the dimensions of the video.

    It does not hurt to flag a file correctly (ie. use correct labels), and if it can "help" in 0.1% of cases, then it's "pro" not a "con"




    @dellsam -

    That is why the colormatrix (or equivalent) command is required to get correct colors. That changes the actual YUV values , as if the video had used 709 in the first place. Those ffmpeg -x264opts colormatrix etc.. are just labels. In ffmpeg, you'd have to use -vf colormatrix, or -vf zscale to actually change 601=>709 YUV values. I suspect it's faster to do all the processing in avisynth , just like the crop . Something to do with thread pool or memory access.


    You can take

    1) NTSC colorbars, upscale it , no colormatrix adjustment

    vs

    2) NTSC colorbars, upscale it , with colormatrix adjustment


    Check on Youtube, local video players, browsers, TV's, hardware media players. They all look wrong without the colormatrix adjustment. Most people can tell reds and greens are off. Skin tones are off. But if you have bad eyes, or want objective measuremetns - you can measure it using a color picker in the browser on youtube, or even played locally. colormatrix will give ~ +/-3 values (this is acceptable range), without colormatrix, colors will be ~ +/-30


    -c:a aac -b:a 192k
    For optimal quality in AAC, using qaac (based on the Apple AAC encoder) would be recommended over ffmpeg's internal encoder.
    I agree, QAAC or FDK-AAC are clearly better , even to my non audiophile ears. ffmpeg can be build with FDK-AAC, but you have to build it yourself ("non-free" flag has to be enabled and it cannot be distributed)

    I would do that in a batch, and if a GUI like megui or one of the others is easier, then use that
    Last edited by poisondeathray; 13th Dec 2020 at 00:54.
    Quote Quote  
  13. Capturing Memories dellsam34's Avatar
    Join Date
    Jan 2016
    Location
    Member Since 2005, Re-joined in 2016
    Search PM
    FFMPEG encoding run at about 4 fps, Using Hybrid I was able to squeeze out 24 fps, So I guess I will have to go that route for now.
    Quote Quote  
  14. Capturing Memories dellsam34's Avatar
    Join Date
    Jan 2016
    Location
    Member Since 2005, Re-joined in 2016
    Search PM
    Now I'm trying to unable audio in Hybrid and it's complaining about PCM is not allowed in mp4 although I'm clearly setting the audio format to AAC, What the hell?
    Quote Quote  
  15. Wild guess: You still got a stream inside your audio queue which is passthrough.
    Happens if you switch first to passthrough and then to custom, since audio queue is not reset when switching to custom.
    In case your audio queue only has the aac reencoding, share a debug output and I can look at it.
    users currently on my ignore list: deadrats, Stears555, marcorocchini
    Quote Quote  
  16. Capturing Memories dellsam34's Avatar
    Join Date
    Jan 2016
    Location
    Member Since 2005, Re-joined in 2016
    Search PM
    I emptied it and now it's complaining about the audio queue being empty and maybe I forgot to add audio,,,,????
    Here is the files I'm trying to encode:
    Image Attached Thumbnails Click image for larger version

Name:	Untitled.jpg
Views:	1095
Size:	106.5 KB
ID:	56227  

    Last edited by dellsam34; 13th Dec 2020 at 02:05.
    Quote Quote  
  17. If the audio isn't set to 'ignore' and the audio queue is empty, Hybrid will warn about it (jobs will still be generated).
    So yes, seems like you are to hasty.
    users currently on my ignore list: deadrats, Stears555, marcorocchini
    Quote Quote  
  18. Capturing Memories dellsam34's Avatar
    Join Date
    Jan 2016
    Location
    Member Since 2005, Re-joined in 2016
    Search PM
    If I set it to ignore it will be video only no audio, I want both video and audio and I selected custom, first, all, none of them wanted to convert from PCM to AAC.
    Wow Hybrid is a pain in the @$$.
    Quote Quote  
  19. If you want to passthrough PCM you can't use mp4 as container, since mp4 does not support PCM audio.
    none of them wanted to convert from PCM to AAC.
    Reencoding the audio to aac works fine here.
    If you select custom, don't forget to add your setting for the selected track to the audio queue,... just setting some settings and not letting Hybrid know that the selected settings should be used for processing isn't enough.
    users currently on my ignore list: deadrats, Stears555, marcorocchini
    Quote Quote  
  20. Capturing Memories dellsam34's Avatar
    Join Date
    Jan 2016
    Location
    Member Since 2005, Re-joined in 2016
    Search PM
    I see, Thanks a lot, I added audio to the que now and I'm getting this error: generatex264Call generated an empty call list, When I hit ok I get VideoCall generation failed! and hit ok and nothing happens.
    Quote Quote  
  21. " generatex264Call generated an empty call list" should report an error before that.
    Usually something that the selected profile&level restriction doesn't allow to encode the source.
    Happens for example if you bob the content and/or upscale it and keep the profile level at for example High@4.1 when you need High@5.1 or similar.
    Read https://en.wikipedia.org/wiki/Advanced_Video_Coding#Levels to get a basic understanding of the profile&level restrictions of H.264.
    users currently on my ignore list: deadrats, Stears555, marcorocchini
    Quote Quote  
  22. Capturing Memories dellsam34's Avatar
    Join Date
    Jan 2016
    Location
    Member Since 2005, Re-joined in 2016
    Search PM
    What setting should I use for the file above? I'm lost here I just want to encode the damn thing.

    I changed the 4.1 to an above number it worked but at 2 fps, Time to build a mini PC, I will be opening a thread in the right section.
    Quote Quote  
  23. You are probably okay with High@5.1.
    Hybrid should have reported something like:
    Current avc level needs to be at least: 5.1
    (it does if I set for example 1080p@120fps for the output here,... and after that Hybrid reports that the x264 call generation failed and that no video call is present)

    Cu Selur
    users currently on my ignore list: deadrats, Stears555, marcorocchini
    Quote Quote  
  24. Capturing Memories dellsam34's Avatar
    Join Date
    Jan 2016
    Location
    Member Since 2005, Re-joined in 2016
    Search PM
    2 fps is very sloooooow, it's so slow that the snail passed me and I couldn't see it . I opened up a thread about getting a new PC built:
    https://forum.videohelp.com/threads/399904-Building-a-Mini-PC-for-Capturing-and-Encodi...os#post2603910
    Quote Quote  
  25. Depending on you current system that could still be fast. Did some HD -> 4K conversions the other day @0.2fps (using a Ryzen 7 1800X and a Geforce GTX 1070 Ti)
    Thinking back about my first DVD -> DivX3.11 conversions that is still fast.
    users currently on my ignore list: deadrats, Stears555, marcorocchini
    Quote Quote  
  26. If you've optimized everything you can for the pre-processing steps (you can still use faster QTGMC settings) , you can look at using faster encoding settings too ... default "medium" libx264 settings can be sped up
    Quote Quote  
  27. Capturing Memories dellsam34's Avatar
    Join Date
    Jan 2016
    Location
    Member Since 2005, Re-joined in 2016
    Search PM
    I know but it's getting to the point where I have to tweak every step in the way and that is just overwhelming for me, I've struck a deal with the customer to just get 2 tapes ready for the holidays and work on improving my gear so that way I can load a batch and run it overnight without having to worry about anything related to performance.
    Quote Quote  
  28. But you went from ~9-10fps to 2fps ? How did that happen ? It doesn't make sense or I'm missing something . You added audio, but that has very little processing overhead
    Quote Quote  
  29. Capturing Memories dellsam34's Avatar
    Join Date
    Jan 2016
    Location
    Member Since 2005, Re-joined in 2016
    Search PM
    AvsPmod set of scripts still run at about 25 fps, The encoding part was slow, Hybrid is like 2 fps and ffmpeg was about 4 fps, though I had hybrid without audio at about 24 fps but don't remember the setting I had before.
    Quote Quote  
  30. But 4fps vs. 2fps is still 2x faster .

    Is hybrid using the exact same script ? Is it using avisynth or vapoursynth ? Is it set to use GPU for QTGMC ? A slow GPU can make everything slower - it would better to use CPU in that case
    Quote Quote  



Similar Threads

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