axiomatic-systems / Bento4

Full-featured MP4 format, MPEG DASH, HLS, CMAF SDK and tools
http://www.bento4.com
2.01k stars 482 forks source link

mp4-hls.py: error: no such option: --segment-filename-template #541

Open berkant opened 4 years ago

berkant commented 4 years ago

mp4hls is a tool that creates a multi-bitrate HLS master playlist from one or more MP4 files, including support for encryption and I-frame-only playlists. This tool uses the mp42hls low level tool internally, so all the options supported by that low level tool are also available.

This is not holding true here. A flag supported by mp42hls is not being respected by mp4hls.

Command:

$ mp4hls \
    --hls-version 3 \
    --encryption-key `openssl rand -hex 16` \
    --encryption-iv-mode random \
    --output-single-file \
    --output-encryption-key \
    --segment-duration 10 \
    --segment-filename-template randomstrhere \
  input.mp4
barbibulle commented 4 years ago

That specific option isn't exposed by mp4hls, because that tool constructs its own patterns for multi-file support, when calling mp42hls internally (different patterns for each bitrate variant).

berkant commented 4 years ago

@barbibulle Does that mean I can't set a custom name for segments with mp4hls?

barbibulle commented 4 years ago

With the current version, that's unfortunately not customizable. Do you have a specific use case in mind where that would be necessary?