Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
|
Thread Tools | Search this Thread | Display Modes |
10th November 2018, 13:46 | #1 | Link |
Registered User
Join Date: Jul 2002
Posts: 241
|
Encode hazy/foggy/dark comes out pixelated/appears to "jump" to keyframes
Source video is MOV/quicktime from digital camera, mostly of "foggy" hazy/clouds and mostly dark, which is fine..
however, when trying to encode using X264, it becomes heavily pixelated, and every second or two scene appears to JUMP as if there is a "keyframe" or something.. Tried multi-pass using Virtualdub2/latest, but that still has this jumping/pixelation.. raised target bitrate to 10000, with not much of a difference. noticed keyframes by default come every 15 frames, so ran 2-pass with "force keyframes every" 5, and every 2, and even every "1"!! and I can't really tell the difference, other than filesizes do change , so it does do something different ironically, the force-keyframe every "1" produced a SMALLER file-size than the every 2 or 5.... Are there any "presets" for such dark/foggy/cloudy scenes? or maybe a different codec? the original video is very smooth, size wise it is about ~2GB, and the compressed goes down to roughly 200MB. Thanks. S |
11th November 2018, 15:13 | #2 | Link |
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
First of all, be sure you are using the latest version of x264, which is r2935 by now.
Also, I'd recommend to use CRF mode and set the CRF value to the highest value that still produces "good enough" quality; if quality is unsatisfactory, lower CRF value some more. Set preset to the slowest one that you are willing to accept. And set the tune to "film" for real world footage; maybe give tune option "grain" a try. Furthermore, x264 places key-frames (IDR frames) dynamically, which means at "scene changes". The default --keyint value is 250, and the default --min-keyint is equal to the frame-rate. Keep in mind that those options just specify the minimum and maximum key-frame distance, not a fixed key-frame distance! Last but not least, AQ mode “3” (aka "Auto-variance AQ with bias to dark scenes") may be worth a try, if you are seeing block artifacts specifically in "dark" areas/scenes. (As a rule of thumb, I would recommend to not touch any options, unless you know exactly what you are doing and why it is needed; instead just rely on the preset and tune system)
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ Last edited by LoRd_MuldeR; 11th November 2018 at 16:36. |
12th November 2018, 15:45 | #3 | Link |
Registered User
Join Date: Feb 2017
Posts: 136
|
AQ-strength plays a large part in detail retention in flat areas with subtle color changes, like fog or clouds. Make sure that value is at least 1 and then edge it higher (1.05, 1.1, etc) to your liking. It should go without saying, but the higher it goes the larger the resulting file.
|
12th November 2018, 20:55 | #4 | Link |
Moderator
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,771
|
Good advice above. Adding on, using --open-gop can also reduce keyframe strobing. Lowering ipratio can also help. Having a keyframe ever 15 frames is really short. 2 seconds is about the minimum that gets used for IP delivery. 1 sec gets used for Blu-Ray at high bitrates. For making a standalone file, something between 4-10 seconds is good; higher values make for more efficiency but slower random access.
|
13th November 2018, 20:54 | #5 | Link |
Registered User
Join Date: Jul 2002
Posts: 241
|
very interesting suggestions.. Still on the FIRST one though
Tried to find the right "x264" encoder: 1) Attempted to d/l from sourceforge: https://sourceforge.net/projects/x264vfw/files/ but latest there is from 2017.... https://sourceforge.net/projects/x26..._2851bm_44825/ it is ~2MB and installed OK, so now I'm on r2851 2) Later found: http://download.videolan.org/x264/bi...35-545de2f.exe linked from here: https://www.videohelp.com/software/x...coder#download This is a ~20MB file... Running it is just a CLI (black window starts and disappear how does one hook this into VD2? 3) Went to sourceforge again for "latest": https://sourceforge.net/projects/x26...atest/download again that takes build 2851, not the newer one.... this appears to be the GUI installer... same with other websites, they have the 20mb download: https://www.majorgeeks.com/files/det...deo_codec.html any chance someone can post a link to the latest x264 bits that can hook up to VD2? Will re-test once the newer build is found Thanks much!! |
13th November 2018, 21:09 | #6 | Link |
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
Just do yourself a favor and don't use x264 VfW encoder, which has been dropped by "official" x264 developers ages ago.
Simply download the latest x264 CLI encoder, e.g. from here: https://www.mediafire.com/?bxvu1vvld31k1 If you don't like encoding from the command-line, then there is like a zillion of GUI front-ends available that you can choose from: https://forum.doom9.org/forumdisplay.php?f=78 Even VirtualDub can use the x264 CLI encoder, as an "external encoder", if you really need to stick with VirtualDub: * https://forum.videohelp.com/attachme...%20Encoder.gif * https://forum.videohelp.com/threads/...ncoder-feature If you want to manually invoke the CLI encoder, you have to start it from a terminal. With a command-line like this: x264.exe --crf 20 --preset slower --tune film --output "c:\some\path\your_output.mkv" "c:\some\path\your_input.{avs,mp4,mov}" If you really want to go that route, as an "external encoder" (see above).
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ Last edited by LoRd_MuldeR; 13th November 2018 at 21:48. |
14th November 2018, 13:33 | #7 | Link | |
Registered User
Join Date: Jul 2002
Posts: 241
|
LoRd_MuldeR -
Thanks SO much for your time!!! Not fixated on VirtualDub, been using it for years, but certainly open to new tools. Since this video stuff is not my full-time, just a hobby, need basic (single tool) built-in editing abilities - just load video, clip front/end, and add audio (music/voice) and sync length of these two, more or less. The link you sent seems mostly "encoders" (MeGUI, Handbrake, etc.) with a GUI front-end, so they help construct the CLI for user. these tools don't really "handle" the video file in the sense that they allow basic trim/preview. But that got me to re-visit and evaluate other options, while at it. Tried: Blender.. boy.. that is an *overkill* for my needs, it seems like a huge learning curve, just the editor... need to learn keyboard shortcuts, etc. Maybe one day when i can block a week or two to really learn it. Next tried: KDEnLIVE, not deterred by the known issues on Windows https://userbase.kde.org/Kdenlive/Manual/Windows_Issues SIDENOTE: Quote:
I may revisit this KDEnLive b/c it might work, although it does have way too many features for my needs For old-time sake, tried: Avidemux, wow, that GUI is pretty dated and very hard to move around, so abandoned it pretty quickly. LiVES is a Linux only..... Decided that VD2 is not that bad after all few MB binary, lightweight, no learning curve IMPORTED the VD external profiles, from here: https://forum.videohelp.com/threads/...e3#post2390309 They appear OK, however could not figure how to actually USE them.. ctrl-P (Compression) opens the built-in (plugins) encoders.. It's funny, anyways, after about an hour of battling with the virtualdub forums and the GUI, finally found the option to: EXPORT -> USING EXTERNAL ENCODERS Then chose the "ACV [Film] (10bit)", it ran for about 30 seconds, with projected filesize as 16GB (source file is roughly 1GB , then crashed with: Code:
--------------------------- VirtualDub Error --------------------------- Write error occurred on file "<anonymous pipe>": Insufficient system resources exist to complete the requested service. --------------------------- OK --------------------------- Decided to try the "ACV [Film] (8bit)" instead, and wow, it went through all the way, but, at the very end, probably when it "mixes" audio/video or something it crashed with this: --------------------------- VirtualDub Error --------------------------- CLI: The multiplexing process failed with error code 1 (00000001). Check the log for possible error messages. --------------------------- OK --------------------------- Found this post: https://forum.videohelp.com/threads/...s-at-multiplex Tried without the .mp4 at the end, and still same failure... I suspect that this is b/c the encoders in that "pack" are very old, also noticed the "bin/x265" has "x265-8bit" whereas the "bin/x264" has the "x264-10bit", shouldn't it be other way around? anyways, need to find the right/recent/current External encoders then maybe that will be it, until then, using the plugins in VD2, they are at r2851 from OCT2017, so not that bad. Sorry for the long post, I don't expect an "answer", let me do some homework and followup in the respective place Stormy. |
|
15th November 2018, 10:03 | #8 | Link |
Registered User
Join Date: Jul 2002
Posts: 241
|
btw, got the VD2 working with the external encoder, it simply boils down to matching the actual called/underlying binaries, ffmpeg, etc. with the right command line flags.. tricky part is there are many "flavors" of these tools, with various "options" built into them.
Pressing F8 shows the Vdub LOG, then one can extract the cmd lines from there, running them separately produces the actual error, for example: Code:
x264 [error]: not compiled with MP4 output support Once u got the right bits, with right flags, and sequence of tools, it works.. not trivial though For the above 'not compiled with mp4' ended up switching to Multiplexing with MP4Box using such flags: Code:
-add "%(tempvideofile)" -add "%(tempaudiofile)" -fps %(fps) "%(outputname)" http://download.videolan.org/pub/vid...x264/binaries/ moving on to implement the suggestions of the original post made following changes: - film in 60fps on source material - latest X264, with preset Slower, Tuning Film, and CRF 15, and going down further.. so far looks better... I'm sure it'll improve with time, thanks for the support/suggestions. Stormy. |
16th November 2018, 19:59 | #9 | Link |
Moderator
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,771
|
I find MeGUI a great tool for using the open-source tools for both preprocessing and encoding with x264. It feels like an app while using it. The part that is easily missed is going to Tools > AVS Script creator, or control-R. That'll make the avs file to use as input for the encoder session. That should be a big button in the main UI!
If you use MeGUI from the Development server (Settings > Extra Configuration > Auto Update) you'll get the latest and greatest versions of the components pretty regularly. Alas, the x265 GUI is still mostly theoretical. |
17th November 2018, 01:28 | #10 | Link | |
Registered User
Join Date: Mar 2011
Posts: 4,829
|
Quote:
The AVS Cutter can save a "cuts file" for loading into the audio section so it's re-encoded to match the video, or the Audio Cutter under the Tools menu can load the cuts file to cut the audio losslessly. |
|
18th November 2018, 18:46 | #11 | Link |
Registered User
Join Date: Jul 2002
Posts: 241
|
Thanks... I did try MeGUI, but I'm not that keen on writing scripts to open/edit/process video files - unless in very special cases where there is no choice In VD, just drag-drop, cut, add audio, and save, that is quick and easy.. btw, MeGUI also did not open the MOV/Quicktime, and so i guess it too needs some plugins, but I just don't see myself writing scripts for each video file, so for now will stick with VD2
|
19th November 2018, 02:16 | #12 | Link |
Registered User
Join Date: Mar 2011
Posts: 4,829
|
If you're happy with VD2 that's fine, but MeGUI should have no problem opening MOV files (I'm fairly sure, I never work with them). You don't need to write scripts. MeGUI will do it for you.
Use the File/Open menu to open a file. MeGUI might ask how it should open it. If it does, choose the File-Indexer. Add the indexing job to the queue and run it. When it's done, the Script Creator should open with a preview. You can use the Script Creator to apply the usual stuff like cropping or resizing etc, but if you don't want to do that, just click the Save button, then you can open the script MeGUI created with the AVS Cutter. Just thought I'd let you know, maybe for future reference. |
19th November 2018, 09:08 | #13 | Link |
Registered User
Join Date: Jul 2002
Posts: 241
|
Hello Hello, thanks...
Ineeded with this sequence of "open" it does open, but takes 20 sec to SEVERAL minutes (opening bunch of windows, for updates, jobs, etc.)!!! for 5-8min clips.. Also, opened several AVI, on the preview window the PLAY button only advanced ONE frame each time anyways, good to know of other options.. time to leave this thread until/when i got more data on the actual encoding/fuzzy/clouds stuff which was the original post Thanks! Stormy. |
|
|