Converting string to video and video to string | Sololearn: Learn to code for FREE!

+2

Converting string to video and video to string

How to convert string to video and video to string in JAVA... Hi guys! I need help,i have trouble with my code, if you guys can help me then please help me... i used netbeans IDE and jdk 1.8

5/12/2018 2:10:18 PM

Frida Nuraman Farid

11 Answers

New Answer

+4

Frida Nuraman Farid If you have a video file and want to read it just as string, then simply read it as byte (prefer) stream or character stream by opening the video file in a binary mode. For converting back the byte strem to video, create a new file (in binary mode) and write the data from byte stream to file. However if you are creating a new video file from the data generated by your program, then it is not easy. You will have to create and properly fill the video file header and append the raw data

+3

What is the video in the form of? Is it a 3-dimensional of color values (2 dimensions for each frame and the third for those 2 dimensions across time) or is it something else? I did not understand completely!

+3

Frida Nuraman Farid Sorry i do not have java on my smartphone and i can't read a file at sololearn. But i suggest to take look at java.nio.files.Files package and you can directly read a file into a string as String content = new String(Files.readAllBytes(Paths.get(fileName)) It may not be the most efficient method though. :)

+1

interesting but i dont know

+1

Frida Nuraman Farid You are Welcome :)

+1

I have code for generate key using seed128, but now my problem is if i trying to encrypt video it error, if you guy want help me give me your email and i will send you my code

0

I want to encrypt and decrypt the video using crypto algorithm SEED128, only video files such as movie trailers, music videos

0

Can you posting the code example in java