视频转换器和下载器 [英] Video Converter and downloader

查看:97
本文介绍了视频转换器和下载器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须为我的项目制作一个程序,即下载YouTube视频并将其转换为其他格式.我找不到正确的学习来源或开始工作!您能告诉我在Java或C#上可以下载视频并进行转换的信息源,以便我可以开始工作....
请帮助解决方案!

i have to make a program for my project i.e. downloading YouTube videos and converting it to different formats. i cant find the right source to study or get my work started! can you please tell me the source where i can learn about downloading a video and converting it, in java or c# so i can start my work....
plz help!

推荐答案

如果您无法启动它而又找不到找到它的源代码,那不是编程.您可以像下载其他任何文件一样下载视频.网上有大量示例,介绍如何通过HTTP请求下载和上传文件.然后,转换变得更加复杂,但是您可以通过自动化使用大量工具.
If you can''t start it without finding source that does it, that''s not programming. You can download a video just like any other file. There''s tons of samples on the web for how to download and upload files via a HTTP request. Then, the conversion is more complex, but there''s tons of tools you could automate to do that.


问题不在于下载. YouTube的唯一问题是从您可以观看视频的页面中提取要下载的URI .您需要搜索网络上的食谱-问题是youtube.com不定期更改结构,因此您需要获取新鲜的信息,然后尝试一下手动退出,请确保它现在可以正常运行,然后在您的代码中实现它.确保它足够灵活,因为您稍后可能需要更改算法,因此最好使其成为数据驱动/规则驱动的算法.该算法本身总是很琐碎:您有一个视频观看页面,然后使用某些搜索条件在此页面上找到一些URI或视频ID,提取视频ID上的数据,从该数据中构成新的URI,然后将该URI用于正在下载.

正在下载:请参阅我完整且随时可用的应用程序.它的重要功能是可以继续下载部分下载的资源.此处:
如何从Internet下载文件 [ ^ ].

有关更多信息,请参阅我过去的答案:
FTP:下载文件 [如何从中下载文件Asp.net 2.0中的服务器 [如何从另一个站点获取数据 [ ^ ],
从网页中获取特定数据 [ http://en.wikipedia.org/wiki/Ffmpeg [ http://ffmpeg.org/ [ ^ ],
http://en.wikipedia.org/wiki/Libavcodec [ http://libav.org/ [ ^ ].

或者:
http://en.wikipedia.org/wiki/VideoLAN [ http://www.videolan.org/ [ ^ ].

上面列出的所有产品都是开源的,因此,您可以直接使用应用程序(将System.Process.StartStandardOutput/StandardError上的重定向一起考虑;您可以在此类的MSDN帮助页面上找到示例),将代码嵌入到您的代码中(想想P/Invoke或中间C ++/CLI混合模式库或JNI),或将算法翻译成您想要使用的语言.

—SA
The problem is not downloading. The only problem with YouTube is extracting the URI for downloading from the page where you can watch the video. You need to search for the recipe on the Web — the trouble is, youtube.com changes the structure from time to time, so you need to get fresh information, try it out manually, make sure it works right now and then implement it in your code. Make sure it''s flexible enough, because you may need to change the algorithm later, so better make it data-driven/rule-driven. The algorithm itself if always trivial: you have a video watching page, then you find some URI or video ID on this page using certain search criteria, extract data on video ID, compose new URI out of this data, and later use this URI for downloading.

Downloading: please see my complete and ready-to-use application. It''s important feature is the possibility to continue downloading of the partially downloaded resource. Here:
how to download a file from internet[^].

For some more information, please see my past answers:
FTP: Download Files[^],
how to download a file from the server in Asp.net 2.0[^],
How to get the data from another site[^],
get specific data from web page[^].

Conversion:
http://en.wikipedia.org/wiki/Ffmpeg[^],
http://ffmpeg.org/[^],
http://en.wikipedia.org/wiki/Libavcodec[^],
http://libav.org/[^].

Alternatively:
http://en.wikipedia.org/wiki/VideoLAN[^],
http://www.videolan.org/[^].

All the products listed above are open-source, so, you can either use the applications directly (think System.Process.Start with redirection on StandardOutput/StandardError; you will find the samples on the MSDN help pages on this class), embed the code in your code (think P/Invoke or intermediate C++/CLI mixed-mode library, or JNI) or translate the algorithms in the language you want to use.

—SA


这篇关于视频转换器和下载器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