[Libav-user] Fw: Are there any examples, using ffmpeg libs, of encoding a file where the data comes from memory

JULIAN GARDNER joolzg at btinternet.com
Mon Aug 17 23:27:19 CEST 2015


I posted this in the wrong list so sorry everyone. Joolz

      On Monday, 17 August 2015, 12:10, JULIAN GARDNER <joolzg at btinternet.com> wrote:
   
 

 What i am trying to do is to take a full TS, and have a thread read in this stream and pass off X number of programs to different encoding threads.
My current code base uses this
        avio_open2( &inputSource->fmt_ctx->pb, inputSource->src_filename, AVIO_FLAG_READ, &inputSource->fmt_ctx->interrupt_callback, &d);

        /* open input file, and allocate format context */
        if (avformat_open_input(&inputSource->fmt_ctx, inputSource->src_filename, NULL, NULL) < 0) {
            fprintf(stderr, "%s:Could not open source file %s\n", inputSource->name, inputSource->src_filename);
            ret = 1;
            goto end;
        }

But I have to make sure there is only one program in the stream
I would like to be able to pick 3 or 4 programs from the TS and encode each seperately using my encode thread.
So the question is how do I push in data which is already in the pc and is not a UDP stream or a FILE

Joolz

PS. Also anyone around who can help with the BUG in the examples where you CANNOT change the output audio rate, it has to be the same as the internally generated one or the example crashes.

 
   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20150817/d26e52b8/attachment.html>


More information about the Libav-user mailing list