Gnurou / v4l2r

Rust bindings for V4L2
MIT License
21 stars 10 forks source link

simple_decoder produces unreadable output on raspberry pi #11

Open SylvainGarrigues opened 1 year ago

SylvainGarrigues commented 1 year ago

I can successfully decode an annex-b h264 bitstream with the simple_decoder example on a raspberry pi: cargo run --example simple_decoder -- test.h264 /dev/video10 --save test.yuv --input_format h264

However, the resulting decoded file doesn't display well: ffplay -f rawvideo -pixel_format yuv420p -video_size 1920x1080 -i test.yuv

I have tested with several h264 files, and the v4l2 m2m decoder does work when I am decoding with FFmpeg: ffmpeg -vcodec h264_v4l2m2m -i test.h264 -f rawvideo -pixel_format yuv420p test-ffmpeg.yuv ffplay -f rawvideo -pixel_format yuv420p -video_size 1920x1080 -I test-ffmpeg.yuv

Has the simple_decoder been tested with an actual h264 input file?

Gnurou commented 1 year ago

On an actual h.264 file, yes, however I have not tried it on a Raspberry Pi. Could you share which Pi model you are trying to run this on?

SylvainGarrigues commented 1 year ago

Sure, I tested on a Raspberry Pi 3 with the latest and up-to-date official 64 bit OS (i.e Debian 11).