|
|
| -vdub- |
| Posted: Jul 30 2011, 12:25 AM |
 |
|
Advanced Member
  
Group: Members
Posts: 613
Member No.: 27087
Joined: 24-February 10

|
No input pipe = livelock when attempting to use with virtualdub.
Very basic xvid input for external encoder copy into a text document and save. Rename this new Any_name.txt to Any_name.vdprof then import into virtualdub external encoders.
Test with different media files and post which ones that work. If have modified the profile and find xvid_encraw to work. Export the modified profile from your external Encoders and post here.
Basic xvid_encraw test profile for use with Virtualdub External Encoders
| CODE | { "description": "VirtualDub external encoder profile collection", "externalEncoders": { "sets": { "Xvid_Encraw": { "videoEncoder": "Xvid_Encraw", "audioEncoder": "", "multiplexer": "", "description": "m4v", "extension": "m4v", "processPartial": true } }, "profiles": { "Xvid_Encraw": { "name": "Xvid_Encraw", "program": "C:\\Program Files\\VirtualDub v1.10.1-T-11\\xvid_encraw.exe", "commandArguments": "-i - -w %(width) -h %(height) -framerate %(fps) -bitrate 2500 -o \"video\"", "outputFilename": "%(outputname).m4v", "type": 0, "inputFormat": 0, "checkReturnCode": true, "logStdout": true, "logStderr": true, "bypassCompression": false } } } } |
Also note better to zip (backup) both xvid_encraw before progressing as sometimes when have error can make xvid_encraw a zero size file. Xvid_encraw.exe and xvidcore.dll need to be placed in the same folder for xvid_encraw to work.
The following is not needed, when testing above profile using virtualdub external encoder)
I tested first the commands for use with external encoder using xp console
Command Line Console (CLI) (Command Prompt)
Other input if not use cli
Batch_file.bat Start > Run
Change the command below to suit your environment for xvid_encraw, source and destination files. Source video width and height (-w -h) and source video framerate
| CODE | | "C:\Program Files\VirtualDub v1.10.1-T-11\xvid_encraw.exe" -i E:\AviUnc.avi -w 720 -h 576 -framerate 25 -bitrate 3000 -progress 2 -o "I:\VideoTest.m4v" |
If no -progress command entered encoder outputs encoding details as a continuous scroll. Using command -progress 2 suppresses the continuous scroll down to one line while also showing encoding percentage. When using with -progress # and no P or B frames are been encoded the tell is no percentage shows.
The above will work with avi files (tested yuv uncompressed and xvid avi) where will output IPB frames. Other videos so far have produces only I or IP frame video outputs. They playback as static (snow) since missing needed B frames. This is xvid_encraw problem and only knows what it knows. Since doesn't seem to be using its decoder to help or if is knows little. There is a -dump command to dump decoder output for me doesn't work. Another reason to see if your tests differ to mine.
If for testing you need to see same AR as source use the -par command. The -par # number to use is the one showing before the =. Or if needed enter manually -par 16:9 or other but may find wont work like that. While command -par 4 for 16:9 does seem to set AR correct.
| CODE | -par 1 = 1:1 2 = 12:11 (4:3 PAL) 3 = 10:11 (4:3 NTSC) 4 = 16:11 (16:9 PAL) 5 = 40:33 (16:9 NTSC) other = custom (width:height) | |
 |
| Placio74 |
| Posted: Aug 7 2011, 12:48 AM |
 |
|

VideoAudio
  
Group: Members
Posts: 1216
Member No.: 21485
Joined: 24-May 07

|
| QUOTE (-vdub- @ Jul 30 2011, 02:25 AM) | | No input pipe = livelock when attempting to use with virtualdub. ... |
Not only... with any error from xvid_encraw (including user mistakes in syntax).
About encraw syntax as external encoder in VD... it's rather should look like this:
| CODE | | -w %(width) -h %(height) -framerate %(fps) -single -bitrate 2500 -kboost 100 -chigh 30 -clow 15 -turbo -max_key_interval 250 -nopacked -vhqmode 4 -lumimasking -imin 1 -pmin 1 -bvhq -bquant_ratio 162 -bquant_offset 0 -bmin 1 -threads 1 -i stdin -o "%(tempvideofile)" |
Of course these are example encoding settings.
xvid_encraw can save video just to M4V (elementar stream), but also to AVI or MKV container - so... to output filename you can add .m4v, .avi, or .mkv extension.
If you're trying to use the new (current) version xvid_encraw, you have to consider is that some commands have changed. For example: frames instead framerate or masking 1 instead lumimasking.
However you can't use standard version - because stdin is not working in official/standard version. encraw was originally developed just for demonstration - not as a fully functional application. Info in help (about stdin) is a bit confusing, but this feature does not work and should not work.
In squid_80's unofficial/modified version, stdin works. But this version is a bit old and incompatible with latest Xvid.
So... - you can use squid_80's xvid_encraw version with xvidcore from Xvid 1.2, - can't use (in VD) standard xvid_encraw version, - and there is no sense to use old squid_80's xvid_encraw with xvidcore from Xvid 1.3 (too many issues).
BTW Of course, another way is... using FFmpeg or MEncoder.
-------------------- VideoAudio.pl - Serwis o technologii wideo & audio |
 |
