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.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 11th October 2005, 23:43   #101  |  Link
shorton
Registered User
 
Join Date: Jun 2005
Location: Mid-South USA
Posts: 53
Picked up from other thread Here. Possibly this thread is more appropriate to get help with Rawsource.

EDIT: Corrected the file descriptions, added comment about working backwards to 4:2:2 known good format may be adequate:

drmpeg's sourcefiles:
I believe this one is 4:2:0 planar format:
http://www.w6rz.net/wbars.yuv

I *think* this one is 4:2:2 Cb Y Cr Y format and is the format drmpeg was shooting for:
http://www.w6rz.net/ycsd.SIF

Also tried:
http://www.w6rz.net/wbars.yuv

We want to use a raw 4:2:2 single frame file. IF someone has an example of a 4:2:2 YCbCr file drmpeg may be able to work backwayrd to produce that file format for me.

test.avs:
#I tried the following (uncommenting the lines sequentially of course)

#All of these opened the image, but it was visually incorrect. All of these #crashed VirtualDub on exit:
# c1 = RawSource("ycsd.yuv", 720, 480, "I420")
# c1 = RawSource("ycsd.yuv", 720, 480, "YV12")
# c1 = Rawsource("ycsd.yuv", 720, 480, "UYVY")
# c1 = RawSource("ycsd.SIF", 720, 480, "YV12")
# c1 = RawSource("ycsd.SIF", 720, 480, "I420")

#These 2 opened the image, it looked visually OK, but it crashed VirtualDub #on exit:
# c1 = RawSource("wbars.yuv", 720, 480, "YV12")
# c1 = RawSource("wbars.yuv", 720, 480, "I420")
AssumeFPS(c1,29.97)

Hope that's of some help.

Last edited by shorton; 12th October 2005 at 02:24. Reason: Correct reference URL
shorton is offline   Reply With Quote
Old 12th October 2005, 05:47   #102  |  Link
drmpeg
Registered User
 
Join Date: Jan 2003
Location: Silicon Valley
Posts: 455
You forgot to try:

c1 = RawSource("ycsd.SIF", 720, 480, "UYVY")

which I believe should open the image correctly.

Ron
__________________
HD MPEG-2 Test Patterns http://www.w6rz.net
drmpeg is offline   Reply With Quote
Old 12th October 2005, 11:32   #103  |  Link
WarpEnterprises
C64
 
WarpEnterprises's Avatar
 
Join Date: Apr 2002
Location: Austria
Posts: 830
cannot reproduce the crash.
can you give me the complete message?
WarpEnterprises is offline   Reply With Quote
Old 12th October 2005, 12:56   #104  |  Link
shorton
Registered User
 
Join Date: Jun 2005
Location: Mid-South USA
Posts: 53
Quote:
Originally Posted by drmpeg
You forgot to try:

c1 = RawSource("ycsd.SIF", 720, 480, "UYVY")

which I believe should open the image correctly.

Ron
Ron: No dice. I tried:

c1 = RawSource("ycsd.SIF", 720, 480, "UYVY")
AssumeFPS(c1,29.97)

I attached a screen shot of what it gives.
Attached Images
 
shorton is offline   Reply With Quote
Old 12th October 2005, 13:02   #105  |  Link
shorton
Registered User
 
Join Date: Jun 2005
Location: Mid-South USA
Posts: 53
Quote:
Originally Posted by WarpEnterprises
cannot reproduce the crash.
can you give me the complete message?
You get the standard We're sorry Virtualdub has encountered and error and needs to close. Here is the technical information that produces:

