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

m3u8 index file segments always named segment-%d.ts or stream.ts #22

Closed
rmberg opened this issue Sep 18, 2015 · 3 comments
Closed

m3u8 index file segments always named segment-%d.ts or stream.ts #22

rmberg opened this issue Sep 18, 2015 · 3 comments

Comments

@rmberg
Copy link

rmberg commented Sep 18, 2015

Hello,

When using the mp42hls command to generate HLS segments, the m3u8 file is not correctly reflecting the specified name in the --segment-filename-template . It is always segment-%d.ts (or stream.ts when using --output-single-file.

For example the command:

./mp42hls --hls-version 4 --output-single-file --index-filename TEST1.m3u8 --segment-filename-template TEST1.ts ~/test/TEST1.mp4

results in an m3u8 index file with the following entries:

#EXTINF:10.010010,
#EXT-X-BYTERANGE:650112@0
stream.ts
#EXTINF:10.010010,
#EXT-X-BYTERANGE:601424@650112
stream.ts
#EXTINF:10.010010,
#EXT-X-BYTERANGE:586192@1251536
stream.ts
#EXTINF:10.010010,
#EXT-X-BYTERANGE:669664@1837728
stream.ts

...

The expected output would be something like:

#EXTINF:10.010010,
#EXT-X-BYTERANGE:650112@0
TEST1.ts
#EXTINF:10.010010,
#EXT-X-BYTERANGE:601424@650112
TEST1.ts
#EXTINF:10.010010,
#EXT-X-BYTERANGE:586192@1251536
TEST1.ts
#EXTINF:10.010010,
#EXT-X-BYTERANGE:669664@1837728
TEST1.ts

...

@rmberg
Copy link
Author

rmberg commented Sep 18, 2015

I did figure out that by using the --segment-url-template flag it is set properly. It just seems that the --segment-filename-template flag is not being used.

@barbibulle
Copy link
Contributor

the --segment-filename-template value is used to specify the name of the file in which the segment data will be written. The --segment-url-template is used to specify the name/url that appears in the .m3u8 file. They are typically related, as in most cases the URL will need to point to the file in which the media is stored.
For example, if you use --segment-filename-template foobar%d.ts
You'll see files foobar0.ts, foobar1.ts, etc.
If you choose that pattern, you would also normally use --segment-url-template footer%d.ts so that what appears in the .m3u8 matches the filenames.

@rmberg
Copy link
Author

rmberg commented Sep 19, 2015

That makes sense. Thank you!

On Sep 18, 2015, at 10:53 PM, barbibulle notifications@github.com wrote:

the --segment-filename-template value is used to specify the name of the file in which the segment data will be written. The --segment-url-template is used to specify the name/url that appears in the .m3u8 file. They are typically related, as in most cases the URL will need to point to the file in which the media is stored.
For example, if you use --segment-filename-template foobar%d.ts
You'll see files foobar0.ts, foobar1.ts, etc.
If you choose that pattern, you would also normally use --segment-url-template footer%d.ts so that what appears in the .m3u8 matches the filenames.


Reply to this email directly or view it on GitHub.

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

2 participants