Shell m3u8
Shell:m3u8-- > ts
Requirements: known batch m3u8 uri, complete ts file uri
# because sed does not support text replacement Generate temporary file test_file#curl-s ignore the default output as follows #% Total% Received% Xferd Average Speed Time Current# Dload Upload Total Spent Left Speed#107 537 107 537 00 1987 0 -: -:-- 4007##sed replace 4 with parameters The method: # 1.eval sed's in, in, m3u8_listdo echo, filename#2.sed, s/$a/$b/, filename#3.sed, etc., grep'\ .ts $``for j in $ts_list do, grep'\ .ts $`` Echo "$I" > test_file sed "s/index.m3u8/$j/" test_file & > > all_log donedone
M3u8:
Http://14.18.146.165:8802/vod/ymx//225731_3/index.m3u8http://14.18.146.165:8802/vod/ymx//225731_4/index.m3u8http://14.18.146.165:8802/vod/ymx//225731_5/index.m3u8
All_log:
[root@test-CNC-TJ-19-28 yuhuancun] # head 171723.txt http://14.18.146.165:8802/vod/hn_live_165/8592_58438/index.m3u8http://14.18.146.165:8802/vod/hn_live_165/8592_58438/video_0.tshttp://14.18.146.165:8802/vod/hn_live_165/8592_58438/video_1.tshttp://14.18.146.165:8802/ Vod/hn_live_165/8592_58438/video_2.ts http://14.18.146.165:8802/vod/hn_live_165/8592_58438/video_3.ts