Code:
<?xml version="1.0" encoding="UTF-16"?>
<DATABASE>
<EXE NAME="VirtualDub.exe" FILTER="GRABMI_FILTER_PRIVACY">
    <MATCHING_FILE NAME="auxsetup.exe" SIZE="16384" CHECKSUM="0xC21C7E7D" BIN_FILE_VERSION="1.0.0.1" BIN_PRODUCT_VERSION="1.0.0.1" PRODUCT_VERSION="1.4" FILE_DESCRIPTION="VirtualDub Setup Utility" COMPANY_NAME=" " PRODUCT_NAME="VirtualDub" FILE_VERSION="1.4" ORIGINAL_FILENAME="Setup.exe" INTERNAL_NAME="Setup" LEGAL_COPYRIGHT="Copyright © 1998-2001 Avery Lee, All Rights Reserved" VERFILEDATEHI="0x0" VERFILEDATELO="0x0" VERFILEOS="0x40004" VERFILETYPE="0x1" MODULE_TYPE="WIN32" PE_CHECKSUM="0x0" LINKER_VERSION="0x0" UPTO_BIN_FILE_VERSION="1.0.0.1" UPTO_BIN_PRODUCT_VERSION="1.0.0.1" LINK_DATE="08/07/2005 23:10:13" UPTO_LINK_DATE="08/07/2005 23:10:13" VER_LANGUAGE="English (United States) [0x409]" />
    <MATCHING_FILE NAME="vdicmdrv.dll" SIZE="6656" CHECKSUM="0xF8FDB301" BIN_FILE_VERSION="1.0.0.1" BIN_PRODUCT_VERSION="1.0.0.1" PRODUCT_VERSION="1.3" FILE_DESCRIPTION="VirtualDub installable video compressor/decompressor" COMPANY_NAME=" " PRODUCT_NAME="VirtualDub" FILE_VERSION="1.3" ORIGINAL_FILENAME="vdicmdrv.dll" INTERNAL_NAME="vdicmdrv" LEGAL_COPYRIGHT="Copyright © 1998-2000 Avery Lee, All Rights Reserved." VERFILEDATEHI="0x0" VERFILEDATELO="0x0" VERFILEOS="0x40004" VERFILETYPE="0x2" MODULE_TYPE="WIN32" PE_CHECKSUM="0x0" LINKER_VERSION="0x0" UPTO_BIN_FILE_VERSION="1.0.0.1" UPTO_BIN_PRODUCT_VERSION="1.0.0.1" LINK_DATE="08/07/2005 23:10:04" UPTO_LINK_DATE="08/07/2005 23:10:04" VER_LANGUAGE="English (United States) [0x409]" />
    <MATCHING_FILE NAME="vdremote.dll" SIZE="7168" CHECKSUM="0xC73C2F6F" BIN_FILE_VERSION="1.5.10.1" BIN_PRODUCT_VERSION="1.5.10.1" PRODUCT_VERSION="1.5.10-sp1" FILE_DESCRIPTION="AVIFile-to-VirtualDub-Frameserver glue library" COMPANY_NAME=" " PRODUCT_NAME="VirtualDub" FILE_VERSION="1.5.10-sp1" ORIGINAL_FILENAME="vdremote.dll" INTERNAL_NAME="vdremote" LEGAL_COPYRIGHT="Copyright © 1998-2004 Avery Lee, All Rights Reserved." VERFILEDATEHI="0x0" VERFILEDATELO="0x0" VERFILEOS="0x40004" VERFILETYPE="0x2" MODULE_TYPE="WIN32" PE_CHECKSUM="0x0" LINKER_VERSION="0x0" UPTO_BIN_FILE_VERSION="1.5.10.1" UPTO_BIN_PRODUCT_VERSION="1.5.10.1" LINK_DATE="08/07/2005 23:10:08" UPTO_LINK_DATE="08/07/2005 23:10:08" VER_LANGUAGE="English (United States) [0x409]" />
    <MATCHING_FILE NAME="vdsvrlnk.dll" SIZE="5120" CHECKSUM="0xA25D1808" BIN_FILE_VERSION="1.5.10.1" BIN_PRODUCT_VERSION="1.5.10.1" PRODUCT_VERSION="1.5.10-sp1" FILE_DESCRIPTION="VirtualDub server communication library" COMPANY_NAME=" " PRODUCT_NAME="VirtualDub" FILE_VERSION="1.5.10-sp1" ORIGINAL_FILENAME="vdsvrlnk.dll" INTERNAL_NAME="vdsvrlnk" LEGAL_COPYRIGHT="Copyright © 1998-2004 Avery Lee, All Rights Reserved." VERFILEDATEHI="0x0" VERFILEDATELO="0x0" VERFILEOS="0x40004" VERFILETYPE="0x2" MODULE_TYPE="WIN32" PE_CHECKSUM="0x0" LINKER_VERSION="0x0" UPTO_BIN_FILE_VERSION="1.5.10.1" UPTO_BIN_PRODUCT_VERSION="1.5.10.1" LINK_DATE="08/07/2005 23:10:07" UPTO_LINK_DATE="08/07/2005 23:10:07" VER_LANGUAGE="English (United States) [0x409]" />
    <MATCHING_FILE NAME="vdub.exe" SIZE="7738" CHECKSUM="0xAA3D561D" BIN_FILE_VERSION="1.6.5.0" BIN_PRODUCT_VERSION="1.6.5.0" PRODUCT_VERSION="1.6.5" FILE_DESCRIPTION="VirtualDub command-line driver application" COMPANY_NAME=" " PRODUCT_NAME="VirtualDub" FILE_VERSION="1.6.5" ORIGINAL_FILENAME="vdub.exe" INTERNAL_NAME="VirtualDub" LEGAL_COPYRIGHT="Copyright © 2005 Avery Lee" VERFILEDATEHI="0x0" VERFILEDATELO="0x0" VERFILEOS="0x40004" VERFILETYPE="0x1" MODULE_TYPE="WIN32" PE_CHECKSUM="0x0" LINKER_VERSION="0x0" UPTO_BIN_FILE_VERSION="1.6.5.0" UPTO_BIN_PRODUCT_VERSION="1.6.5.0" LINK_DATE="08/07/2005 23:11:17" UPTO_LINK_DATE="08/07/2005 23:11:17" VER_LANGUAGE="English (United States) [0x409]" />
    <MATCHING_FILE NAME="VirtualDub.exe" SIZE="736768" CHECKSUM="0xDB7684B9" BIN_FILE_VERSION="1.6.10.0" BIN_PRODUCT_VERSION="1.6.10.0" PRODUCT_VERSION="1.6.10" FILE_DESCRIPTION="VirtualDub" COMPANY_NAME="" PRODUCT_NAME="VirtualDub" FILE_VERSION="1.6.10" ORIGINAL_FILENAME="VirtualDub.exe" INTERNAL_NAME="VirtualDub" LEGAL_COPYRIGHT="Copyright © 1998-2005 by Avery Lee, All Rights Reserved." VERFILEDATEHI="0x0" VERFILEDATELO="0x0" VERFILEOS="0x40004" VERFILETYPE="0x1" MODULE_TYPE="WIN32" PE_CHECKSUM="0x0" LINKER_VERSION="0x0" UPTO_BIN_FILE_VERSION="1.6.10.0" UPTO_BIN_PRODUCT_VERSION="1.6.10.0" LINK_DATE="08/07/2005 23:13:26" UPTO_LINK_DATE="08/07/2005 23:13:26" VER_LANGUAGE="English (United States) [0x409]" />
