Solved

video as a stream of bytes

Posted on 2009-05-10
1
208 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
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

762 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now