[Libav-user] decoder never starts

David Ibbitson david.ibbitson at gmail.com
Thu Feb 15 03:28:03 EET 2024


Is that true? ffplay seems to play the clip fine. I wonder what it's doing
beyond the normal avcodec_send_packet/av_receive_frame loop.

Yeah I tried prepending every nal unit with sps/pps, and it didn't help.

I suppose my source clip must have P frames with intra coded slices (not
sure how to confirm this with ffprobe yet).

If that's the case how would I get avcodec_send_packet to honor that?

Thanks
David

On Mon, Feb 12, 2024 at 10:47 PM Ben Harper <rogojin at gmail.com> wrote:

> You say that the stream is "only P frames". I thought that one needs I
> frames to start the decode?
>
> Also, have you tried sending the SPS/PPS as the very first packets to
> decode,
> before sending any visual packets? I've found this is necessary when
> encoding
> to file formats such as mp4, so it might be necessary for decode too.
>
>
> On Mon, Feb 12, 2024 at 5:34 PM David Ibbitson <david.ibbitson at gmail.com>
> wrote:
>
>> Hi folks,
>>
>> I have an mpegts file with the following stream:
>>
>> Input #0, mpegts, from 'Downloads/e318_save.ts':
>>   Duration: 00:03:59.00, start: 8.400000, bitrate: 137 kb/s
>>   Program 1
>>     Metadata:
>>       service_name    : Service01
>>       service_provider: FFmpeg
>>   Stream #0:0[0x100]: Video: h264 (Main) ([27][0][0][0] / 0x001B),
>> yuv420p(progressive), 640x480, 5 fps, 5 tbr, 90k tbn, 10 tbc
>>
>> It's only P frames with the occasional SPS/PPS. The ffmpeg tools handle
>> it fine.
>>
>> However when I demux the h264 and invoke the standard
>> avcodec_send_packet/avcodec_receive_frame loops nothing happens.
>>
>> avcodec_send_packet just continues to accept data (never hits an
>> erors condition) and avcodec_receive_frame immediately hits EAGAIN.
>>
>> Any ideas what could be happening here?
>>
>> Thanks,
>> David
>>
>> _______________________________________________
>> Libav-user mailing list
>> Libav-user at ffmpeg.org
>> https://ffmpeg.org/mailman/listinfo/libav-user
>>
>> To unsubscribe, visit link above, or email
>> libav-user-request at ffmpeg.org with subject "unsubscribe".
>>
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/libav-user
>
> To unsubscribe, visit link above, or email
> libav-user-request at ffmpeg.org with subject "unsubscribe".
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20240214/b6781bcf/attachment.htm>


More information about the Libav-user mailing list