</EXE>
<EXE NAME="rawsource.dll" FILTER="GRABMI_FILTER_THISFILEONLY">
    <MATCHING_FILE NAME="rawsource.dll" SIZE="49152" CHECKSUM="0xFBA36F1B" MODULE_TYPE="WIN32" PE_CHECKSUM="0x0" LINKER_VERSION="0x0" LINK_DATE="10/03/2005 06:31:18" UPTO_LINK_DATE="10/03/2005 06:31:18" />
</EXE>
<EXE NAME="kernel32.dll" FILTER="GRABMI_FILTER_THISFILEONLY">
    <MATCHING_FILE NAME="kernel32.dll" SIZE="983552" CHECKSUM="0x4CE79457" BIN_FILE_VERSION="5.1.2600.2180" BIN_PRODUCT_VERSION="5.1.2600.2180" PRODUCT_VERSION="5.1.2600.2180" FILE_DESCRIPTION="Windows NT BASE API Client DLL" COMPANY_NAME="Microsoft Corporation" PRODUCT_NAME="Microsoft® Windows® Operating System" FILE_VERSION="5.1.2600.2180 (xpsp_sp2_rtm.040803-2158)" ORIGINAL_FILENAME="kernel32" INTERNAL_NAME="kernel32" LEGAL_COPYRIGHT="© Microsoft Corporation. All rights reserved." VERFILEDATEHI="0x0" VERFILEDATELO="0x0" VERFILEOS="0x40004" VERFILETYPE="0x2" MODULE_TYPE="WIN32" PE_CHECKSUM="0xFF848" LINKER_VERSION="0x50001" UPTO_BIN_FILE_VERSION="5.1.2600.2180" UPTO_BIN_PRODUCT_VERSION="5.1.2600.2180" LINK_DATE="08/04/2004 07:56:36" UPTO_LINK_DATE="08/04/2004 07:56:36" VER_LANGUAGE="English (United States) [0x409]" />
</EXE>
</DATABASE>
Attached Images
 
shorton is offline   Reply With Quote
Old 12th October 2005, 14:12   #106  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
Quote:
c1 = RawSource("ycsd.SIF", 720, 480, "UYVY")
AssumeFPS(c1,29.97)
Works for me I zipped all my files in the attached package. Try that (correct all paths in the script) and report back.
Attached Files
File Type: zip raw.zip (35.5 KB, 136 views)
Wilbert is offline   Reply With Quote
Old 12th October 2005, 15:13   #107  |  Link
shorton
Registered User
 