| -vdub- |
| Posted: Aug 7 2011, 09:12 AM |
 |
|
Advanced Member
  
Group: Members
Posts: 613
Member No.: 27087
Joined: 24-February 10

|
!! The standard xvid_encraw stdin command is just a demonstration (that does nothing) !!
Ok well that explains the reason for pipe failing each time i tried anything. Will have a look for other versions instead, Jawor i know also has his xvid builds. Will have a look also for more recent Squid versions until have a working xvid_encraw stdin.
Your example xvid_encraw settings is different for [-i stdin -o "%(tempvideofile)"] this should help when have a stdin working command to use. Thanks for taking time to reply now will find better xvid_encraw and get rid of the standard version then see what is possible |
 |
| Placio74 |
| Posted: Aug 7 2011, 02:38 PM |
 |
|

VideoAudio
  
Group: Members
Posts: 1216
Member No.: 21485
Joined: 24-May 07

|
| QUOTE (-vdub- @ Aug 7 2011, 11:12 AM) | | The standard xvid_encraw stdin command is just a demonstration (that does nothing) ... |
No. It just does not work (and stdin (standard input) is not a command). Read again: xvid_encraw was originally developed just for demonstration (without intention to use as a fully functional application). xvid_encraw popularity was unexpected and isn't free from serious bugs.
This includes a standard xvid_encraw - build from official sources, rather without additional modifications.
BTW... I 'talked' with Jawor on this subject.
| QUOTE (-vdub- @ Aug 7 2011, 11:12 AM) | | ...Will have a look also for more recent Squid versions until have a working xvid_encraw stdin. ... |
Well, last version is from 2007 year (but source code are available). http://members.optusnet.com.au/squid_80/
-------------------- VideoAudio.pl - Serwis o technologii wideo & audio |
 |
| -vdub- |
| Posted: Aug 7 2011, 04:44 PM |
 |
|
Advanced Member
  
Group: Members
Posts: 613
Member No.: 27087
Joined: 24-February 10

|
I understand stdin operator command so far as if source code has been coded with it and compiled with it. So accepts files throughput using the stdin. As virtualdub knows stdin command and able to use it in external encoders command line. xvid_encraw needs not know about this since virtualdub is doing the push and pulling of the data maybe there is also a stdout command also for an output !
Ok have Squids encraw and put in in virtualdub folder together with its aviwriter.dll. Had a look at the aviwrite and see a few VD operation code commands wonder if that is for virtualdub or a nod to virtualdub.
It works nicely with virtualdub external encoders. As you say it is old x32 bit xvid_encraw.exe (31st july 2007) and his aviwriter.dll (16th november 2006). You know if Squid is still about computing any word if he will update this to more recent version ?
@ Jawor how about you do the same as Squid had previously done with xvid_encraw.exe update using recent v1.3.2 xvid_encraw code ?
@ Placio74 do you know of any other builds there must be some since mediacoder and possibly others will have there own builds or other builds. Though mediacoder doesn't have xvid_encraw.exe probably coded into one of his main core codes.
You may have noticed i have writing in codecs section of the forum about PAR and DAR. Where need DAR to be loaded and seen correctly through all virtualdub processes. With xvid vfw through virtualdub if i have in xvid encoder
Profile @ Level > More > Aspect Ratio > DAR 16:9
Always i will have correct 16:9 output even when input in virtualdub is wrong. Meaning xvid probably guessing right what the source video is. Output is same is input apart from encoded to xvid format.
If i set the encoder option to PAR 16:9 then the output looks bad. Stretched 16:9 with black frames top and bottom. This is viewed the same on many players and if loaded back to virtualdub.
So i need for xvid encoding to have DAR 16:9 set. Xvid_encraw can set 16:9 with -par 16:9 or -par 2 but output is as xvid vfw par. Do you know if Squid xvid_encraw has a working DAR mode to encode to. Have tried -dar 2 and -dar 16:9 no such command. Have looked at shell cli with his xvid_encraw.exe /? but says nothing for a DAR switch
Or Maybe will have to wait for Phaeron to look at virtualdub code using FFmpeg Input driver v0.6. Or will have to use vfw for xvid encoding, ok that will be using mediacoder since better than vfw virtualdub. The reason for getting xvid_encraw to work so can use virtualdub for xvid encoding. Actually need Phaeron to see if fix possible as i use virtualdub to do more than xvid encoding |
 |
