How can I use java to download a video file from http url(video streaming link)?(如何使用 java 从 http url(视频流链接)下载视频文件?)
问题描述
可能重复:
如何从现场获取视频链接使用 java 流式传输视频?
大家好!
我必须开发一个应用程序来将任何视频文件从 http url(视频流)下载到本地系统.有没有免费的api.还有一些网站,如 youtube.这里没有可用于视频文件的直接链接.在这种情况下,我怎样才能获得确切的视频文件链接.我还需要java源来保存来自url的视频文件.
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.
谢谢!
推荐答案
(免责声明:我是的作者休息).
这是一个关于如何将谷歌地图图像直接下载到磁盘的代码示例:
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(视频流链接)下载视频文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何使用 java 从 http url(视频流链接)下载视频文件?
基础教程推荐
- REST Web 服务返回 415 - 不支持的媒体类型 2022-01-01
- 无法复制:“比较方法违反了它的一般约定!" 2022-01-01
- 使用堆栈算法进行括号/括号匹配 2022-01-01
- RabbitMQ:消息保持“未确认"; 2022-01-01
- 如何对 Java Hashmap 中的值求和 2022-01-01
- 存储 20 位数字的数据类型 2022-01-01
- Spring AOP错误无法懒惰地为此建议构建thisJoinPoin 2022-09-13
- 修改 void 函数的输入参数,然后读取 2022-01-01
- 问题http://apache.org/xml/features/xinclude测试日志4j 2 2022-01-01
- Struts2 URL 无法访问 2022-01-01
