Log in

View Full Version : H265 for Virtualdub, how to


Barabba
1st September 2015, 12:37
Good day to all!

I looked around about this but I just found messy and not clear solutions. We know how farst and reliable is Virtualdub to edit our videos, and all the filters developed for it makes it unique, we can't lose Virtualdub just because it supports only avi and vfw.

The solution exist by external encoder function, but how to use it for me is a bit complicated. I would kindly ask someone explaind here step by step how to configure it, in particular:

1) Where to download the best h265 encoder, an updated version (which can use up to 8 cores). (please include also an AAC audio encoder, thank you)
2) How to setup the external encoder panel, and all the parameters to specify there
3) Eventually which software to suggest for remux the two streams, I suppose Mkvtoolnix will suite that.

PS: I tried Avidemux but it has important limitations: the less useful interface, the less filters and that encder uses only 4 threads max.

Thank you very much!

raffriff42
1st September 2015, 14:45
From the VirtualDub External Encoder Tutorials (http://forum.doom9.org/showthread.php?t=171141) sticky thread
TL;DR (http://forums.virtualdub.org/index.php?act=ST&f=3&t=21733)
1. Search the Web for .vdprof files (external encoder sets) for the file type you need.
2. Go to Options, External Encoders, Import and import the .vdprof file.
3. Open each imported encoder or muxer and fix the executable path if needed.


Expanded explanation, with screen shots:

Options, External Encoders... (https://www.dropbox.com/s/tb8jkoux3a7qvz9/vdub-tut-external-encoder-2-s0.png?dl=0)
Import, browse to .vdprof file, Open... (https://www.dropbox.com/s/nbpa1h5d7vsne2f/vdub-tut-external-encoder-2-s1.png?dl=0)
Encoders tab, Edit (https://www.dropbox.com/s/2pqou7xcestuoro/vdub-tut-external-encoder-2-s3.png?dl=0)
Browse to executable location (and repeat for all Encoders) (https://www.dropbox.com/s/txq2v2vltijagfc/vdub-tut-external-encoder-2-s4.png?dl=0)
When ready to encode: Export, Using External encoder... (https://www.dropbox.com/s/kvkczd7xwmstncj/vdub-tut-external-encoder-2-s5.png?dl=0)
Select desired encoder (https://www.dropbox.com/s/lx0ah4yk5adfcx3/vdub-tut-external-encoder-2-s6.png?dl=0)


The hard part is finding the .vdprofs online at this early date. Here's one (not tested!) adapted from racer-x's post in this VideoHelp thread (http://forum.videohelp.com/threads/367446-Virtualdub-External-Encoder-feature){
"description": "VirtualDub external encoder profile collection",
"externalEncoders": {
"sets": {
"mp4 x264 crf19 + aac": {
"videoEncoder": "V x264 crf19",
"audioEncoder": "A neroaac q035",
"multiplexer": "M mp4 ffmpeg",
"description": "mp4",
"extension": "mp4",
"processPartial": true,
"useOutputAsTemp": false
},
"mp4 x265 crf24 + aac": {
"videoEncoder": "V x265 crf24",
"audioEncoder": "A neroaac q035",
"multiplexer": "M mp4 ffmpeg",
"description": "mp4",
"extension": "mp4",
"processPartial": true,
"useOutputAsTemp": false
}
},
"profiles": {
"A neroaac q035": {
"name": "A neroaac q035",
"program": "neroAacEnc.exe",
"commandArguments": "-q 0.35 -ignorelength -if - -of \"%(tempaudiofile)\"",
"outputFilename": "%(outputname).aac",
"type": 1,
"inputFormat": 1,
"checkReturnCode": true,
"logStdout": true,
"logStderr": true,
"bypassCompression": true,
"predeleteOutputFile": true
},
"M mp4 ffmpeg": {
"name": "M ff mp4",
"program": "ffmpeg.exe",
"commandArguments": "-i \"%(tempvideofile)\" -i \"%(tempaudiofile)\" -c copy -r %(fps) -f mp4 \"%(outputname)\" ",
"outputFilename": "",
"type": 2,
"inputFormat": 0,
"checkReturnCode": true,
"logStdout": true,
"logStderr": true,
"bypassCompression": false,
"predeleteOutputFile": true
},
"M mp4 MP4Box": {
"name": "M mp4 MP4Box",
"program": "MP4Box.exe",
"commandArguments": "-add \"%(tempvideofile)\" -add \"%(tempaudiofile)\" \"%(outputname)\" -fps %(fps)",
"outputFilename": "%(outputname).audio",
"type": 2,
"inputFormat": 0,
"checkReturnCode": true,
"logStdout": true,
"logStderr": true,
"bypassCompression": false,
"predeleteOutputFile": true
},
"M MKVmerge": {
"name": "M MKVmerge",
"program": "mkvmerge.exe",
"commandArguments": "-o \"%(outputname)\" --default-duration 0:%(fpsnum)/%(fpsden)fps \"%(tempvideofile)\" \"%(tempaudiofile)\"",
"outputFilename": "%(outputname).audio",
"type": 2,
"inputFormat": 0,
"checkReturnCode": true,
"logStdout": true,
"logStderr": true,
"bypassCompression": false,
"predeleteOutputFile": false
},
"V x264 crf19": {
"name": "V x264 crf19",
"program": "x264.exe",
"commandArguments": "--crf 19 --demuxer raw --input-res %(width)x%(height) --fps %(fpsnum)/%(fpsden) -o \"%(tempvideofile)\" -",
"outputFilename": "%(outputname).264",
"type": 0,
"inputFormat": 0,
"checkReturnCode": true,
"logStdout": true,
"logStderr": true,
"bypassCompression": false,
"predeleteOutputFile": true
},
"V x265 crf24": {
"name": "V x265 crf24",
"program": "x265.exe",
"commandArguments": "--crf 24 --input-res %(width)x%(height) --fps %(fps) -o \"%(tempvideofile)\" -",
"outputFilename": "%(outputname).hevc",
"type": 0,
"inputFormat": 0,
"checkReturnCode": true,
"logStdout": true,
"logStderr": true,
"bypassCompression": false,
"predeleteOutputFile": true
},
"V Divx265 qp25": {
"name": "V Divx265 qp25",
"program": "DivX265_1.3.74.exe",
"commandArguments": "-i - -s %(width)x%(height) -qp 25 -aqo 3 -709 -o \"%(tempvideofile)\" ",
"outputFilename": "%(outputname).hevc",
"type": 0,
"inputFormat": 0,
"checkReturnCode": true,
"logStdout": true,
"logStderr": true,
"bypassCompression": false,
"predeleteOutputFile": true
}
}
}
}

Barabba
1st September 2015, 15:51
Thank you very much, all is pretty clear now, I just want ask what is best encoder,
x265.exe or DivX265_1.3.74.exe?

Barabba
1st September 2015, 19:44
I used this script, placed the x265 encoder and nero aac, then I've found mp4box, ffmpeg and mkvmerge.
The encoding proceed, but I can see the images of input output panel in VB only if I select mkvmerge as the muxer, with other two I've black screen but seems it compress. With ALL of them I've an error in the end of compression:
CLI: the multiplexing process filed with code 1

Thank you for solutions

raffriff42
1st September 2015, 21:34
I have no idea. Poor error reporting is a problem with using external encoders :(

First, try following these tips to avoid the most common errors: Source video: File name must not have any "#" characters; it confuses MP4Box
Must have an audio track a silent track is OK
Use Audio from another file if required
Recommend stereo, 16 bit, 44100 or 48000 Hz; if not, encode may fail mysteriously.
Most errors seem to crop up at the very end of the encoding process, so test your settings on a short (10 second) selection.
(Edit menu, Set Selection Start and Set Selection End)
Using Video, Fast recompress mode is preferred unless using VirtualDub filters; if you are using filters, go to the Video menu, select Color Depth, Output format = "24 bit RGB (888)" or "32 Bit RGB (888)"
(others may work too; these have been tested)
File menu, Export-> Using external encoder
(or File menu, Queue batch operation-> Export using external encoder)
Select your Encoder Set
Enter file name. Extension must be "mp4"; must not have any "#" characters if using MP4Box.
Hit Save

If you still have a problem, posting your Virtualdub Log so I can review it might help. When you get the error, please go to View menu, Log, right-click, Copy to Clipboard, and paste to your next post.

Barabba
1st September 2015, 21:55
thank you again! The problem was I deactivated audio! Now all is ok!
it encodes, now I don't understand how could I setup parameters in the encoders, in the vdprof there isn't specifications, for example I want 56kbit mono AAC and a HEVC with CRF 25 and medium preset, how is possible?
Thank you a lot, I think this is the last part I need

Barabba
1st September 2015, 22:06
I found myself on guides, I'm using --crf 25 --me 2 :)

benwaggoner
8th September 2015, 16:45
Just curious - what are the otherwise irreplaceable features of VirtualDub? I love it to death, and use it to view and compare HEVC files (which I can't get After Effects to load, even with LAV Filters installed). But it seems a good decade past being an encoding tool for modern formats. If I export from it at all, it's normally to a LAGS AVI.

Barabba
8th September 2015, 17:02
It works very good, I love VD, the result is in mp4