Writing an avi file!!Important

This is a discussion on Writing an avi file!!Important within the C++ Programming forums, part of the General Programming Boards category; Hi EveryOne, I am trying to write avi file, and am having problem. The problem that i am having is ...

  1. #1
    Registered User
    Join Date
    Oct 2001

    Writing an avi file!!Important

    Hi EveryOne,

    I am trying to write avi file, and am having problem. The problem that i am having is that i am send each frame, size and OutputAviFile to a function... Something like this. but i have to write more the one frame to the avifile. so when a add another frame it over write the old one. is there anyway to set a postion from where i can start writing

    void avi_add(ofstream &OutputAviFile, unsigned char *buff, int size)
    	DBBREAKS db;
        db.size = size;
        OutputAviFile.write(reinterpret_cast<char *>(&db),sizeof(db));

  2. #2
    PC Fixer-Upper Waldo2k2's Avatar
    Join Date
    May 2002

    sorta like but not really kind of yeah...

    ofstream fout (whatever.txt);



    PHP and XML
    Let's talk about SAX

  3. #3
    Registered User
    Join Date
    Jul 2002
    When you declare the ofstream variable, make it so it appends to the file and doesn't overwrite existing data. So, you could then do this:
    ofstream AVI_FRAME("myAviFile.avi",ios::app);// append
    Hope that helps!

    Draco dormiens nunquam titillandus

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 05-20-2008, 09:57 AM
  2. Very slow file writing of 'fwrite' function in C
    By scho in forum C Programming
    Replies: 6
    Last Post: 08-03-2006, 03:16 PM
  3. Folding@Home Cboard team?
    By jverkoey in forum A Brief History of Cprogramming.com
    Replies: 398
    Last Post: 10-11-2005, 09:44 AM
  4. help! fifo read problem
    By judoman in forum C Programming
    Replies: 1
    Last Post: 08-16-2004, 10:19 AM
  5. writing functions
    By jlmac2001 in forum C++ Programming
    Replies: 5
    Last Post: 09-20-2003, 01:06 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21