python 是否适合家庭使用的视频库软件

发布于 2024-08-06 16:22:17 字数 124 浏览 3 评论 0原文

我正在考虑创建一个视频库软件,它可以跟踪我的所有视频并跟踪我尚未观看的视频和类似的统计数据。统计数据将特定于使用该软件的每个用户。

我的问题是,Python 是否适合创建这个软件,或者我是否需要像 C++ 这样的东西。

I am thinking of creating a video library software which keep track of all my videos and keep track of videos that I already haven't watched and stats like this. The stats will be specific to each user using the software.

My question is, is python appropriate to create this software or do I need something like c++.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

蘸点软妹酱 2024-08-13 16:22:17

Python 非常适合此类任务 - 事实上,最流行的视频网站 YouTube 本质上是用 Python 编程的(当然,使用 Python 中的低级组件称为来完成诸如 Web 服务、关系型任务等任务) db、视频转码——有很多此类可重用的开源组件可用于所有这些类型的任务,但应用程序的逻辑流和所有应用程序级逻辑可以完全使用 Python)。

就在昨天晚上,在山景城当地的Python兴趣小组会议上,我们有一些刚搬到硅谷的新成员,正是为了在视频行业从事基于Python的工作,他们说行业中专业水平的视频交接是很重要的。也越来越多地转向 Python——像 Pixar 和 ILM 这样的坚定支持者一直在使用 Python,但在过去的一两年里,Python 在行业中的采用如潮水般涌来。

Python is perfectly appropriate for such tasks - indeed the most popular video site, YouTube, is essentially programmed in Python (using, of course, lower-level components called from Python for such tasks as web serving, relational db, video transcoding -- there are plenty of such reusable opensource components for all these kinds of tasks, but your application's logic flow and all application-level logic can perfectly well be in Python).

Just yesterday evening, at the local Python interest group meeting in Mountain View, we had new members who just moved to Silicon Valley exactly to take Python-based jobs in the video industry, and they were saying that professional level video handing in the industry is also veering more and more towards Python -- stalwarts like Pixar and ILM had been using Python forever, but in the last year or two it's been a flood of Python adoption in the industry.

请帮我爱他 2024-08-13 16:22:17

如果您希望代码真正快速,请使用 C++(或并行 fortran)。

然而,在您的应用程序中,99% 的运行时不会在您的代码中,而是在 GUI 库、操作系统调用、等待用户交互、调用库(用 C 编写)来打开视频文件和制作缩略图中,那种东西。

因此,使用 C++ 将使您的代码速度提高 100 倍,而您的应用程序将因此速度提高 1%,这是完全没有用的。如果你用 C++ 编写它,你将需要几个月的时间,而使用 Python,你会更快地完成并享受更多乐趣。

使用 C++ 甚至可能会慢很多,因为在 Python 中,您可以通过使用超级强大的原语(如哈希、集合、生成器等)轻松构建更具可扩展性的算法,在 5 分钟内尝试多种算法,看看哪一个是最好的,导入一个已经完成 90% 工作的库,等等。

用 Python 编写。

If you want your code to be REAL FAST, use C++ (or parallel fortran).

However in your application, 99% of the runtime isn't going to be in YOUR code, it's going to be in GUI libraries, OS calls, waiting for user interaction, calling libraries (written in C) to open video files and make thumbnails, that kind of stuff.

So using C++ will make your code 100 times faster, and your application will, as a result, be 1% faster, which is utterly useless. And if you write it in C++ you'll need months, whereas using Python you'll be finished much faster and have lots more fun.

Using C++ could even make it a lot slower, because in Python you can very easily build more scalable algorithms by using super powerful primitives like hashes, sets, generators, etc, try several algorithms in 5 minutes to see which one is the best, import a library which already does 90% of the work, etc.

Write it in Python.

我还不会笑 2024-08-13 16:22:17

是的。对于这样的事情,Python 比 C++ 更容易使用。您可能想将其用作数据库(例如 sqlite3)的前端

Yes. Python is much easier to use than c++ for something like this. You may want to use it as a front-end to a DB such as sqlite3

む无字情书 2024-08-13 16:22:17

也许你应该看看这个项目:
Moovida

这是一个完整的媒体中心,开源,用 python 编写,易于扩展。我不知道它是否能完全满足您的需要,但您可以轻松添加您想要的功能。

Maybe you should take a look at this project:
Moovida

It's a complete media center, open source, written in python that is easy to extend. I don't know if it will do exactly what you want out of the box but you can probably easily add the features you want.

仅此而已 2024-08-13 16:22:17

当然,您可以使用几乎任何编程语言来完成几乎任何任务。但在注意到这一点之后,很明显,不同的语言对不同任务的适应程度也不同。

C/C++ 是非常“硬件友好”的语言。基本上,这些语言只是汇编程序之上的一个抽象级别,C 使用指针等。如果有人想搞笑的话,C++ 几乎就像一个(半)可移植的面向对象的汇编程序。 :) 这使得 C/C++ 速度更快并且擅长与硬件对话。

但在其他情况下,这些相同的功能就会变成错误的功能。指针使得遍历整个内存成为可能,除非你小心,否则你会到处泄漏内存。所以我想说(现在 C 语言的人会生气)C/C++ 实际上对于你想做的事情来说是不合适的。

您想要一种更高级的语言,可以自动且不可见地执行更多操作,例如内存管理。有很多可供选择,但毫无疑问,Python 非常适合于此。 Python 在过去几年中作为编写此类软件的新酷语言而出现,许多多媒体软件(例如 Freevo 和已经提到的 Moovida)都是用 Python 编写的。

Of course you can use almost any programming language for almost any task. But after noting that, it's also obvious that different languages are also differently well adapted for different tasks.

C/C++ are languages that are very "hardware friendly". Basically, the languages are just one abstraction level above assembler, with C's use of pointers etc. C++ is almost like a (semi-)portable object oriented assembler, if one wants to be funny. :) This makes C/C++ fast and good at talking to hardware.

But those same features become mis-features in other cases. The pointers make it possible to walk all over the memory and unless you are careful you will leak memory all over the place. So I would say (and now C people will get angry) that C/C++ in fact are directly inappropriate for what you want to do.

You want a language that are higher, does more things like memory management automatically and invisibly. There are many to choose from there, but without a doubt Python is eminently suited for this. Python has the last couple of years emerged as The New Cool Language to write these kind of softwares in, and much multimedia software such as Freevo and the already mentioned Moovida are written in Python.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文