Skip to content

Conversation

@vpeter4
Copy link
Contributor

@vpeter4 vpeter4 commented Oct 16, 2025

allows to play HLS stream without extension in url
related to FFmpeg/FFmpeg@b753bac

2025-10-16 18:51:56.563 T:885 error <general>: ffmpeg[0x6ff2e90]: [hls] URL https://some.server.com/stream/fragment/ts/live/?session=163ec3ad-7f2e-4f16-be20-062a73733b56&offset=192639&pointeroffset=39&fragmentlength=4800 is not in allowed_extensions

@vpeter4
Copy link
Contributor Author

vpeter4 commented Oct 17, 2025

I forgot to wrote that I'm not really sure how to pass this options from m3u8 list to ffmpeg?
I put |extension_picky at the end of url and this set the value to 0. But I don't know how to set to 1? And in case of allowed_extensions how to set value ALL? Because |allowed_extensions=ALL didn't work.

In my opinion this should be addon setting? Like "Disable strict HLS file extension check" and "Allowed HLS extensions". It is annoying to fix all channels when it can be done on one place only.

@vpeter4 vpeter4 force-pushed the Piers-ffmpeg-options branch from 3f75a92 to d8c2d70 Compare October 31, 2025 17:36
@vpeter4 vpeter4 changed the title DVDDemuxFFmpeg: Pass two more ffmpeg options DVDDemuxFFmpeg: Pass three more ffmpeg options Oct 31, 2025
allows to play HLS stream without extension
related to FFmpeg/FFmpeg@b753bac

2025-10-16 18:51:56.563 T:885     error <general>: ffmpeg[0x6ff2e90]: [hls] URL https://some.server.com/stream/fragment/ts/live/?session=163ec3ad-7f2e-4f16-be20-062a73733b56&offset=192639&pointeroffset=39&fragmentlength=4800 is not in allowed_extensions
@vpeter4 vpeter4 force-pushed the Piers-ffmpeg-options branch from d8c2d70 to 74ad74f Compare October 31, 2025 17:37
vpeter4 added a commit to vpeter4/inputstream.ffmpegdirect that referenced this pull request Oct 31, 2025
related to xbmc#344

use correct class methods from ffmpegdirect UrlOptions.cpp and not from Kodi which uses same class name

before
2025-10-31 18:29:33.622 T:10030   debug <inputstream.ffmpegdirect>: CDVDDemuxFFmpeg::GetFFMpegOptionsFromInput() adding ffmpeg option 'extension_picky: '
after
2025-10-31 18:31:16.884 T:10126   debug <inputstream.ffmpegdirect>: CDVDDemuxFFmpeg::GetFFMpegOptionsFromInput() adding ffmpeg option 'extension_picky: 0'
@phunkyfish
Copy link
Collaborator

Is this good to go now?

@vpeter4
Copy link
Contributor Author

vpeter4 commented Oct 31, 2025

It is.

But in my opinion it would be better to put this extension_picky to addon setting like Disable strict HLS file extension check as boolean. I can try to add there tomorrow if you would accept such solution. If not merge this pr.

Option allowed_extensions can't really test because I don't have any link to test. But I assume it is ok as is.

@vpeter4
Copy link
Contributor Author

vpeter4 commented Nov 1, 2025

Or maybe even better would be to just set option explicitly because user want to play stream regardless of such restriction in ffmpeg. And manually allowing this option to enable playing of the stream doesn't fix any security concern.

av_dict_set(&options, "extension_picky", "0", 0);

but because of security implications maybe not best GHSA-398c-f7w9-crc8

@vpeter4
Copy link
Contributor Author

vpeter4 commented Nov 1, 2025

Maybe adding to addon settings would be prefered way because disabling extension check does have some security implications. That's why this change in ffmpeg was even made: GHSA-398c-f7w9-crc8

Like this with default setting off.
disableStrictHLSfileExtensionCheck

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

Successfully merging this pull request may close these issues.

2 participants