[FFmpeg-devel] avformat/hlsenc: pull request for single file mode
khaelin at gmail.com
Thu Jul 10 11:23:21 CEST 2014
On 2014-07-10 03:36, Anssi Hannula wrote:
> 10.07.2014 02:40, Nicolas Martyanoff kirjoitti:
> > On 2014-07-10 01:32, Anssi Hannula wrote:
> >> avformat/hlsenc: cleaning
> >> - 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 :)
> > I'll change the title to something such as 'make the code easier to read' :)
> >> avformat/hlsenc: add single file mode
> >> - Adds HLSContext.ref_stream etc, shouldn't that be a separate patch?
> > I guess I could, but the code is incorrect without it. I added it when I
> > realized it would not work when a file has two video streams (or two audio
> > streams and no video streams).
> > If you think it's better to have two patches, the first one being incorrect, I
> > can split it.
> Maybe I'm missing something, but I don't see how not working with two
> video streams has anything to do with single file mode?
> Assuming there is actually some relation, could you have the ref changes
> in a first patch and single file in another patch, or would the ref
> changes break something else?
I'll split the patch.
> >> - HLSContext.file_idx is never read AFAICS
> > It is used to generate the TS filename in hls_create_file().
> I don't see hls->file_idx accessed there... only the local int file_idx.
You are right, fixing it.
> >> avformat/hlsenc: add an option to set the media filename
> >> - should probably check not used together with separated segments?
> > It also works with separated segments. For example:
> > -hls_media_filename foo-%d.ts
> > Will generate foo-0.ts, foo-1.ts, foo-2.ts, etc.
> > Without this patch, separated files are named <playlist_base_filename>%d.ts.
> Right. This should be documented in doc/muxers.texi, though. Same goes
> for your other new parameters, BTW, I forgot about that.
Yes. I was just waiting for the patches to be confirmed as correct before
writing the documentation.
khaelin at gmail.com
More information about the ffmpeg-devel