Log in

View Full Version : VirtualDub2


Pages : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 [23] 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40

LigH
6th May 2021, 13:35
Oops, my fault, I only thought about the ffmpeg command line interface... :o

MeGUI uses the x265.exe command line encoder; this is neither a VfW codec nor a library module (as used in VirtualDub2's separate "FFMPEG / x265" encoder).

You might use the x265 CLI encoder via the "External encoder" setup in VirtualDub2. But this has no pretty user interface.

poisondeathray
6th May 2021, 14:52
I installed x265vfw v3.40 which like libx264 core 157 video encoder does offer a method of entering 'Sample Aspect Ratio' values. But sadly the entered values don't appear to make it into the video stream :(

https://i.ibb.co/vjTs1zf/x265.png

By contrast, the x265 video encoder in MeGUI is able to produce encodes with aspect ratio signalling within the video stream. But I don't know when/where this SAR information is added


Your screenshot for x265vfw shows DAR width, height, not SAR . Try 16 and 9 .

If the the extra commandline box works, you can enter --sar x:y there instead

SeeMoreDigital
6th May 2021, 20:08
Your screenshot for x265vfw shows DAR width, height, not SAR . Try 16 and 9 .After entering '16' in the 'DAR width' box and '9' in the 'DAR height' box, I can confirm that no aspect ratio signalling makes its way into the video stream...

LigH
7th May 2021, 08:25
Does it work differently if you use a side channel "Output file" in x265vfw, instead of passing it through VirtualDub2?

takla
7th May 2021, 12:31
Is there any way to get 10bit to the dropdown menu under external encoder settings? I can only pick between yuv 8bit, 16bit and various rgb pixel formats.

SeeMoreDigital
7th May 2021, 13:18
Does it work differently if you use a side channel "Output file" in x265vfw, instead of passing it through VirtualDub2?Sadly your suggestion does not work either :(

shekh
8th May 2021, 05:17
Is there any way to get 10bit to the dropdown menu under external encoder settings? I can only pick between yuv 8bit, 16bit and various rgb pixel formats.

Such option is not implemented, but I assume it is safe to roundtrip 10-bit content in 16-bit. Are you afraid of rounding error?

takla
8th May 2021, 08:02
Such option is not implemented, but I assume it is safe to roundtrip 10-bit content in 16-bit. Are you afraid of rounding error?

I wanted to encode in 10bit (lossy) for better precision from the encoder. I'd like to do this with vdub2 since it is nice for cutting the video frame accurately. I'd then send the stream to ffmpeg.

Not sure what you mean with "roundtrip 10-bit content in 16-bit". But when I select 16bit, and set 10bit as an ffmpeg command, I get the following 2 errors:

with -pix_fmt yuv420p10le and 4:2:0 8bit yuv
https://i.imgur.com/8p3rCq1.png

with -pix_fmt yuv420p10le and 4:2:0 16bit yuv
https://i.imgur.com/ZZlw6pE.png

shekh
8th May 2021, 22:22
I wanted to encode in 10bit (lossy) for better precision from the encoder. I'd like to do this with vdub2 since it is nice for cutting the video frame accurately. I'd then send the stream to ffmpeg.

Not sure what you mean with "roundtrip 10-bit content in 16-bit". But when I select 16bit, and set 10bit as an ffmpeg command, I get the following 2 errors:

with -pix_fmt yuv420p10le and 4:2:0 8bit yuv
https://i.imgur.com/8p3rCq1.png

with -pix_fmt yuv420p10le and 4:2:0 16bit yuv
https://i.imgur.com/ZZlw6pE.png


the ffmpeg command line must include pix_fmt twice: one for raw input and another for your desired output

like this:
-f rawvideo -pix_fmt %(pix_fmt) -s %(width)x%(height) -r %(fpsnum)/%(fpsden) -i - -c:v libx264 -pix_fmt yuv420p10le %(tempvideofile)

%(pix_fmt) macro always matches the format selected in dropdown in ffmpeg syntax.

takla
9th May 2021, 06:04
-

Ohh I see. Thanks. It's working now.

GAP
12th May 2021, 17:21
I have two questions:


What is the difference the x264 8 bit and x264 10 bit codecs respectively? And is it similar to x264vfw codec?
Can anyone explain what those FFMPEG encoders are?

LigH
12th May 2021, 18:31
1. x264 8 bit encodes video in the MPEG-4 AVC Main/High Profile with internal quantized components of 8 bit resolution; x264 10 bit encodes video in the MPEG-4 AVC High 10 Profile with internal quantized components of 10 bit resolution. The latter is specifically known to be useful for cartoon video content. — NOTE: Not every player is capable of playing High 10 Profile AVC video.

2. They are not VfW codecs, but provided by a separate collection of encoders based on ffmpeg's libavcodec library, so they are independent of any codecs installed into your Windows system. Similar to the decoders in VLC. VDub2 contains ffmpeg based decoders, too

LigH
17th May 2021, 08:07
I got a report that VirtualDub2 doesn't handle audio conversions when processing a clip with 24 bit PCM audio. Using FFmpeg Lame MP3 produces loud static noise (I can confirm). FFmpeg AAC "crashes" (in my case the dub process gets stuck after 650 audio samples, then "Integer division by zero" crash).

When I try to convert the audio to 16 bit internally in VirtualDub2 before compression, it fails with an error message in the Audio group of the "Save video" dialog, Sample Layout: [Cannot convert audio: the source audio form{...}].

LigH
26th May 2021, 08:17
Any idea about the reason, shekh? 24 bit integer not supported in the audio pipeline?

And again, the ffmpeg library ages on and on...

richardpl
26th May 2021, 18:08
What ages on and on?

LigH
27th May 2021, 13:22
VirtualDub2 still uses an ffmpeg plugin version with an older API because adapting VirtualDub2 to the requirements of the most recent ffmpeg API version seems to be a heavy challenge for shekh...

shekh
7th June 2021, 21:06
Any idea about the reason, shekh? 24 bit integer not supported in the audio pipeline?

And again, the ffmpeg library ages on and on...

Sorry for late reply, do you still have the sample? I tried it and it works for me (converted test file to pcm_s24le with ffmpeg).
Anyway, VD2 can internally work with u8, s16le, f32le. Other formats get converted by the input driver.

Emulgator
15th June 2021, 00:18
x264 with CRF <17 might be what you're searching for.

LigH
19th June 2021, 08:55
@shekh: 24 bit example (https://www.ligh.de/tmp/String1s24b.7z). AviSynth script just as dummy video track. Important part is the WAV file to be used as external audio track (Audio - Audio from other file...), in Audio "Full processing mode" and with a Compressor. Archive contains an MKV with Ut Video and PCM audio track, and to compare, another with MP3 audio track compressed via the FFmpeg Lame MP3 encoder. The result with AAC is broken, did not add this.

Audio driver is an "NVIDIA High Definition Audio" device, general Windows 10 64b.

GAP
19th June 2021, 15:24
How do you convert AVISynth scripts to Virtualdub processing scripts?

LigH
19th June 2021, 17:12
Not generally possible. They may handle fundamentally different actions (e.g. VirtualDub has no substitute to every possible AviSynth filter and NLE feature, whereas AviSynth is not able to select a codec for the compression).

StainlessS
19th June 2021, 18:47
How do you convert AVISynth scripts to Virtualdub processing scripts?
As LigH said, but you can load avisynth scripts into VDub2, and additionally process in some way, and/or add to queued jobs list.

GAP
20th June 2021, 03:46
Okay thanks.

StainlessS
19th December 2021, 21:22
Yo shekh,
If you do get back to this, can I ask if cursor in AVS script editor be sizeable, specifically adjust width wider,
on 4K monitor and Windows 10 scaling to 150%, cursor is almost invisible in the editor [W10 scaling or Ease of Access cursor width seems to make no difference].
I quite often find myself having to click with the mouse so I can tell where the cursor is.

Thanks muchly :)

wonkey_monkey
3rd February 2022, 18:19
It seems VirtualDub2 doesn't understand Y-only clips with >8 bits. Not sure if this has been noted before so just putting it on record.

Wilbert
10th February 2022, 20:45
I made this one sticky, and collected all the depreciated stuff into one sticky. Let me know if anyone has other suggestions.

wonkey_monkey
10th February 2022, 22:26
You could un-sticky my "Compiling VirtualDub with VC++ Express - how I did it" thread because it's hopelessly out of date.

LigH
6th September 2022, 08:27
Are you barking at the wrong tree?

tormento
7th September 2022, 14:59
Are you barking at the wrong tree?
Don't feed the troll™.

GAP
11th September 2022, 03:54
Due to circumstances involving my laptop's GPU being busted, I am foced to use my Woindws XP comuter. I wanted to convert my videos to .mp4 but while converting my video, I encountered an error called "Requested frame not found". I am not sure what has caused this error but I want to convert my videos using Virtualdub2. Can anyone help me?

nji
11th September 2022, 16:51
With my limited knowledge I would say that
the video stream is defect in some way.
Try different decoder (at VD2's open dialog),
or try avidemux.
If successfull check the audio (sync and quality).

StainlessS
12th September 2022, 15:43
"Requested frame not found"

From another of your threads, [EDIT: GAP threads]
If you can't play back uncompressed in realtime, I'd worry that you might not be able to record uncompressed in realtime, and thus would get dropped frames. So double-check that before trying uncompressed.

Recording uncompressed video is a great use case for RAID, if that's an option for you.

From this [GAP] thread,
https://forum.doom9.org/showthread.php?t=183052

Maybe suggest trying the batch script with that error producing clip,
BAT(same thread) = https://forum.doom9.org/showthread.php?p=1948505#post1948505

See if ffmpeg gives any further info in error message for the missing frame,
perhaps it can even auto conceal the error. (producing legal output clip)
EDIT:
OR smaller bat script. Output UT_Video, AVI.

SomethingOrOther.bat

setlocal

REM Where to Find ffmpeg
set FFMPEG="C:\BIN\ffmpeg.exe"

REM Where to get input file, No terminating Backslash, "." = current directory
set INDIR="."


REM Where to place output file, No terminating Backslash.
set OUTDIR="D:"


FOR %%A IN (*.wmv *.mpg *.avi *.flv *.mov *.mp4 *.m4v *.RAM *.RM *.mkv *.TS *.ogv *264 *.webm *.m2v *.VOB) DO (
%FFMPEG% -i "%INDIR%\%%A" -vcodec utvideo -acodec pcm_s16le "%OUTDIR%\%%~nxA.AVI"

)

Pause


Output AVI to to D: drive. Input types in BLUE (can try adding more at end of list, eg " *.abc", SPACE separatedf from other extensions).

Create CONVERT Folder. Copy bat and source clips into that folder.
Ensure FFMPEG line points to your ffmpeg binary.
Run the bat.
(The Bat dont like SPACES nor weird foreign chars in filenames)

GAP
14th September 2022, 08:51
I will that a try and see what I get. I am not sure Virtualdub2 works for XP as I want to export to .mp4.

With my limited knowledge I would say that
the video stream is defect in some way.
Try different decoder (at VD2's open dialog),
or try avidemux.
If successfull check the audio (sync and quality).

What version of AVIDemux works with XP?

filler56789
19th September 2022, 21:53
<OT>

(The Bat dont like SPACES nor weird foreign chars in filenames)

Not sure whether the members from France, Italy, Spain, Poland or Hungary (for example) would like to see their native languages labeled as "weird" or "foreign". :rolleyes:
Next time please try to write just "non-ASCII characters". ;)
It's true that the Amerikans have the bad habit of assuming that they are the center of the universe;
however it's easy to forget that they inherited this bad habit from the Brits. :p
</OT>

StainlessS
19th September 2022, 23:02
I consider my bottom well smacked ! (but will likely repeat said faux pas :) )

One day we will take back that colony and re-establish the center of the Universe :)

GAP
22nd September 2022, 04:16
What is the the input caching driver? I heard once that it might be somehting wrong with the driver.

isidroco
5th November 2022, 12:35
I will that a try and see what I get. I am not sure Virtualdub2 works for XP as I want to export to .mp4.
What version of AVIDemux works with XP?
Last working version: https://sourceforge.net/projects/avidemux/files/avidemux/2.6.20/
Until today (v44282) all virtualDub2 versions work with XP, some third party plugins (as Filtres_JPSDR) may fail.

isidroco
5th November 2022, 13:28
What is the the input caching driver? I heard once that it might be somehting wrong with the driver.

In VDUB2, File, Open, at the bottom you can use original VDub Input driver: "Audio/video interleave..." which will only open AVIs (and will fail to accurately seek frames on h264/h265). Or "Caching Input Driver" (FFMPEG based) which will open almost anything although you will loose DirectStreamCopy (unless video is compressed using a compressor with AllKeyFrames as MJPG).

You may try to fix corrupted video: http://www.risingresearch.com/en/dvr/

jpsdr
6th November 2022, 15:16
Until today (v44282) all virtualDub2 versions work with XP, some third party plugins (as Filtres_JPSDR) may fail.

Even the XP build version ? :scared:

nji
12th November 2022, 18:45
?How?

LigH
13th November 2022, 00:13
Not in VirtualDub2; it does not contain a fully configurable native HEVC (x265) codec.

SeeMoreDigital
13th November 2022, 12:58
HEVC; set display aspect ratio
?How?Not in VirtualDub2; it does not contain a fully configurable native HEVC (x265) codec.Indeed... You'll need to install one of the x265vfw versions if you require access to DAR options ;)

LigH
13th November 2022, 13:28
I would recommend configuring a x265.exe as external encoder instead. HEVC does not belong into VfW.

nji
13th November 2022, 14:53
Thankyou for your help!
I'll do as you proposed.

GAP
21st November 2022, 21:30
In VDUB2, File, Open, at the bottom you can use original VDub Input driver: "Audio/video interleave..." which will only open AVIs (and will fail to accurately seek frames on h264/h265). Or "Caching Input Driver" (FFMPEG based) which will open almost anything although you will loose DirectStreamCopy (unless video is compressed using a compressor with AllKeyFrames as MJPG).

You may try to fix corrupted video: http://www.risingresearch.com/en/dvr/

I will have to try that but unless I buy a Windows 10 or above computer, I am still need to figure out how to make mp4s.

Even the XP build version ? :scared:

There is an XP build version?

jpsdr
22nd November 2022, 18:34
I was talking about the XP build version of my plugins, not VDUB2.

GAP
6th December 2022, 11:30
Sorry about that. Anyway I think the only reason Virtualdub2 worked on my computer for a time is due tot he codecs I used. I may need to manipulate the registry or something to "reformat" the program. It seems like Virtualdub2 will only work on Windows 10 or if I used codecs like XVID or something.

Edit: I discovered that I had to change the input driver from :Caching Input Driver" to "Audio/video interleave input driver (internal)" to successfully to convert a video on XP. I also discovered some options on both input drivers but I do not know which is ideal for XP.

GAP
18th December 2022, 21:47
"Requested frame not found"

From another of your threads, [EDIT: GAP threads]


From this [GAP] thread,
https://forum.doom9.org/showthread.php?t=183052

Maybe suggest trying the batch script with that error producing clip,
BAT(same thread) = https://forum.doom9.org/showthread.php?p=1948505#post1948505

See if ffmpeg gives any further info in error message for the missing frame,
perhaps it can even auto conceal the error. (producing legal output clip)
EDIT:
OR smaller bat script. Output UT_Video, AVI.

SomethingOrOther.bat

setlocal

REM Where to Find ffmpeg
set FFMPEG="C:\BIN\ffmpeg.exe"

REM Where to get input file, No terminating Backslash, "." = current directory
set INDIR="."


REM Where to place output file, No terminating Backslash.
set OUTDIR="D:"


FOR %%A IN (*.wmv *.mpg *.avi *.flv *.mov *.mp4 *.m4v *.RAM *.RM *.mkv *.TS *.ogv *264 *.webm *.m2v *.VOB) DO (
%FFMPEG% -i "%INDIR%\%%A" -vcodec utvideo -acodec pcm_s16le "%OUTDIR%\%%~nxA.AVI"

)

Pause


Output AVI to to D: drive. Input types in BLUE (can try adding more at end of list, eg " *.abc", SPACE separatedf from other extensions).

Create CONVERT Folder. Copy bat and source clips into that folder.
Ensure FFMPEG line points to your ffmpeg binary.
Run the bat.
(The Bat dont like SPACES nor weird foreign chars in filenames)

Do you need to make the output directory the same as the FFMPEG folder? I tried this and it could not go on without an output directory.

StainlessS
19th December 2022, 01:31
OK GAP, posted script was not quite right but worked for me [I aint no command line expert, in fact I hate it :) ]

