[Libav-user] write hls stream to disc

Georg Stein georg_stein at t-online.de
Sat Apr 18 06:44:53 CEST 2015

i still have the same problem here.
Whilke i now tried a lot of things in the Inputcontext without a result, 
i got the idea, that perhaps my output where i write the frames to disc 
is the problem.

I checked the download of the single segments of the hls stream with 
wget, and here i got a list with around 2000 segments where i was able 
to download each very fast (also with wget), they all have a size form 
about 600K and 5 secs duration. So the incoming data is not really a 
problem here

back to my thougts, i ask me now if perhaps the while loop where i write 
my packets is blocking the reading of the followwing segement, i get 
alwyays a pause form around 4 secs after each segement before the next 
one is coming in and written to disc.

- do i have to set a buffer in the outputcontext?
- will increasing the threadcount help here

with regards

Am 15.04.2015 um 20:51 schrieb Georg Stein:
> to come back to my issue,
> is it perhaps somehow possible to choose the segment where i start the
> connection, ive seen in the m3u8 files thata there are always also older
> segments listed not only the actual one.
> and who to i define the time to analyze the stream with
> avformat_open_input, i tried already:
> av_dict_set(&this->avoption, "probesize",           "15000",
>          av_dict_set(&this->avoption, "fpsprobesize",        "120",
>          av_dict_set(&this->avoption, "analyzeduration",     "15000",
> but it takes always 30 seconds before this gives me an OK back
> Georg
> Am 15.04.2015 um 06:20 schrieb Georg Stein:
>> Hello,
>> i wrote an app what writes live streams as a file to the disc. This
>> works very well with mosz of the streams but some of them are making a
>> long pause while receiving the segments - means i get a segment writeit
>> to disc and then it takes around 6secs to get the next one. The ffmpeg
>> command line tool has not this problem, so i think i forget here
>> something.
>> so my question is, do i have to set special things (avoptions, flags) to
>> the avformat context of the input to get this liquid, like a buffer, or
>> perhaps the connection is always dropped after ech segement (it also
>> takes very long for the first connect to the stream server)
>> right now i search in the ffmpege/ffplay sources to see what they did
>> here, but this is not the easyest job
>> with regards
>> Georg
>> _______________________________________________
>> Libav-user mailing list
>> Libav-user at ffmpeg.org
>> http://ffmpeg.org/mailman/listinfo/libav-user
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user

More information about the Libav-user mailing list