axiomatic-systems / Bento4

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

Specify subdirectory names with mp4hls #153

Open 4getit opened 7 years ago

4getit commented 7 years ago

Hello,

With mp4hls, is there a way to specify subdirectory names? For example, when I run something this:

./mp4hls --hls-version 4 -f --output-single-file -o ./67890 ./transcoded/67890_360pf.mp4 ./transcoded/67890_480pf.mp4 ./transcoded/67890_720pf.mp4 ./transcoded/67890_1080pf.mp4

It generates a structure like this:

67890
├── master.m3u8
├── media-1/
│   ├── iframes.m3u8
│   ├── media.ts
│   └── stream.m3u8
├── media-2/
│   ├── iframes.m3u8
│   ├── media.ts
│   └── stream.m3u8
├── media-3/
│   ├── iframes.m3u8
│   ├── media.ts
│   └── stream.m3u8
└── media-4/
    ├── iframes.m3u8
    ├── media.ts
    └── stream.m3u8

..however, I would like to specify output directories for the input files so I can come up with something like this:

67890
├── master.m3u8
├── 360p/
│   ├── iframes.m3u8
│   ├── media.ts
│   └── stream.m3u8
├── 480p/
│   ├── iframes.m3u8
│   ├── media.ts
│   └── stream.m3u8
├── 720p/
│   ├── iframes.m3u8
│   ├── media.ts
│   └── stream.m3u8
└── 1080p/
    ├── iframes.m3u8
    ├── media.ts
    └── stream.m3u8

I can't seem to find it and --segment-filename-template and --segment-url-template don't work with mp4hls.

barbibulle commented 7 years ago

That makes sense as a feature to add. I'll try to get to it soon.