This seems to be quite bullet proof, and seems to cope OK with SPACES and even Japanese/Chinese hieroglyphics in the file names.
(which earlier scripts did not do well with)


Folder structure

BATCH_CONVERTER\ # Containing directory, move it anywhere.
FFMPEG\ # Directory Contains FFMPEG.EXE # EDIT: Plus any required ffmpeg dll's if ffmpeg.exe is not statically linked version, ie requires some ffmpeg dll files.
INPUT\ # Dir, files to be converted
OUTPUT\ # Dir, Converted results
Convert_Input_To_UtVideo_Output.BAT # Batch File, convert to lossless AVI
Encode_SquarePixel_AVS_Input_To_Output_AVC_MP4.BAT # Batch File, Encode square pixel AVS script to x264 MP4
Encode_SquarePixel_AVS_Input_To_Output_HEVC_MKV.BAT # Batch File, Encode square pixel AVS script to x265 MKV



Convert_Input_To_UtVideo_Output.BAT

setlocal

REM Where to Find ffmpeg
set FFMPEG=".\FFMPEG\ffmpeg.exe"

FOR /R ".\INPUT" %%A IN (*.wmv *.mpg *.avi *.flv *.mov *.mp4 *.m4v *.RAM *.RM *.mkv *.TS *.ogv *.264 *.webm *.m2v *.VOB) DO (
%FFMPEG% -i "%%A" -vcodec utvideo -acodec pcm_s16le ".\OUTPUT\%%~nA.AVI"
)
Pause


