且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何将视频转换为二进制,反之亦然C#

更新时间:2022-12-07 17:36:48

你在做什么是完全错误的:如果你想以十六进制字节显示视频文件,那么你可以这样做:

What you are doing is completely wrong: if you want to display a video file as hexadecimal bytes, then you can do it like this:
byte[] bytes = System.IO.File.ReadAllBytes(sellected-file);
textBox2.Text = BitConverter.ToString(bytes);



但是......你确实意识到视频文件倾向于大量的字节,那个将它们转换为十六进制字符串会使所需的空间增加三倍?这不是一个快速的过程,除了琐碎的视频文件...


But... you do realise that video files tend towards a huge number of bytes, and that converting them to a hex string will treble the amount of space needed? This will not be a fast process anything other than trivial video files...


Quote:

如何将视频转换为二进制,反之亦然C#

How to convert video to binary and vice versa C#

这没有意义,因为视频文件是二进制的,没有转换要做。

This is no sense, because video files are binary, there is no conversion to do.

引用:

如果你将文件的扩展名改为* .bin你可以看到1和0?

你看不到很多字符

if you change extension of file to *.bin you could see 1s and 0s ?
no you see a lot of character

没意义,文件扩展名只是为了帮助Windows在你想打开文件时选择合适的工具。

No sense, the file extension is just here to help windows choose the right tool when you want to open a file.

引用:

二进制代码如何将其转换为视频文件?

a binary code how to convert it to video file?

你没有。没有任何东西可以将一些二进制数据转换为视频,如果它还没有准备好视频。



当我想看到视频文件的内部时,我用程序员打开它编辑器,并说编辑器将其显示为十六进制。我使用UltraEdit。

UltraEdit:数百万信任的文本编辑器 [ ^ ]



注意:打开文件时,你可以告诉你想要使用哪个工具。这是Windows知识。

You don't. Nothing can transform some binary data to video if it is not video all ready.

When I want to see the inside of a video file, I open it with a programmer's editor, and say the editor to display it as hexadecimal. I use UltraEdit.
Ultra the text editor trusted by millions[^]

Nota: when you open a file, you can tell which tool you want to use. This is windows knowledge.