[FFmpeg-devel] First Patch for hlsenc.c for https://trac.ffmpeg.org/ticket/7281

Ronak ronak2121 at yahoo.com
Mon Aug 13 23:48:36 EEST 2018


On Aug 13, 2018, at 10:49 AM, Steven Liu <lingjiujianke at gmail.com> wrote:
> 
>> 
>> Hi Steven,
>> 
>> Did you have a chance to review this patch? I haven't seen your feedback yet. Did you have a chance to try it out?
>> I would like to get this merged this week.
> 1. you MUST update the TARGET DURATION if the new fragment is long
> than old fragment, don't only test your audio files please, ffmpeg not
> only be used by you.

This patch already does that. I've confirmed with several video files. Please see the attached manifest that was generated by this patch as proof. This is a video file downloaded from here: https://www.sample-videos.com/index.php#sample-mp4-video <https://www.sample-videos.com/index.php#sample-mp4-video>.



> 2. if the temp file have problem, you should seperate the patch into
> two patch, one fix temp file problem, the other implement your
> feature.

The two problems are interrelated. The creation/destruction of temp files repeatedly adds to the generation latency here. In my use-case, ffmpeg generates and destroys the temp file 155000 times when: 1. This is offline VOD. I am just generating from my laptop to my laptop. No Web Servers are involved. 2. I did not explicitly ask for this.

> 3. I need more time to think about how to improve the refresh problem
> when in VOD mode.Because this patch is not a good way, that is not a
> full care about the other function.

The alternative way is the one I was proposing first; which was to write the header once; and then the segments only in the hls_window method.
However, that has problems like you pointed out, due to the architecture that ffmpeg has. We can still pursue that path, but it will be a much more complicated fix. I would need much more of your help to fix this.
Dashenc.c also suffers from this same problem. This needs to be fixed in both places, not just hlsenc.c.

> 
> Thanks
>> 
>> Ronak
>> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel



More information about the ffmpeg-devel mailing list