These two set aspect ratio based upon square pixels, ie by input AVS FAR, Frame Aspect Ratio (ie width/height).
Maybe mod to your favourite crf and aac audio bitrate.
Encode_SquarePixel_AVS_Input_To_Output_AVC_MP4.BAT

setlocal

REM Where to Find ffmpeg
set FFMPEG=".\FFMPEG\ffmpeg.exe"

FOR /R ".\INPUT" %%A IN (*.avs) DO (
%FFMPEG% -i "%%A" -c:v libx264 -crf 21.5 -preset slow -c:a aac -b:a 96k ".\OUTPUT\%%~nA.MP4"
)
Pause


Encode_SquarePixel_AVS_Input_To_Output_HEVC_MKV.BAT

setlocal

REM Where to Find ffmpeg
set FFMPEG=".\FFMPEG\ffmpeg.exe"

FOR /R ".\INPUT" %%A IN (*.avs) DO (
%FFMPEG% -i "%%A" -c:v libx265 -crf 25.0 -preset slow -c:a aac -b:a 96k ".\OUTPUT\%%~nA.MKV"
)
Pause


Can create your own as above, or download 7z compressed file of about 35MB [including ffmpeg.exe] from UTILITY/Batch_Converter.7z
from StainlessS@MediaFire below this post in my sig. [in the UTILITY folder]

