I wish to extract parts from an m3u8 hls playlist given 'start time' and 'end unix time'
Assuming,
start unix time = 1667112116900
end unix time = 1667112133040
Example input file =
#EXTINF:5.9610000000,
/home/aanisnoor/Videos/DVR/segments_test_push/1667112094442.ts
#EXTINF:5.3340000000,
/home/aanisnoor/Videos/DVR/segments_test_push/1667112100495.ts
#EXTINF:5.2380000000,
/home/aanisnoor/Videos/DVR/segments_test_push/1667112106453.ts
#EXTINF:5.4280000000,
/home/aanisnoor/Videos/DVR/segments_test_push/1667112111854.ts
#EXTINF:5.3340000000,
/home/aanisnoor/Videos/DVR/segments_test_push/1667112116984.ts
#EXTINF:5.3330000000,
/home/aanisnoor/Videos/DVR/segments_test_push/1667112122404.ts
#EXTINF:6.6370000000,
/home/aanisnoor/Videos/DVR/segments_test_push/1667112127907.ts
#EXTINF:6.2000000000,
/home/aanisnoor/Videos/DVR/segments_test_push/1667112133401.ts
#EXTINF:6.2000000000,
/home/aanisnoor/Videos/DVR/segments_test_push/1667112139827.ts
Required output file =
#EXTINF:5.3340000000,
/home/aanisnoor/Videos/DVR/segments_test_push/1667112116984.ts
#EXTINF:5.3330000000,
/home/aanisnoor/Videos/DVR/segments_test_push/1667112122404.ts
#EXTINF:6.6370000000,
/home/aanisnoor/Videos/DVR/segments_test_push/1667112127907.ts
#EXTINF:6.2000000000,
/home/aanisnoor/Videos/DVR/segments_test_push/1667112133401.ts
There are more than 4000 lines from which I need to extract. Apologies for no code included as it was very incomplete. Python/C++ would work.