Re: [Libav-user] Copy Image Data from Decode Frame To Encode Frame

2013-11-27 Thread Francesco Damato
Hi James, I have the doc/examples programs compiled and running. I use the program demuxing.c to decode an AVI file. From the source code, it looks it calls its own subroutine decode_packet() to decode the next video or audio packet, and that subroutine calls avcodec_decode_video2()to decode the

Re: [Libav-user] Copy Image Data from Decode Frame To Encode Frame

2013-09-15 Thread James Board
>> However, what if I only copy a subset of the input frames to the output >> file?  Can I still copy the packet?  If the answer is no, can I do something >> simple to allow me to copy the packet (like modify a timestamp?). > >The best advice again would be to try and see if there is some >problem

Re: [Libav-user] Copy Image Data from Decode Frame To Encode Frame

2013-09-15 Thread Alex Cohn
On Sun, Sep 15, 2013 at 6:33 PM, James Board wrote: > >>Generally speaking, the answer is yes, you can simply copy encoded >>packets from demuxer to muxer, if you don't change them. I am sure AVI >>container will not be upset, but out in the wild, there could be some >>containers for which this tr

Re: [Libav-user] Copy Image Data from Decode Frame To Encode Frame

2013-09-15 Thread James Board
>> In between the two calls above, I have to convert the image data from >> myFrameDecode to image data in myFrameEncode.  That's what I'm having >> trouble >> with.  Right now I have lots of row/col loops and they do things differently >> for different pixel formats.  Is there a single subroutin

Re: [Libav-user] Copy Image Data from Decode Frame To Encode Frame

2013-09-15 Thread James Board
>Generally speaking, the answer is yes, you can simply copy encoded >packets from demuxer to muxer, if you don't change them. I am sure AVI >container will not be upset, but out in the wild, there could be some >containers for which this trick may be less straightforward to >implement. > >General

Re: [Libav-user] Copy Image Data from Decode Frame To Encode Frame

2013-09-15 Thread Alex Cohn
On Sat, Sep 14, 2013 at 10:12 PM, James Board wrote: >>> Also, if the input and output file have the same pixel format, is there a >>> simple way to copy the data from one to the other? >>> >>> Thanks >>You don't need to copy data between frames, you can reuse the decoder frame >> as input for enc

Re: [Libav-user] Copy Image Data from Decode Frame To Encode Frame

2013-09-14 Thread Paul B Mahol
On 9/14/13, James Board wrote: > I'm writing a simple libAV program that reads an AVI file, decodes each > frame, then writes that frame data to another AVI file as output. The > output > file should be pretty much the same as the input file. > > I'm using the examples in the ffmpeg source as a s

Re: [Libav-user] Copy Image Data from Decode Frame To Encode Frame

2013-09-14 Thread James Board
>> Also, if the input and output file have the same pixel format, is there a >> simple way to copy the data from one to the other? >> >> Thanks >You don't need to copy data between frames, you can reuse the decoder frame as >input for encoder. Okay.  I will try this  (actually, I tried it and it

Re: [Libav-user] Copy Image Data from Decode Frame To Encode Frame

2013-09-14 Thread Alex Cohn
On Sep 14, 2013 8:42 PM, "James Board" wrote: > > I'm writing a simple libAV program that reads an AVI file, decodes each > frame, then writes that frame data to another AVI file as output. The output > file should be pretty much the same as the input file. > > I'm using the examples in the ffmpe

[Libav-user] Copy Image Data from Decode Frame To Encode Frame

2013-09-14 Thread James Board
I'm writing a simple libAV program that reads an AVI file, decodes each frame, then writes that frame data to another AVI file as output.  The output file should be pretty much the same as the input file. I'm using the examples in the ffmpeg source as a start.  This is how each frame from the inpu