or direct link here:- https://www.mediafire.com/file/nhaxvwpcjphlkn8/BATCH_CONVERTER.7z/file

I think you could point output to anywhere else by replacing BLUE '.\OUTPUT' above with FULL DRIVE & PATH (no filename nor extension EDIT: Output folder MUST Exist)

If you already have path to ffmpeg.exe set in your system environment PATH Variable, then can change above %FFMPEG% to just FFMPEG.EXE and it should work without needing
the FFMPEG\ffmpeg.exe in zip.
eg,

setlocal

FOR /R ".\INPUT" %%A IN (*.wmv *.mpg *.avi *.flv *.mov *.mp4 *.m4v *.RAM *.RM *.mkv *.TS *.ogv *.264 *.webm *.m2v *.VOB) DO (
Ffmpeg.Exe -i "%%A" -vcodec utvideo -acodec pcm_s16le ".\OUTPUT\%%~nA.AVI"
)
Pause

and then dont need the FFMPEG folder or zip included ffmpeg.exe.

EDIT: Reino 32 bit XP [works anywhere] compatible ffmpeg:- https://rwijnsma.home.xs4all.nl/files/ffmpeg/?C=M
I suggest STATIC linked [no dll's] version.

EDIT: Any further updates will be posted HERE:- https://forum.doom9.org/showthread.php?p=1986671

GAP
1st February 2023, 11:50
I think I might have solved my caching input driver problem. I had to go the Virtualdub2 Sourceforge (https://sourceforge.net/p/vdfiltermod/wiki/Home/)and download the input driver (https://sourceforge.net/projects/vdcachingdriver/) myself. I am not sure if that is the 'right' thing to do as it was for VirtualdubMod but it seems to work for my XP. Other computers that run Windows do not have that problem. Looks like it is solved for now. Thanks for the help.