Join Date: Jun 2005
Location: Mid-South USA
Posts: 53
Thanks Wilbert. I had not explicitly called the plugin in my script. Maybe that caused the problem. Anyway, I used the contents of your zip file in it's own directory to ensure nothing else was there to mess with it. I also removed Rawsource.dll from my Avisynth plugin folder before running your sample script where it was called explicitly. I did get the file to open in a more correct looking manner.

Before I remembered to remove the old Rawsource.dll, Virtualdub still crashed on exit. After I removed the old one it did not, however, it does not appear to be closing cleanly still. Inside Virtualdub, the MRU list isn't updated with that file if it's opened then closed.

Also I tried opening the avs in both encoders, both encoders just close instantly as soon as I open the file, without error or message of any sort.

So as I muddle through trying to do the right thing to help you help me, I added to the script to see if I could improve on CCE opening, but it did not work. Specifically for CCE I tried:
Code:
LoadPlugin("H:\_Patterns\rawtest\rawsource.dll")
c1=RawSource("H:\_Patterns\rawtest\ycsd.SIF", 720, 480, "UYVY").loop(30)
convertToYUV2(c1)
AssumeFPS(29.97)
With this version of the script, both the encoder and Virtual dub just shutdown without error or messages of any kind so maybe I'm doing something wrong in that script?

I don't know if it's related, but I don't think the image is quite right. Attached is a reduced jpeg of what I get. Ron made it and I believe it should look like the jpeg posted previously (post #99). Looks like luma's getting whacked. There should be some background gray on each bar set. Ron will be able to confirm.Nevermind this point, see below
Attached Images
 

Last edited by shorton; 12th October 2005 at 15:32.
shorton is offline   Reply With Quote
Old 12th October 2005, 15:31   #108  |  Link
shorton
Registered User
 
Join Date: Jun 2005
Location: Mid-South USA
Posts: 53
Quote:
Originally Posted by shorton
I don't know if it's related, but I don't think the image is quite right. Attached is a reduced jpeg of what I get. Ron made it and I believe it should look like the jpeg posted previously (post #99). Looks like luma's getting whacked. There should be some background gray on each bar set. Ron will be able to confirm.
Nevermind on this particular point. The levels looked off due to using remote control application to get home to files. Once I uploaded the jpeg, then viewed directly (not in remote control application) it looks correct. Excuse static.

So, now how to get it to open in encoder(s) without crashing them?
shorton is offline   Reply With Quote
Old 12th October 2005, 15:52   #109  |  Link
WarpEnterprises
C64
 
WarpEnterprises's Avatar
 
