append data before and after text
-
hi eveybody,
i have m3u8 file like this:#EXTINF:5.005, seg-1-v1-a1.ts #EXTINF:5.000, seg-2-v1-a1.ts #EXTINF:5.000, seg-3-v1-a1.ts #EXTINF:5.000, seg-4-v1-a1.ts #EXTINF:5.000, seg-5-v1-a1.tsand i need to add like this:
#EXTINF:5.005, https://psv157-1.344322vg.en/videos/-211737703/556755643/720/seg-1-v1-a1.ts?extra=N87rklN9X234fdgfdgeeWSD #EXTINF:5.000, https://psv157-1.344322vg.en/videos/-211737703/556755643/720/seg-2-v1-a1.ts?extra=N87rklN9X234fdgfdgeeWSD #EXTINF:5.000, https://psv157-1.344322vg.en/videos/-211737703/556755643/720/seg-3-v1-a1.ts?extra=N87rklN9X234fdgfdgeeWSD #EXTINF:5.000, https://psv157-1.344322vg.en/videos/-211737703/556755643/720/seg-4-v1-a1.ts?extra=N87rklN9X234fdgfdgeeWSD #EXTINF:5.000, https://psv157-1.344322vg.en/videos/-211737703/556755643/720/seg-5-v1-a1.ts?extra=N87rklN9X234fdgfdgeeWSDi have regex for this, but my issue is with incremental number to each segment
my regex is:
find:(?-s)^(#EXTINF:.*\R)(.+)
replace:$1https://psv157-1.344322vg.en/videos/-211737703/556755643/720/seg-\d+-v1-a1.ts?extra=N87rklN9X234fdgfdgeeWSD$2but this one does not work fine for incremental segments numbers
-
I think you’re overcomplicating it (or your mis-stating your problem).
Try this for the replace part:
$1https://psv157-1.344322vg.en/videos/-211737703/556755643/720/$2?extra=N87rklN9X234fdgfdgeeWSD -
oh yes, you’re right (as usual)
thanks you for the tip! all the best
-
@namx3249 FYI, ffmpeg can read .m3u8 files directly.
ffmpeg -i https://assets.afcdn.com/video49/20210722/v_645516.m3u8 -codec copy v_645516.mp4Example 30 second clip about mixing up a cool drink. 16.3 MB.
-
yes, i know ffmpeg but already tried for strange site and does not work
because from m3u8 to this site only segments are present but missing the full link (first) and token at the end (see my first post above), so ffmpeg don’t have link for its download
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login