【发布时间】:2020-11-24 11:34:11
【问题描述】:
我正在尝试从本地付费电话获取屏幕截图,以便使用图像识别来了解它的拥堵程度。每次从 AWS Lambda 运行命令时,我都尝试使用 ffmpeg 提取屏幕截图。我的问题是我无法从 m3u8 文件中提取任何类型的图像。
http://roads.mk/315/video-kameri
当我打开其中一个摄像头时,直播显示正常,但是当我右键单击复制地址时,我得到一个 blob 链接
blob:http://roads.mk/cb301be0-3e70-4d09-af2b-3f3d44ee8f4f
幸运的是,在网站的移动版上,一旦点击链接,它就会立即下载 m3u8 文件。一旦使用命令放入 ffmpeg
ffmpeg -i "gradsko_1.m3u8" -vf fps=1/3600 grad%04d.jpg
我收到回复
[hls @ 000000ce3d26d700] Skip ('#EXT-X-VERSION:3')
[hls @ 000000ce3d26d700] Opening 'gradsko_1-586008.ts' for reading
[hls @ 000000ce3d26d700] Failed to open segment 586008 of playlist 0
[hls @ 000000ce3d26d700] Opening 'gradsko_1-586009.ts' for reading
[hls @ 000000ce3d26d700] Failed to open segment 586009 of playlist 0
[hls @ 000000ce3d26d700] Opening 'gradsko_1-586010.ts' for reading
[hls @ 000000ce3d26d700] Failed to open segment 586010 of playlist 0
[hls @ 000000ce3d26d700] Skip ('#EXT-X-VERSION:3')
Last message repeated 3 times
[hls @ 000000ce3d26d700] Error when loading first segment 'gradsko_1-585991.ts'
gradsko_1.m3u8: Immediate exit requested
Exiting normally, received signal 2.```
From what I could tell, the stream seems to be protected.
Any way to get inside this? I would only need a single screenshot with no audio since the program would run once an hour/on command for a very general estimate. I'm just starting out with ffmpeg so any tips would be greatly appreciated.
【问题讨论】:
-
用 curl 下载 ts 文件,看看具体的 http 响应是什么。
标签: amazon-web-services ffmpeg http-live-streaming m3u8