Join Date: Apr 2002
Location: Austria
Posts: 830
(1) Ok, crash-bug found (buffer too small by 1)
(2) @shorton: your sample ( http://forum.doom9.org/attachment.ph...tid=4766&stc=1 ) looks like the width is slightly wrong.
(3) @Wilbert: is there a sample image of YV16? AFAIK in the above links there are only YUV2 and YV12 samples. I will add your code
(4) I will add display of the actual used byteoffset
WarpEnterprises is offline   Reply With Quote
Old 12th October 2005, 16:19   #110  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
Quote:
(3) @Wilbert: is there a sample image of YV16? AFAIK in the above links there are only YUV2 and YV12 samples. I will add your code
Yes, here: http://www.w6rz.net/ycsd.yuv

From this post: http://forum.doom9.org/showthread.ph...022#post722022
Wilbert is offline   Reply With Quote
Old 12th October 2005, 20:16   #111  |  Link
shorton
Registered User
 
Join Date: Jun 2005
Location: Mid-South USA
Posts: 53
Warpenterprises:

>>(1) Ok, crash-bug found (buffer too small by 1)

Excellent! Anxious to try the revision. Hopefully this will fix the encoder feed crash, too.

>>(2) @shorton: your sample ( http://forum.doom9.org/attachment.ph...tid=4766&stc=1 ) looks like the width is slightly wrong.

I think I have #2 solved. I used the copy of the file Wilbert was using and mine opened correctly except for the crashes (encoder).

Last edited by shorton; 13th October 2005 at 00:30.
shorton is offline   Reply With Quote
Old 13th October 2005, 14:19   #112  |  Link
WarpEnterprises
C64
 
WarpEnterprises's Avatar
 
Join Date: Apr 2002
Location: Austria
Posts: 830
new version:

* no buffer crash
* YV16 format
* "show" parameter
* index.txt from yuvscan can be used directly

http://www.avisynth.org/warpenterprises/#rawsource
WarpEnterprises is offline   Reply With Quote
Old 13th October 2005, 15:04   #113  |  Link
shorton
Registered User
 
Join Date: Jun 2005
Location: Mid-South USA
Posts: 53
@Warpenterprises & Wilbert:

Thank you. Very much.

I opened the ycsd.SIF sample file in Virtualdub. Now it appears to have closed closed cleanly, updating the VirtualDub MRU list on the way out.

I also encoded the sample file with CCE using:

Code:
LoadPlugin("H:\_Patterns\rawtest\rawsource.dll")
c1 = RawSource("ycsd.SIF", 720, 480, "UYVY").loop(30)
AssumeFPS(c1,29.97)
I notice I needed no further conversion function/filter to feed to CCE. No color conversions prior to feeding the encoder is what we were looking for.

It did not crash the encoder. And the resulting mpeg looks correct so far.

Thanks again for the help guys. Sincerely appreciated. I'm going to get with drmpeg for my next steps on my project.

Best, Scott

Last edited by shorton; 13th October 2005 at 16:28.
shorton is offline   Reply With Quote
Old 14th October 2005, 09:42   #114  |  Link
peter100m
Registered User
 
Join Date: Mar 2005
Posts: 36
@WarpEnterprises:

Thank you for the new version!
I've been trying it out with some more uncompressed Quicktime files now and noticed a strange behaviour. It works rather well but I can only use files with 5093 frames (720x576) or less.

The index file from Yuvscan has these values:
frame 5068:4242944000
frame 5094:4264710144
frame 5120:4286476288

Using the "show" parameter the byte position for frame 5093 is 4 263 680 000 (image), and the byte position for frame 5094 is -30 257 152 (image).
There seems to be an integer overflow somewhere. Would you mind looking that up (Im too novice to find the error in the source)?
thank you!
peter100m is offline   Reply With Quote
Old 14th October 2005, 11:40   #115  |  Link
WarpEnterprises
C64
 
WarpEnterprises's Avatar
 
Join Date: Apr 2002
Location: Austria
Posts: 830
The bytepos in the indexfile is read not correctly if >4GB. I will change it ASAP.
Meanwhile it should work if you simply leave only the first 4 or 5 entries in the indexfile.
As you can see the difference between every 25 frames is equal, so a "big_delta" of 21766144 (=4264710144 - 4242944000) will be used.

Code:
The error is here:
int num2;
...
ret = sscanf(p_del+1, "%d", &num2);

must be:
__int64 num2;
...
ret = sscanf(p_del+1, "%I64d", &num2);

Last edited by WarpEnterprises; 14th October 2005 at 11:44.
WarpEnterprises is offline   Reply With Quote
Old 2nd November 2005, 06:18   #116  |  Link
Fizick
AviSynth plugger
 
Fizick's Avatar
 
Join Date: Nov 2003
Location: Russia
Posts: 2,183
May I ask for frame sequence support ? (like imagesequence, imagereader)

Examples of standard video sequence:
(I420 files)
http://www.cipr.rpi.edu/resource/sequences/sif.html
Fizick is offline   Reply With Quote
Old 11th December 2005, 23:12   #117  |  Link
Fizick
AviSynth plugger
 
Fizick's Avatar
 
Join Date: Nov 2003
Location: Russia
Posts: 2,183
No? It's a pity.

Warpenterprise,
please correct Rawsource documentation:
parameter "filename" is really "file".
Fizick is offline   Reply With Quote
Old 14th December 2005, 20:06   #118  |  Link
WarpEnterprises
C64
 
WarpEnterprises's Avatar
 
Join Date: Apr 2002
Location: Austria
Posts: 830
not really no :-)
but it doesn't fit nicely.
I'm thinking if if better can be combined with ImageSequence - give me some time.
WarpEnterprises is offline   Reply With Quote
Old 11th April 2006, 14:52   #119  |  Link
billou2000
Registered User
 
Join Date: Nov 2001
Posts: 13
any progress or tricks on the idea of having rawsource also working on single file sequences like imagesequence? (but obviously with raw yuv format files)...
I've been looking at it but couldnt find any solution yet.
billou2000 is offline   Reply With Quote
Old 11th April 2006, 22:45   #120  |  Link
ac-chan123
Registered User
 
Join Date: Jan 2004
Posts: 219
Becauser raw yuv file have no header like the raw sequenezes, simply put them togetter in one file(e.g using cat).
ac-chan123 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 23:21.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.