[FFmpeg-devel] [PATCH] http Transfer-Encoding chunked
Mon May 25 16:28:38 CEST 2009
> On Sat, May 23, 2009 at 5:55 AM, Peter Holik <peter at holik.at> wrote:
>>>> The only drawback of my patch is, that the filesize is limited (i've taken 512 kByte)
>>>Just set filesize to -1 then, i.e. unlimited. Don't make up some
>>>arbitrary number. It should just work.
>> Sorry, but this doesn't work for "image2"
> Ah. img2.c uses AVFMT_NOFILE + local variable is_pipe for this and
> then assumes url_fsize() gives valid output if AVFMT_NOFILE is not
> set. A better behaviour would be to take into account the return value
> of url_fsize(), and if it is -1, then revert back to the pipe-like
> behaviour anyway.
> This part of your patch feels like a hack to me, I'd prefer if you'd
> fix this more "cleanly".
>> I can't imagine a need for "multiple chunks", please give me an example.
> Imagine that we want to write a dav:// module, or extend the http://
> module for DAV support (since dav is essentially just a http
> extension). Anyway, I agree this is outside the scope of this patch,
> so please ignore. :-).
I reworked my patch with no limitation and set filesize to -1.
i was able to fetch a avi file from a chuncked http transfer and convert it with
ffmpeg -i 'http://server/cgi-bin/passthrough_avi.cgi' -f mpegts -vcodec mpeg2video -b 4000k mpeg.ts
my patch should be universal usable
please comment and test
More information about the ffmpeg-devel