Hi,
I am trying to trim a video by just reading out packets using av_read_frame
and then writing them out using av_write_frame. The generated video is the
same duration but all the frames are green. ( it's an mpeg4 yuv420p video )
I have written code that would accomplish the same thing that decodes and
encodes the packets, but it takes a lot more time.
Right now I'm just trying to learn how things work, is this a good approach
to tackling this? Or is there some mix of the two techniques, like encoding
some frames while just moving packets for the rest of them.
It seems like this would be easy to find info on, but I have spent a while
looking on the list/google to no avail.
here's a simplified version what my code looks like to give an idea of what
i'm trying...
while( av_read_frame(pFormatCtx, pkt) >= 0 )
{
if( pkt.stream_index == videoStream )
{
ret = av_write_frame(oc, pkt);
}
}
Thanks a lot
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user