如何使用java从http url(视频流链接)下载视频文件? [英] How can I use java to download a video file from http url(video streaming link)?

查看:5055
本文介绍了如何使用java从http url(视频流链接)下载视频文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


可能重复:

如何从使用java的实时流式视频获取视频链接


Hello all!



我必须开发一个应用程序来从http url下载任何视频文件视频流)到本地系统。有没有任何免费的api为此。还有一些网站像YouTube。这里没有可用于视频文件的直接链接。在这种情况下,如何获取确切的视频文件链接。
另外我需要java源文件从url保存视频文件。



谢谢!

解决方案

(免责声明:我是 Resty 的作者)。 p>

这是一个关于如何将google地图图片直接下载到磁盘的代码示例:

 code> Resty r = new Resty(); 
文件f = r.bytes(http://maps.google.com/maps/api/staticmap?size=512x512+
& maptype = hybrid& markers = size:mid% 7Ccolor:红%7C37.815649,-122.477646&安培;传感器=假)。
save(File.createTempFile(google,.png));


Possible Duplicate:
how to get video link from of live streaming videos using java?

Hello all!

I have to develop an application to download any video file from http url (video stream) to local system. Is there any free api for this. also there are some sites like youtube. Here no direct links available for video file. In such cases how can I get the exact video file link. Also I need java source to save video file from url.

Thanks!

解决方案

(Disclaimer: I'm the author of Resty).

Here is a code-example on how to download a google map image straight to disk:

Resty r = new Resty();
File f = r.bytes("http://maps.google.com/maps/api/staticmap?size=512x512" +
  "&maptype=hybrid&markers=size:mid%7Ccolor:red%7C37.815649,-122.477646&sensor=false").
  save(File.createTempFile("google", ".png"));

这篇关于如何使用java从http url(视频流链接)下载视频文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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