Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. how to build avi file to show clinical data?

how to build avi file to show clinical data?

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialgraphicshelpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    IlanTal
    wrote on last edited by
    #1

    I have a series of 32 frames of data (all the same size in RGB format) which I would like to show in an AVI format. I don't need any audio, just video. I tried my luck at AVIFileInit() followed by AVIFileOpen(&pfile, name, OF_WRITE | OF_CREATE, NULL); These worked (no error code) and AVIFileCreateStream(pfile, &ps, &strhdr); even worked. When I made my data into a bitmap and tried to insert it with hr = AVIStreamWrite(ps, i, 1, buff, bi.biSizeImage, AVIIF_KEYFRAME, NULL, NULL); my luck ran out. Presumably my strhdr isn't properly defined memset( &strhdr, 0, sizeof(strhdr)); SetRect(&strhdr.rcFrame, 0, 0, (int) bi.biWidth, (int) bi.biHeight); strhdr.fccType = streamtypeVIDEO; strhdr.fccHandler = mmioFOURCC('M','S','V','C'); strhdr.dwScale = 1; strhdr.dwRate = 1; strhdr.dwQuality = -1; // default quality I have no idea what MSVC in fccHandler means, for example. I would like it to work like clock.avi in c:\windows which clicks away at 1 second clicks and it cycles back on itself. Does anyone have any suggestions on a tutorial? Thanks, Ilan

    N 1 Reply Last reply
    0
    • I IlanTal

      I have a series of 32 frames of data (all the same size in RGB format) which I would like to show in an AVI format. I don't need any audio, just video. I tried my luck at AVIFileInit() followed by AVIFileOpen(&pfile, name, OF_WRITE | OF_CREATE, NULL); These worked (no error code) and AVIFileCreateStream(pfile, &ps, &strhdr); even worked. When I made my data into a bitmap and tried to insert it with hr = AVIStreamWrite(ps, i, 1, buff, bi.biSizeImage, AVIIF_KEYFRAME, NULL, NULL); my luck ran out. Presumably my strhdr isn't properly defined memset( &strhdr, 0, sizeof(strhdr)); SetRect(&strhdr.rcFrame, 0, 0, (int) bi.biWidth, (int) bi.biHeight); strhdr.fccType = streamtypeVIDEO; strhdr.fccHandler = mmioFOURCC('M','S','V','C'); strhdr.dwScale = 1; strhdr.dwRate = 1; strhdr.dwQuality = -1; // default quality I have no idea what MSVC in fccHandler means, for example. I would like it to work like clock.avi in c:\windows which clicks away at 1 second clicks and it cycles back on itself. Does anyone have any suggestions on a tutorial? Thanks, Ilan

      N Offline
      N Offline
      normanS
      wrote on last edited by
      #2

      As usual, searching CodeProject articles is a good place to start - there is an article called "A simple interface to the Video for Windows API for creating AVI movies from individual images" (and here's the link: http://www.codeproject.com/audio/aviutil_.asp[^]) I have no idea how well this article works - it didn't get a great score, but it may give you some tips.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups