Solved

video as a stream of bytes

Posted on 2009-05-10
1
216 Views
Last Modified: 2013-12-17
Hi

Can I store video as stream of bytes in a textfile which I can later use it to play video
0
Comment
Question by:KaranGupta
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 9

Accepted Solution

by:
tculler earned 500 total points
ID: 24351841
You can store data as however you want. File extensions don't actually change data; they just change the way programs interact with them. As long as you know all of the meta info and such, you can write your own video with your keyboard, if you wanted (though it would take an absurd amount of time...). It's all just a bunch of bits.

Remember, though, a "stream" is an active connection, or "tunnel", between two things. If your program isn't running, it can't have a stream with a text-file. However, you could create a FileStream within your application, get the video bytes from their source, and write those bytes to your FileStream, like in the following code snippet. However, remember that there are countless ways to do anything.

Hope this helps,
Nate
public static void WriteVideo(System.String myOutputPath, System.Byte[] myVideoBytes)
{
    using (System.IO.FileStream writer = System.IO.File.OpenWrite(myOutputPath))
    {
        writer.Write(myVideoBytes, 0, myVideoBytes.Length);
    }
}

Open in new window

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

627 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question