[Libav-user] C++ Decoder Example Does not work with h264/h265 BigBuckBunny
wangyoucao577 at gmail.com
Sat Jun 11 11:58:37 EEST 2022
The decode example(
intend to decode raw stream rather than muxed .mp4 file.
You may better to follow the input part of the transcoder example(
to use `avformat_open_input/avcodec_find_decoder` for demuxer/decoder
initializing, then use `av_read_frame` to get demuxed frame, after that
same logic in decode/transcode example to use
`avcodec_send_packet/avcodec_receive_frame` for decoding. Output part of
the transcode example could be ignored if you don't need it.
On Fri, Jun 10, 2022 at 3:54 PM Kanzler Mike <halcom at gmx.de> wrote:
> i want to use ffmpeg/libav to decode h264/h265 videos (sound not needed)
> on Windows 10, Visual Studio 2019.
> I used the precompiled Windows Libraries from gyan.dev (latest release
> 5.0.1 Full).
> As example videos i used the
> https://test-videos.co.uk/bigbuckbunny/mp4-h264 in 1280x720 (and also the
> h256 version).
> I think i have to change the codec to:
> codec = avcodec_find_decoder(AV_CODEC_ID_H264);
> My problem is that the av_parser_parse2 method seems not to find a packet
> or loads the whole file as one packet which i cant decode.
> I tried other codec like
> None of that works for me. I also used an older version off ffmpeg that i
> used for video encoding years before, that also wont work.
> What did i miss? Or is this a bug?
> Best Regards
> Libav-user mailing list
> Libav-user at ffmpeg.org
> To unsubscribe, visit link above, or email
> libav-user-request at ffmpeg.org with subject "unsubscribe".
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Libav-user