Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can not combine .m3u8 video segments #32

Open
nanfei01055 opened this issue Oct 20, 2023 · 0 comments
Open

can not combine .m3u8 video segments #32

nanfei01055 opened this issue Oct 20, 2023 · 0 comments

Comments

@nanfei01055
Copy link

I downloaded the .m3u8 file and video segments, I want to combine the segments to a .mp4 video, but I got an exception: "System.Net.Http.HttpRequestException: The requested address is not valid in this context".

I am not sure what is wrong, here is the code and part of .m3u8 content, can you help me?

code :
var cmdParams = "-y -allowed_extensions ALL -protocol_whitelist "file,http,crypto,tcp" -i "/storage/emulated/0/MyBrowser/2e37c5c3526f5c560dc0092fe762f807/index.m3u8" -c copy "/storage/emulated/0/MyBrowser/b1cb7094-f590-403c-9397-d1d6af32f46b.mp4"";

await FFMpeg.Xamarin.FFMpegLibrary.Run(this, cmdParams, (s) =>
{
System.Diagnostics.Debug.WriteLine(s);
});

index.m3u8 content:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-ALLOW-CACHE:YES
#EXT-X-TARGETDURATION:11
#EXTINF:6.000000,
/storage/emulated/0/MyBrowser/Cache/2e37c5c3526f5c560dc0092fe762f807/segment_0.ts
#EXTINF:10.133333,
/storage/emulated/0/MyBrowser/Cache/2e37c5c3526f5c560dc0092fe762f807/segment_1.ts
#EXTINF:1.466667,
/storage/emulated/0/MyBrowser/Cache/2e37c5c3526f5c560dc0092fe762f807/segment_2.ts
#EXTINF:4.333333,
/storage/emulated/0/MyBrowser/Cache/2e37c5c3526f5c560dc0092fe762f807/segment_3.ts
#EXTINF:10.366667,
/storage/emulated/0/MyBrowser/Cache/2e37c5c3526f5c560dc0092fe762f807/segment_4.ts
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant