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 6th December 2002, 00:57   #1  |  Link
hanfrunz
Registered User
 
hanfrunz's Avatar
 
Join Date: Feb 2002
Location: Germany
Posts: 540
YUV-Bitmap Import filter?

Hello,

in our company we have a Abekas 8150 production switcher. It has a framestore option so you can save framegrabs to a .yuv file. The format of this file is very simple: (i can email a sample if someone wants it)
720x576 Pixel (PAL):
Y(8bit), U(8bit), Y(8bit),V(8bit)... and so on. As you can see its 4:2:2.

Now my question: is there a way to import these files (lets say i have 250 grabs = 10sec) into avisynth and serve it directly to tmpenc without any colorspace conversions and create a mpeg2 file?

There is also the possibility to save .y10 files witch are 10bit instead of 8! But i think mpeg2 is always 8bit (am i right?)

thanks
hans runz

Last edited by hanfrunz; 6th December 2002 at 01:05.
hanfrunz is offline   Reply With Quote
Old 6th December 2002, 14:35   #2  |  Link
WarpEnterprises
C64
 
WarpEnterprises's Avatar
 
Join Date: Apr 2002
Location: Austria
Posts: 830
did you try ImageSequence.dll ?
It's the only plugin around to import image files.
Is there no way to change the output format?
(we have a similar task)
WarpEnterprises is offline   Reply With Quote
Old 6th December 2002, 16:26   #3  |  Link
scmccarthy
Registered User
 
Join Date: Oct 2002
Posts: 462
The YUYV sequence is what the fourcc code YUY2 refers to. AviSynth can read that data if you have the right import filter.

Stephen
scmccarthy is offline   Reply With Quote
Old 7th December 2002, 00:42   #4  |  Link
hanfrunz
Registered User
 
hanfrunz's Avatar
 
Join Date: Feb 2002
Location: Germany
Posts: 540
Hello,

i tried ImageSequence.dll, but it is not working.
Can anybody code an import filter for me, that imports raw yuv2 files?

Hans Runz
hanfrunz is offline   Reply With Quote
Old 7th December 2002, 05:40   #5  |  Link
scmccarthy
Registered User
 
Join Date: Oct 2002
Posts: 462
The fourcc code us YUY2.

If you attach a frame or if you can give more specific information about this raw data and how it is produced and someone might look at is out of curiousity, anonymously.

It is at least interesting as a question.

Stephen
scmccarthy is offline   Reply With Quote
Old 7th December 2002, 14:39   #6  |  Link
hanfrunz
Registered User
 
hanfrunz's Avatar
 
Join Date: Feb 2002
Location: Germany
Posts: 540
Hello,

@scmccarthy: i gave information about this format in my first question.

a PAL frame (720x576):

row1: Y001 U001 Y002 V001 Y003 U002 Y004 V002 ... Y719 U360 Y720 V360
row2: Y721 U361 Y722 V361 ...
etc.

it is produced with an Abekas 8150 production switcher (http://accom.com/products/abekas/815...-frameset.html)

or with a photoshop in-/export plugin: ftp://ftp.accom.com/abekas/software/...gin/psnt95.zip


Hans Runz
hanfrunz is offline   Reply With Quote
Old 7th December 2002, 19:36   #7  |  Link
Marc FD
XviD fan
 
Marc FD's Avatar
 
Join Date: Jun 2002
Location: France
Posts: 907
@ hanfrnz

it's very easy tocode. you just need to read YUY2 from yourfile and memcpy to new frames.

BTW, AFAIK, TMPEGEnc only works with RGB24 input. so you'll need a convertion.

if you attach a file with 2-3 320x240 frames i can code that in speed.

<EDIT>
not a good idea : i would't be able upload it :-/

so i've just 2 question :

- how are consecutive frames stored ? (behind eachother i thing)
- is there any header, or you need to enter size manualy.

Last edited by Marc FD; 7th December 2002 at 19:39.
Marc FD is offline   Reply With Quote
Old 7th December 2002, 19:53   #8  |  Link
hanfrunz
Registered User
 
hanfrunz's Avatar
 
Join Date: Feb 2002
Location: Germany
Posts: 540
@ MarkFD
answer 1: each frame is stored in a seperate file! like t001.yuv, t002.yuv ...

answer 2: there is no header in these .yuv files and the resolution is always 720x576 (PAL) and 720x480 (NTSC)

is there a mpeg2 coder which uses yuv2 input? I always thought an mpeg2 file is yuv (4:2:0) or is it rgb???

<edit>
if you give me your email-adress i can send you a sample image. i tried to attach it to this reply, but is doesn work...

hans runz

Last edited by hanfrunz; 7th December 2002 at 19:56.
hanfrunz is offline   Reply With Quote
Old 7th December 2002, 20:02   #9  |  Link
Marc FD
XviD fan
 
Marc FD's Avatar
 
Join Date: Jun 2002
Location: France
Posts: 907
>answer 1: each frame is stored in a seperate file! like t001.yuv,
>t002.yuv ...
>answer 2: there is no header in these .yuv files and the resolution is
>always 720x576 (PAL) and 720x480 (NTSC)

the source filter will need 4 args (path,maxframes,width,height) and will output YUY2. that's okay ?

>is there a mpeg2 coder which uses yuv2 input? I always thought an mpeg2
>file is yuv (4:2:0) or is it rgb???

MPEG is YV12 (4:2:0)
YV12 support is recent in Avisynth (2.5 alpha), before we needed to upsample YV12 to YUY2.
Marc FD is offline   Reply With Quote
Old 7th December 2002, 20:18   #10  |  Link
Marc FD
XviD fan
 
Marc FD's Avatar
 
Join Date: Jun 2002
Location: France
Posts: 907
okay it's almost finished. you want it for Avisynth 2.07 or 2.5 alpha ? ^_^
Marc FD is offline   Reply With Quote
Old 7th December 2002, 20:23   #11  |  Link
hanfrunz
Registered User
 
hanfrunz's Avatar
 
Join Date: Feb 2002
Location: Germany
Posts: 540
@ MarcFD

>the source filter will need 4 args (path,maxframes,width,height) and will output YUY2. that's okay ?

yep! that is exactly what i need! :-)
YV12 is 8bit/Y, 8bit/U and 8bit/V right?