| Placio74 |
| Posted: Aug 7 2011, 05:52 PM |
 |
|

VideoAudio
  
Group: Members
Posts: 1216
Member No.: 21485
Joined: 24-May 07

|
Rather MediaCoder just use Xvid API and does not need to use xvid_encraw.
About xvid_encraw Squid_80's build... go to doom9 and ask him yourself.
-------------------- VideoAudio.pl - Serwis o technologii wideo & audio |
 |
| -vdub- |
| Posted: May 14 2013, 03:15 AM |
 |
|
Advanced Member
  
Group: Members
Posts: 613
Member No.: 27087
Joined: 24-February 10

|
To continue with xvid, I have been testing this encoder on and off for a while as I have never got to the bottom of the xvid encoder until today. Which means never actually used it for projects that needed best quality or at all really. As its encodings are always so bad, compared to using Quantizer = 1 that is not so good either for video quality compared to the original video source.
The goal I went after was using Quantization = 1 with hope to find what controls xvid settings the most to find any settings. That can be used to tune xvid for best encode with better compression quantizer also to keep video quality high as possible. This has failed and xvid for my setup doesn't work or is same for everyone and again is of no use
With latest xvid v1.3.2 vfw encoder installed first forget all about its profiles though I use (unrestricted) with hope finding the encoder gold buttons, settings. Xvid encoder Settings what I found the most important is the Zone Options these override all other settings. The Zone Options Weight or Quantizer is the main Xvid setting or to say the only one you need to adjust
Using a short video clip as a test I made an intermediate avi video from a 1920x1080 HD video. Using virtualdub internal Resize filter resolution 704x396 and Codec Friendly Sizing = Multiples Of 4. Saved with no compression (lossless) .avi. Now with a base small test clip the same video quality and detailed when watching as the source original HD video has
Xvid Encoder Settings
Zone Options
Change to Quantizer =1
And save the video with no audio for testing. Next go change any setting for example
Main Settings
Target Quantizer = 31
This should output a video at worst video quality. For me the file was exactly the same as previous save when viewed with Avinaptic, G-Spot, MediaInfo etc. Doing the same with nay other setting profile etc will produce always same file. Exception if enable or disable BVOPS (b frames) where only change would be higher or less file size. Again with that setting left change any setting all videos will be same again.
Then the Zone Options Quantizer is above all else and no other setting has affect over it. Which means all you need to do is adjust that alone and only for xvid compression. So by adjusting it to 2 reduces bitrate and file size. But notice how there is no way even at 1 you can get better video quality no matter what setting you try.
This is for me at lease using a few vfw xvid encoders. If same for you then xvid is a one setting encoder and all you need to change is that option. Note the Weight control works exactly the same way as Quantizer at least has done for me.
If this is the case then xvid for me is useless since I need more control to have smaller file size with best video quality what we all try to achieve with video encoders. I haven't tried with cli version of xvid but guess it could be the same. Maybe someone try the above and if the same for you try then also the cli encoder and report if it is also the same. If this is the same for you do reply here
Main problem with x264 vfw atm is it has no profiles available with the encoder. While the cli version has so need to use external encoders. Though easier as have vfw x264 it to save as avi then remux later to a mp4 container. Anyone know if there is a recent x264 vfw encoder or other vfw h264/avc1 encoder that has profiles for use ?
My old pc with x264 for lossless compress x264 is 10fps with all virtualdub buffers ramped up for better performance encoding. Need to use profiles for x264 as has to many settings. Then need to fins the setting to allow greater fps such as the xvid VHQ Mode 4 - Wide Search = minimal fps and 1 - Mode Decision = quadruple previous fps |
 |