[Libav-user] Packet containing different content than expected when using DV container

Info || Non-Lethal Applications info at non-lethal-applications.com
Wed Oct 22 17:35:24 CEST 2014


Hi Bruce,

thanks for your response!

> It's sounds a bit like you're seeing multi-threaded decoding, in which each decode call gets back a frame that was previously passed in as a packet, and was decoded on another thread. 
> The returned frame should have an associated PTS, so it's not a problem. 

That’s the problem. The AVFrame's PTS is not set (well, it is set to 0x800000000000).
The only thing I have left is the pkt_pts and pkt_dts which are both wrong.

> Set the number of threads to 1 in your codec context and see if it changes. 

Good idea! I tried that but it didn’t help.

Any other ideas?

Thanks,

Flo

>> On Oct 22, 2014, at 02:53, Info || Non-Lethal Applications <info at non-lethal-applications.com> wrote:
>> 
>> I’m having problems with my own movie player I wrote using the FFmpeg libraries.
>> The problem appears with a test DV clip created by Apple’s Compressor. It’s a generated clip, so I can upload it if it helps.
>> 
>> Let me quickly outline what I’m doing:
>> 
>> - I read video frames into a frame queue which is used as a source for playback
>> - I read audio samples into a ring buffer which is used as a source for playback
>> 
>> To not risk audio dropouts, I’m reading about 200 ms audio samples more than I would need to display the respective video frames.
>> While reading audio samples, I’m storing all video packets that come along in a video packet queue.
>> When the next video frame is requested, I’m searching the queue first and read from the file only when the queue is empty.
>> This procedure worked fine for all other formats I’ve been working with so far (mostly MOV and MXF).
>> 
>> I’ve been analyzing the issue for a couple of hours now and it seems to me that the packets that I put to the queue contain different content when I decode them later on.
>> Actually, it seems that all packets in the queue decode to the frame that would be next in line when reading from the file.
>> 
>> Is there anything I could do to prevent this from happening?
>> As I said I would be happy to upload the file. It’s 2 minutes of DV PAL, about 430 MB in size. I could make it smaller.
>> 
>> Thanks in advance!
>> 
>> Best,
>> 
>> Flo
>> _______________________________________________
>> 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