V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
param
V2EX  ›  问与答

flv + hls(m3u8) 可以实现在手机浏览器播放吗?

  •  
  •   param · 2017-03-04 04:55:20 +08:00 · 10131 次点击
    这是一个创建于 2840 天前的主题,其中的信息可能已经有所发展或是发生改变。

    百度网盘中的播放器,大多数视频是 hls + flv (m3u8 + ts),可以实现在手机浏览器中播放吗? 从百度网盘中拿到的m3u8,用播放器直接播放是可以的,可是手机浏览器不支持flv。不知道flv.js之类的东西有没有用,flv.js好像不支持hls。

    第 1 条附言  ·  2017-03-04 14:04:29 +08:00
    发现百度网盘有非 flv 的接口,所以我绕过了这个问题。但这个问题依然没有 解决,所以如果大家有方案的话可以分享一下。
    15 条回复    2017-03-04 13:32:49 +08:00
    param
        1
    param  
    OP
       2017-03-04 04:59:55 +08:00
    我的意思是一个 m3u8 里面包含着各个 flv 格式的视频分段



    m3u8 如下

    ```
    #EXTM3U
    #EXT-X-TARGETDURATION:15
    #EXT-X-DISCONTINUITY
    #EXTINF:10,
    https://v0.baidupcs.com/video/netdisk-videotran-qingdao/e85666a8c0abfaac0791e2289329124e_8242_1_ts?ehps=1&iv=0&uo=any&to=pvb00&range=0-642617&xcode=86d4ee63526df30fc0f12a081dc3a839054957dc4cb23e86f77424e07ee197d9&fid=c92c9157e846d37f025fbe09dea64f9f-805534055&ouk=805534055&len=642618&time=1488571747&r=111893335&sign=BOUTHNF-F3530edecde9cd71b79378b290804a96-k73qtXBM5XUIpD6gTw9Sr6hpOcE%253D&sta_dx=1408&sta_cs=2534&app_id=250528&logid=1438101927057599948&region=qingdao&isplayer=&devuid=
    #EXTINF:10,
    https://v0.baidupcs.com/video/netdisk-videotran-qingdao/e85666a8c0abfaac0791e2289329124e_8242_1_ts?ehps=1&iv=0&uo=any&to=pvb00&range=642618-1366823&xcode=86d4ee63526df30fc0f12a081dc3a839054957dc4cb23e86f77424e07ee197d9&fid=9ec6a4ff8e35e2611f2f2a40d1cbe6aa-805534055&ouk=805534055&len=724206&time=1488571747&r=111893335&sign=BOUTHNF-F3530edecde9cd71b79378b290804a96-DQf9sF3%252BnBVdfxfs%252BZ81HW99od8%253D&sta_dx=1408&sta_cs=2534&app_id=250528&logid=1438101927057599948&region=qingdao&isplayer=&devuid=
    #EXTINF:10,
    https://v0.baidupcs.com/video/netdisk-videotran-qingdao/e85666a8c0abfaac0791e2289329124e_8242_1_ts?ehps=1&iv=0&uo=any&to=pvb00&range=1366824-2221786&xcode=86d4ee63526df30fc0f12a081dc3a839054957dc4cb23e86f77424e07ee197d9&fid=f872739d29d3851ad31485efdea8b0dc-805534055&ouk=805534055&len=854963&time=1488571747&r=111893335&sign=BOUTHNF-F3530edecde9cd71b79378b290804a96-W1btyoXEWa%252BA5Er4bd53vbW2k8w%253D&sta_dx=1408&sta_cs=2534&app_id=250528&logid=1438101927057599948&region=qingdao&isplayer=&devuid=
    #EXTINF:10,
    https://v0.baidupcs.com/video/netdisk-videotran-qingdao/e85666a8c0abfaac0791e2289329124e_8242_1_ts?ehps=1&iv=0&uo=any&to=pvb00&range=2221787-2773735&xcode=86d4ee63526df30fc0f12a081dc3a839054957dc4cb23e86f77424e07ee197d9&fid=ef43a8b41c8f222d6e7018efc2c73ae8-805534055&ouk=805534055&len=551949&time=1488571747&r=111893335&sign=BOUTHNF-F3530edecde9cd71b79378b290804a96-HUmgvU3tlDh5ESxH5ybNi1xuMlI%253D&sta_dx=1408&sta_cs=2534&app_id=250528&logid=1438101927057599948&region=qingdao&isplayer=&devuid=
    #EXTINF:10,
    https://v0.baidupcs.com/video/netdisk-videotran-qingdao/e85666a8c0abfaac0791e2289329124e_8242_1_ts?ehps=1&iv=0&uo=any&to=pvb00&range=2773736-3491759&xcode=86d4ee63526df30fc0f12a081dc3a839054957dc4cb23e86f77424e07ee197d9&fid=2f178e8b11dc5ecd95d5abca49f6cacd-805534055&ouk=805534055&len=718024&time=1488571747&r=111893335&sign=BOUTHNF-F3530edecde9cd71b79378b290804a96-HAyOI2120zUnUOt%252BYr5Y9f5EBVI%253D&sta_dx=1408&sta_cs=2534&app_id=250528&logid=1438101927057599948&region=qingdao&isplayer=&devuid=
    #EXTINF:10,
    https://v0.baidupcs.com/video/netdisk-videotran-qingdao/e85666a8c0abfaac0791e2289329124e_8242_1_ts?ehps=1&iv=0&uo=any&to=pvb00&range=3491760-4298087&xcode=86d4ee63526df30fc0f12a081dc3a839054957dc4cb23e86f77424e07ee197d9&fid=b99b7ee7f33e0bf1a527b7c193365ff7-805534055&ouk=805534055&len=806328&time=1488571747&r=111893335&sign=BOUTHNF-F3530edecde9cd71b79378b290804a96-zXPjTKz3wbW8JV8YiN%252FeQrwCMo4%253D&sta_dx=1408&sta_cs=2534&app_id=250528&logid=1438101927057599948&region=qingdao&isplayer=&devuid=
    #EXTINF:10,
    https://v0.baidupcs.com/video/netdisk-videotran-qingdao/e85666a8c0abfaac0791e2289329124e_8242_1_ts?ehps=1&iv=0&uo=any&to=pvb00&range=4298088-5129336&xcode=86d4ee63526df30fc0f12a081dc3a839054957dc4cb23e86f77424e07ee197d9&fid=c912ea1089b58cdca288b04a6a469dbc-805534055&ouk=805534055&len=831249&time=1488571747&r=111893335&sign=BOUTHNF-F3530edecde9cd71b79378b290804a96-QdkE%252BZlYokJx6zXB%252BT33RE%252F0hu8%253D&sta_dx=1408&sta_cs=2534&app_id=250528&logid=1438101927057599948&region=qingdao&isplayer=&devuid=
    #EXTINF:10,
    https://v0.baidupcs.com/video/netdisk-videotran-qingdao/e85666a8c0abfaac0791e2289329124e_8242_1_ts?ehps=1&iv=0&uo=any&to=pvb00&range=5129337-5857581&xcode=86d4ee63526df30fc0f12a081dc3a839054957dc4cb23e86f77424e07ee197d9&fid=b35f69b533d58d3b50617ae8cfe463dd-805534055&ouk=805534055&len=728245&time=1488571747&r=111893335&sign=BOUTHNF-F3530edecde9cd71b79378b290804a96-zT%252FAzZIApXylkooT1%252FzOcTZ6qAY%253D&sta_dx=1408&sta_cs=2534&app_id=250528&logid=1438101927057599948&region=qingdao&isplayer=&devuid=
    #EXTINF:10,
    https://v0.baidupcs.com/video/netdisk-videotran-qingdao/e85666a8c0abfaac0791e2289329124e_8242_1_ts?ehps=1&iv=0&uo=any&to=pvb00&range=5857582-6588299&xcode=86d4ee63526df30fc0f12a081dc3a839054957dc4cb23e86f77424e07ee197d9&fid=c28fb38e362723a6775e1dfed8633a00-805534055&ouk=805534055&len=730718&time=1488571747&r=111893335&sign=BOUTHNF-F3530edecde9cd71b79378b290804a96-zGxcaTVqFhOtynFswXcyXMI7txc%253D&sta_dx=1408&sta_cs=2534&app_id=250528&logid=1438101927057599948&region=qingdao&isplayer=&devuid=
    #EXTINF:10,
    https://v0.baidupcs.com/video/netdisk-videotran-qingdao/e85666a8c0abfaac0791e2289329124e_8242_1_ts?ehps=1&iv=0&uo=any&to=pvb00&range=6588300-7341385&xcode=86d4ee63526df30fc0f12a081dc3a839054957dc4cb23e86f77424e07ee197d9&fid=90d7b0f1d62ac3bc21df01cf8d791701-805534055&ouk=805534055&len=753086&time=1488571747&r=111893335&sign=BOUTHNF-F3530edecde9cd71b79378b290804a96-VawKZbd2FVdxsD8A5NFrysmg59Y%253D&sta_dx=1408&sta_cs=2534&app_id=250528&logid=1438101927057599948&region=qingdao&isplayer=&devuid=
    #EXTINF:10,
    https://v0.baidupcs.com/video/netdisk-videotran-qingdao/e85666a8c0abfaac0791e2289329124e_8242_1_ts?ehps=1&iv=0&uo=any&to=pvb00&range=7341386-8190165&xcode=86d4ee63526df30fc0f12a081dc3a839054957dc4cb23e86f77424e07ee197d9&fid=0bb309602bc2d1fdf03977cf23b3ae36-805534055&ouk=805534055&len=848780&time=1488571747&r=111893335&sign=BOUTHNF-F3530edecde9cd71b79378b290804a96-aVf0lbFkNcicMxqQUx%252Bd6M8G%252BXA%253D&sta_dx=1408&sta_cs=2534&app_id=250528&logid=1438101927057599948&region=qingdao&isplayer=&devuid=
    #EXTINF:10,
    https://v0.baidupcs.com/video/netdisk-videotran-qingdao/e85666a8c0abfaac0791e2289329124e_8242_1_ts?ehps=1&iv=0&uo=any&to=pvb00&range=8190166-9032622&xcode=86d4ee63526df30fc0f12a081dc3a839054957dc4cb23e86f77424e07ee197d9&fid=63f3849e90af0c55fabb3ec43acae087-805534055&ouk=805534055&len=842457&time=1488571747&r=111893335&sign=BOUTHNF-F3530edecde9cd71b79378b290804a96-p7NPTdeSMSwgJnJP%252BXR0CstLhJQ%253D&sta_dx=1408&sta_cs=2534&app_id=250528&logid=1438101927057599948&region=qingdao&isplayer=&devuid=
    #EXTINF:10,
    https://v0.baidupcs.com/video/netdisk-videotran-qingdao/e85666a8c0abfaac0791e2289329124e_8242_1_ts?ehps=1&iv=0&uo=any&to=pvb00&range=9032623-9678760&xcode=86d4ee63526df30fc0f12a081dc3a839054957dc4cb23e86f77424e07ee197d9&fid=4cca67b94f205c5110631c2b06889436-805534055&ouk=805534055&len=646138&time=1488571747&r=111893335&sign=BOUTHNF-F3530edecde9cd71b79378b290804a96-HCrc0LanfpO59VulXbiKFnb9PVM%253D&sta_dx=1408&sta_cs=2534&app_id=250528&logid=1438101927057599948&region=qingdao&isplayer=&devuid=
    #EXTINF:10,
    https://v0.baidupcs.com/video/netdisk-videotran-qingdao/e85666a8c0abfaac0791e2289329124e_8242_1_ts?ehps=1&iv=0&uo=any&to=pvb00&range=9678761-10643744&xcode=86d4ee63526df30fc0f12a081dc3a839054957dc4cb23e86f77424e07ee197d9&fid=090b8ac9bf49c0954fa7081cd5f43d4f-805534055&ouk=805534055&len=964984&time=1488571747&r=111893335&sign=BOUTHNF-F3530edecde9cd71b79378b290804a96-Qq57SWfN6RBysOTBQQgs7H653vM%253D&sta_dx=1408&sta_cs=2534&app_id=250528&logid=1438101927057599948&region=qingdao&isplayer=&devuid=
    #EXTINF:10,
    https://v0.baidupcs.com/video/netdisk-videotran-qingdao/e85666a8c0abfaac0791e2289329124e_8242_1_ts?ehps=1&iv=0&uo=any&to=pvb00&range=10643745-11297615&xcode=86d4ee63526df30fc0f12a081dc3a839054957dc4cb23e86f77424e07ee197d9&fid=618ca36a09a84fd5bdc85c4ecf710b56-805534055&ouk=805534055&len=653871&time=1488571747&r=111893335&sign=BOUTHNF-F3530edecde9cd71b79378b290804a96-K6MyDtdwYYCBDs%252BREPXUyyffYxg%253D&sta_dx=1408&sta_cs=2534&app_id=250528&logid=1438101927057599948&region=qingdao&isplayer=&devuid=
    #EXTINF:10,
    https://v0.baidupcs.com/video/netdisk-videotran-qingdao/e85666a8c0abfaac0791e2289329124e_8242_1_ts?ehps=1&iv=0&uo=any&to=pvb00&range=11297616-11939941&xcode=86d4ee63526df30fc0f12a081dc3a839054957dc4cb23e86f77424e07ee197d9&fid=03bddd2b66730eb80ec09ea98c7ce7d0-805534055&ouk=805534055&len=642326&time=1488571747&r=111893335&sign=BOUTHNF-F3530edecde9cd71b79378b290804a96-2tpTzCDbsX0DU6z0mpSE8So8VCY%253D&sta_dx=1408&sta_cs=2534&app_id=250528&logid=1438101927057599948&region=qingdao&isplayer=&devuid=
    #EXTINF:10,
    https://v0.baidupcs.com/video/netdisk-videotran-qingdao/e85666a8c0abfaac0791e2289329124e_8242_1_ts?ehps=1&iv=0&uo=any&to=pvb00&range=11939942-12746463&xcode=86d4ee63526df30fc0f12a081dc3a839054957dc4cb23e86f77424e07ee197d9&fid=71617b6d98c845f78bfe668f50376823-805534055&ouk=805534055&len=806522&time=1488571747&r=111893335&sign=BOUTHNF-F3530edecde9cd71b79378b290804a96-v%252BtYjfYssy1RWxflaw3MbIJUK6o%253D&sta_dx=1408&sta_cs=2534&app_id=250528&logid=1438101927057599948&region=qingdao&isplayer=&devuid=
    #EXTINF:10,
    https://v0.baidupcs.com/video/netdisk-videotran-qingdao/e85666a8c0abfaac0791e2289329124e_8242_1_ts?ehps=1&iv=0&uo=any&to=pvb00&range=12746464-13445649&xcode=86d4ee63526df30fc0f12a081dc3a839054957dc4cb23e86f77424e07ee197d9&fid=3cc0d47a548fd31b5d77c13dc95762a3-805534055&ouk=805534055&len=699186&time=1488571747&r=111893335&sign=BOUTHNF-F3530edecde9cd71b79378b290804a96-xAAbeYVSnytfVh8i15zY2Op2K%252BM%253D&sta_dx=1408&sta_cs=2534&app_id=250528&logid=1438101927057599948&region=qingdao&isplayer=&devuid=
    #EXTINF:10,
    https://v0.baidupcs.com/video/netdisk-videotran-qingdao/e85666a8c0abfaac0791e2289329124e_8242_1_ts?ehps=1&iv=0&uo=any&to=pvb00&range=13445650-14224746&xcode=86d4ee63526df30fc0f12a081dc3a839054957dc4cb23e86f77424e07ee197d9&fid=94d653a3e0a27f4c56eb2bf0ac45d86f-805534055&ouk=805534055&len=779097&time=1488571747&r=111893335&sign=BOUTHNF-F3530edecde9cd71b79378b290804a96-jf6ntNcYDMJuxPkdLvgBoRTSCa4%253D&sta_dx=1408&sta_cs=2534&app_id=250528&logid=1438101927057599948&region=qingdao&isplayer=&devuid=
    #EXTINF:10,
    https://v0.baidupcs.com/video/netdisk-vide
    param
        2
    param  
    OP
       2017-03-04 05:02:31 +08:00
    emric
        3
    emric  
       2017-03-04 05:35:35 +08:00
    MrXiong
        4
    MrXiong  
       2017-03-04 08:34:36 +08:00
    flv 在手机端目前不支持
    YanwenSun
        5
    YanwenSun  
       2017-03-04 08:44:03 +08:00 via Android
    这是 ts 不是 flv hls 本身只能用 ts m2ts 这类流
    param
        6
    param  
    OP
       2017-03-04 11:39:14 +08:00 via Android
    @YanwenSun 可是得到的文件头部写着 flv
    param
        7
    param  
    OP
       2017-03-04 11:57:52 +08:00 via Android
    @YanwenSun 用 file 命令,也得出了 flv 格式
    param
        8
    param  
    OP
       2017-03-04 12:15:48 +08:00
    @emric hls 提示 no demux matching with content found
    YanwenSun
        10
    YanwenSun  
       2017-03-04 12:42:40 +08:00
    @param 百度居然真用的 flv 不过找个 flv 的 demux 加到这个 hls.js 改动一下应该可以吧 毕竟只是封装
    LINAICAI
        11
    LINAICAI  
       2017-03-04 12:44:02 +08:00 via iPhone
    苹果原生支持的吧
    param
        12
    param  
    OP
       2017-03-04 12:45:40 +08:00
    @YanwenSun 有没有更多 tips ,因为我对这方面不懂。比如说去哪找 flv 的 demux 。
    param
        13
    param  
    OP
       2017-03-04 12:48:13 +08:00
    @LINAICAI 不支持 flv ,百度分割出来的文件格式不是 ts 而是 flv
    LINAICAI
        14
    LINAICAI  
       2017-03-04 12:58:48 +08:00
    @param 记得优酷的 flv 用苹果的播放器可以播放,浏览器没试过。
    param
        15
    param  
    OP
       2017-03-04 13:32:49 +08:00
    @LINAICAI 播放器没问题,浏览器不支持
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3314 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 05:05 · PVG 13:05 · LAX 21:05 · JFK 00:05
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.