Hans Runz
hanfrunz is offline   Reply With Quote
Old 7th December 2002, 20:37   #12  |  Link
hanfrunz
Registered User
 
hanfrunz's Avatar
 
Join Date: Feb 2002
Location: Germany
Posts: 540
>okay it's almost finished. you want it for Avisynth 2.07 or 2.5 alpha ? ^_^

hey cool, thats fast! i think 2.5alpha would be nice :-)

hans runz
hanfrunz is offline   Reply With Quote
Old 7th December 2002, 20:46   #13  |  Link
scmccarthy
Registered User
 
Join Date: Oct 2002
Posts: 462
@hunfrunz

It wouldn't hurt to get the terminology right. Notice we are saying YUY2, not YUV2. YUV is the generic term we use for any color space that uses Y, U, and V samples. YUY2 uses 8-bit samples YUYVYUVY... I remember it by saying they replaced the V with a 2 in the name.

If your files use 10-bit samples, they can be truncated to 8-bit by dropping the two least significant bits.

@MarkFD

I posted a thread today, asking how to write a filter that does not take a clip as the first argument. GetGenericFilter needs a clip as an argument and once I remove it, I don't know what to replace it with.

The filter we are talking about here would make a good simple example of how that can be done. I can't write a filter like this yet, could you show me how?

Stephen
scmccarthy is offline   Reply With Quote
Old 7th December 2002, 21:10   #14  |  Link
Marc FD
XviD fan
 
Marc FD's Avatar
 
Join Date: Jun 2002
Location: France
Posts: 907
okay i've finished. Avsiytnh 2.5 is cool, because i don't want to switch back ^^.

rawYUY2load/rawYUY2save (to test the loader ^^)

i've some packaging to do.

it read path???.yuy2 files where path is user-defined and ??? is the frame number (001-002..) it's okay for you ??

@scmccarthy

just instansiate IClip, create a new VideoInfo, and fetch the functions.
Marc FD is offline   Reply With Quote
Old 7th December 2002, 21:18   #15  |  Link
hanfrunz
Registered User
 
hanfrunz's Avatar
 
Join Date: Feb 2002
Location: Germany
Posts: 540
@Mark FD:
thank you very much!
>frame number (001-002..) it's okay for you ??

i think five or six digits would be better -> 000001-000002...

can you send it to me for testing ?

hanfrunz

Last edited by hanfrunz; 15th May 2008 at 13:38.
hanfrunz is offline   Reply With Quote
Old 7th December 2002, 21:19   #16  |  Link
Marc FD
XviD fan
 
Marc FD's Avatar
 
Join Date: Jun 2002
Location: France
Posts: 907
OUPS !! 6 digits ??

shit i was going to release.

okay i'll do it.
Marc FD is offline   Reply With Quote
Old 7th December 2002, 21:22   #17  |  Link
Marc FD
XviD fan
 
Marc FD's Avatar
 
Join Date: Jun 2002
Location: France
Posts: 907
6 digits.. done.

(attached "rawYUY2.zip")
Marc FD is offline   Reply With Quote
Old 7th December 2002, 21:25   #18  |  Link
hanfrunz
Registered User
 
hanfrunz's Avatar
 
Join Date: Feb 2002
Location: Germany
Posts: 540
thanks again,

now i see the attachment... :-)

hans runz

Last edited by hanfrunz; 7th December 2002 at 21:44.
hanfrunz is offline   Reply With Quote
Old 7th December 2002, 23:23   #19  |  Link
hanfrunz
Registered User
 
hanfrunz's Avatar
 
Join Date: Feb 2002
Location: Germany
Posts: 540
uuups i made a B-I-G mistake...

it's not YUY2, but UYVY!

i tested the filter with a byte-swapped file i created with a simple basic programm and then everything is fine!!

@MakrFD:
it would be very nice if you could add a RawUYVYload and RawUYVYsave (with file-extension .YUV) then it would be another perfect avisynthfilter!!!!

hans *very sorry* runz
hanfrunz is offline   Reply With Quote
Old 7th December 2002, 23:58   #20  |  Link
Marc FD
XviD fan
 
Marc FD's Avatar
 
Join Date: Jun 2002
Location: France
Posts: 907
(attached "raw422 beta 2.zip")
Marc FD 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 08:59.


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