[FFmpeg-devel] avformat/hlsenc: pull request for single file mode
anssi.hannula at iki.fi
Thu Jul 10 00:32:28 CEST 2014
09.07.2014 12:26, Nicolas Martyanoff kirjoitti:
and thanks for the patches.
> The hlsenc muxer only supports HLS version 3, and I needed byterange support
> (version 4), so I added it :)
> You will find a pull request on Github (hlsenc branch):
> There are four patches. Two fix small issues in the muxer (target duration
> computation and default subtitles format), the other two clean the muxer and
> add a single file mode.
> I tested my patches with and without the new single file mode, on media files
> with and without video streams.
> This is my first work on FFmpeg, so feel free to point any mistake.
> Note that the work was done for my job, and the company I work for officially
> authorizeded me to contribute to FFmpeg under the terms of its license.
avformat/hlsenc: correctly compute target duration
- seems clearly correct => applied
- looks good to me, and there is no maintainer so I guess this is OK
- well, actually, maybe you could use more than one word in the subject :)
avformat/hlsenc: add single file mode
- Adds HLSContext.ref_stream etc, shouldn't that be a separate patch?
- HLSContext.file_idx is never read AFAICS
avformat/hslenc: add a flag disabling the filename in segment names
- should probably require single_file as well?
- see below
avformat/hlsenc: add an option to set the media filename
- should probably check not used together with separated segments?
- see below
"no_filename" for "do not use the name of the media file in segment
names" were unclear enough that I had to take a look at the code what is
For anyone else wondering (correct me if I'm wrong), currently:
(1) The output file name from the user is used as the output media
(2) The media file/segment file names are generated from the basename of
the output playlist filename.
(3) The media file/segments URLs in the media playlist get -hls_base_url
prepended to them, so they are base_url + media filename.
These two patches would
- add "no_filename" flag to only use hls_base_url for (3), allowing to
select an arbitrary URL.
- allow to select the file for (2)
I wonder if it would be clearer to have
-hls_media_file - "the generated output media file"
-hls_media_url - "output media file url used in the playlist"
(requires "single_file" and !hls_base_url)
Or would it just be unclear to have both conflicting hls_media_url and
More information about the ffmpeg-devel