Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6760355
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:03:17+00:00 2026-05-26T14:03:17+00:00

I want to take a video file and encrypt it using java. For now

  • 0

I want to take a video file and “encrypt” it using java. For now encrypting is just flipping the bits.
I want the video to still be able to play, so the header needs to be intact. I’m finding it very difficult to find how big the header is.
I tried with a .avi file and assumed the header size with this link AVI file details but this didn’t seem to work. I then eventually guessed at leaving the first 40kb (seems very large?) intact and then flipped all the bits which followed. This succeeded I guess although the video gets buggy at the end, but it’s not really acceptable to guess at 40kb. I then read here that .avi files have a trailer so I have decided to avoid them for the moment to avoid this extra complication.

Could anybody tell me what the format of a .wmv file is, crucially the size of it’s header.
If not .wmv any popular video file would do!

Apologies if this is unclear.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T14:03:18+00:00Added an answer on May 26, 2026 at 2:03 pm

    As others have noted the ASF specification fully covers the format of WMV/WMA media files. If C# is an option for you there is AsfMojo which is an ASF file parser, i.e. the header size you can easily determine using properties of the AsfFile class.

    using (AsfFile asfFile = new AsfFile(@"C:\samples\sample.wmv"))
    {
        uint headerSize = asfFile.PacketConfiguration.AsfHeaderSize;
    }
    

    This will not allow you to scramble the data though, as this would make the file invalid. You don’t want to scramble the packets, you want to scramble individual payloads and leave everything else intact. This is usually done (as far as I am aware) by using a codec that you need licensing for, otherwise the file won’t play back.

    For just getting access to the payloads you could do something like this:

    using (AsfFile asfFile = new AsfFile(@"C:\samples\sample.wmv"))
    {
        var dataObject = asfFile.GetAsfObject<AsfDataObject>();
        foreach (var packet in dataObject.Packets)
            foreach(var payload in packet.Payload)
            {
                //do something with the payload
            }
        }
    }
    

    If you cannot use C# you can use the project at least as a guide on how to parse ASF files in general.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to help user to take their pictures with a plugged in video
I want to take a file from disk and upload it into an Oracle
I want to take advantage of the new features in Windows 7 using C#
I want to take video and photo at same time . I have two
I have implemented video play functionality in iphone.In which i am downloading video file
I am using Entity Framework 4.1 and want to take advantage of their code-only
I want to take html, including the text and images and turn it into
I want to take the value stored in a 32 bit unsigned int, put
We want to take XML data and convert it to an NSDictionary object, but
I want to take a floating point number in C++, like 2.25125, and a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.