I know my question is kinda awkward but i really couldn't find the answer till now.
Is it possible to convert any video format (whatever was the size) to base 64 characters ?
Yes or No ?
Thank you in advance :)
Yes. Base64 is a method for encoding arbitrary binary data into text. There is nothing inherent in the format that would limit the size.
Related
I scanned an Aztec code and got the following result:
AQEpKCzOLQMf85T0bLRyJEZ3qukry/dsKwebnG2xESMj8JSSgmc=
I would like to know the encoded format and if possible the readable text to see what information is hidden behind the code!
Thanks.
Your scanned data is formatted in Base64. You can decode it to binary format in almost any programming language or tool like https://www.base64decode.org/
I tried to decode the value but, it isn't readable in any common character sets. You'll have to supply more information on to get any relevant answers. The author of barcode data would be your best bet (what is the usage of the code?)
I've accidentally downloaded PNG images as ASCII files. The original files are already deleted so I have now only the downloaded files. Is it possible to fix PNG files corrupted by ASCII conversion?
It depends. What kind of convertion was done? ( \r\n -> \n ? or the reverse?). If the image is really small, there is some probability of successful recovery but blindly doing the reverse convertion. See eg fixgz. Otherwise you should try all the alternatives, which can be a lot. The fact that PNG is structured in fixed length chunk can help, but it would take some work.
Generally there are too many permutations, for example if 3974 bytes have been replaced it'll take 2^3974 attempts to work out the image. It's much better to look for a similar image online and do a fuzzy comparison pctf.
How to read the pixel values of jpeg image using c/c++, without using any library.
I read about how compression takes place in jpeg in my course,i want header information.
For the syntax of the file you can check wikipedia.
Each segment has its own marker. The variable length segments have a two byte field for their length. So far is not really a problem, as you are able to extract all segments using this information (or at least it seems so on a first glance).
The more problematic part is to actually do something useful with the data inside the segments. The wikipedia page provides information on this topic, but it will require quite some mathematic knowledge to actually decode and grab the pixels.
Finally found some really helpful links..
link 1
link 2
Thanks for help and support.
i am wondering if there is any way to cycle through a .wav file to get the amplitude/DB of a specific point in the wav file. i am reading it into a byte array now but that has no help to me from what i can see.
i am using this in conjunction with some hardware i have developed that encodes light data into binary and outputs audio. i wont get into the details but i need to be able to do this in c# or c++. i cant find any info on this anywhere. i have never programmed anything relating to audio so excuse me if this is a very easy thing.
i dont have anything started since this is the starting point so if anybody can point me to some functions, libraries, or methods to being able to collect the amplitude of the wave at a specific time in the file, i would greatly appreciate it.
i hope this is enough info, and thank you in advance if you are kind enough to help.
It is possible and it is done in a straightforward way: the file with PCM audio contains one value for every channel, for every (1/sample-rate) of second.
The values however might vary: 8-bit, 16-bit, single precision floating point values. You certainly have to take this into account and this is the reason you cannot take the bytes from byte array directly.
The .WAV file also has a header preceding the actual payload.
What is the advantage of using Base64 encode?
I would like to understand it better. Do I really need it? Can't I simply use pure strings?
I heard that the encoding can be up to 30% larger than the original (at least for images).
Originally some protocols only allowed 7 bit, and sometimes only 6 bit, data.
Base64 allows one to encode 8 bit data into 6 bits for transmission on those types of links.
Email is an example of this.
The primary use case of base64 encoding is when you want to store or transfer data with a restricted set of characters; i.e. when you can't pass an arbitrary value in each byte.
<img alt="Embedded Image"
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIA..." />
This code will show encoded image, but no one can link to this image from another website and use your traffic.
Base64 decode
The advantages of Base64 encode, like somebody said, are available to transmit data from binary, into (most commonly) ASCII characters. Due to the likeliness that the receiving end can handle ASCII, it makes it a nice way to transfer binary data, via a text stream.
If your situation can handle native binary data, that will most likely yield better results, in terms of speed and such, but if not, Base64 is most likely the way to go. JSON is a great example of when you would benefit from something like this, or when it needs to be stored in a text field somewhere. Give us some more details and we can provide a better tailored answer.
One application is to transfer binary data in contexts where only characters are allowed. E.g. in XML documents/transfers. XML-RPC is an example of this.
Convert BLOB data to string and back...
Whether or not to use it depends on what you're using it for.
I've used it mostly for encoding binary data to pass through a mechanism that has really been created for text files. For example - when passing a digital certificate request around or retrieving the finished digital certificate -- in those cases, it's often very convenient to pass the binary data as Base 64 via a text field on a web form.
I probably wouldn't use it if you have something that is already text and you just want to pass it somewhere.
I use it for passing around files that tend to get chewed up by email programs because they look like text files (e.g. HL7 transcripts for replay).