获取网页m3u8:从网页下载 m3u8视频(download m3u8)

关于获取网页m3u8的问题,在download m3u8中经常遇到, 我想从网页下载一个视频。我找到了 m3u8 文件并获得了链接,在 FFmpeg 中使用它们,终于出了点问题。

我想从网页下载一个视频。我找到了 m3u8 文件并获得了链接,在 FFmpeg 中使用它们,终于出了点问题。

这是 m3u8 文件开头的捕获。

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-ALLOW-CACHE:YES
#EXT-X-TARGETDURATION:13
#EXTINF:10.080000,
https://ddcdn.jd.com/ddimg/jfs/t1/203028/24/17499/1876858/61a85ec0Ef32e255f/289bf6dd94343ed0.bmp
#EXTINF:10.000000,
https://ddcdn.jd.com/ddimg/jfs/t1/140366/35/22093/1147042/61a85ec0E850c8c8e/30b8a5e3032486ea.bmp
#EXTINF:10.000000,
https://ddcdn.jd.com/ddimg/jfs/t1/213475/10/6333/1554250/61a85ec0Ecc4703c3/39107a4d803fc188.bmp
#EXTINF:8.040000,
https://ddcdn.jd.com/ddimg/jfs/t1/205672/5/17259/1669682/61a85ec0Eff60ae58/fca014f8ef9bdcdc.bmp
#EXTINF:10.000000,
https://ddcdn.jd.com/ddimg/jfs/t1/217728/38/6334/1906374/61a85ec0Eeaf23ef5/d9ec645ad064f527.bmp

这是我在 cmd 中输入和输出的内容。

Input
ffmpeg -i "https://hls.kmzhiqing.com/hls/m3u8/1452590c00595055de5750d1595519554f525372617d0d4061.m3u8" 1.mp4
Output
ffmpeg version N-100036-ge2f5e2 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 9.3-win32 (GCC) 20200320
  configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --enable-shared --disable-static --disable-debug --disable-w32threads --enable-pthreads --enable-iconv --enable-zlib --enable-libxml2 --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-opencl --enable-libvmaf --enable-vulkan --enable-libvorbis --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --enable-ffnvcodec --enable-cuda-llvm --enable-libglslang --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-libs=-lgomp
  libavutil      56. 60.100 / 56. 60.100
  libavcodec     58.113.100 / 58.113.100
  libavformat    58. 64.100 / 58. 64.100
  libavdevice    58. 11.103 / 58. 11.103
  libavfilter     7. 90.100 /  7. 90.100
  libswscale      5.  8.100 /  5.  8.100
  libswresample   3.  8.100 /  3.  8.100
  libpostproc    55.  8.100 / 55.  8.100
[hls @ 000001d87d857740] Skip ('#EXT-X-VERSION:3')
[hls @ 000001d87d857740] Skip ('#EXT-X-ALLOW-CACHE:YES')
[hls @ 000001d87d857740] Opening 'https://ddcdn.jd.com/ddimg/jfs/t1/203028/24/17499/1876858/61a85ec0Ef32e255f/289bf6dd94343ed0.bmp' for reading
[hls @ 000001d87d857740] Opening 'https://ddcdn.jd.com/ddimg/jfs/t1/140366/35/22093/1147042/61a85ec0E850c8c8e/30b8a5e3032486ea.bmp' for reading
[hls @ 000001d87d857740] Could not find codec parameters for stream 0 (Video: bmp, none): unspecified size
Consider increasing the value for the 'yzeduration' (0) and 'probesize' (5000000) options
Input #0, hls, from 'https://hls.kmzhiqing.com/hls/m3u8/1452590c00595055de5750d1595519554f525372617d0d4061.m3u8':
  Duration: 00:24:24.60, bitrate: N/A
  Program 0
    Metadata:
      variant_bitrate : 0
    Stream #0:0: Video: bmp, none, 25 tbr, 25 tbn, 25 tbc
    Metadata:
      variant_bitrate : 0
Output #0, mp4, to '1.mp4':
Output file #0 does not contain any stream

我发现 m3u8 文件中的链接是一个 bmp 文件而不是 mp4。

有关系吗????谁能告诉我怎么下载 mp4 视频文件?

感谢您阅读此!

0

在这里试试这个:

-$ ffmpeg -i <http://url/.m3u8> -c copy -bsf:a aac_adtstoasc video_name.mp4

本站系公益性非盈利分享网址,本文来自用户投稿,不代表码文网立场,如若转载,请注明出处

(909)
Case code:使用 switch、case和fallthrough的 Swift示例代码
上一篇
Dmp o:读取 windows*.dmp文件
下一篇

相关推荐

发表评论

登录 后才能评论

评论列表(20条)