Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pimoroni Pico DV - Raw Audio/Video Player #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Gadgetoid
Copy link

@Gadgetoid Gadgetoid commented Nov 12, 2021

This AV player for the Pimoroni Pico DV uses straight-forward (ish) ffmpeg commands to convert any AV source into the raw formats required to blast directly at the i2s hardware/framebuffer.

I've tried to make this appropriate for inclusion in this repository, but I'll understand if you feel I need to stick it elsewhere!

Requires:

These should all be cloned alongside each other.

Building:

cd PicoDVI/software
mkdir build
cd build
cmake .. -DDVI_DEFAULT_SERIAL_CONFIG=pimoroni_demo_hdmi_cfg -DPICO_SDK_PATH=../../../pico-sdk -DPICO_SDK_POST_LIST_DIRS=`pwd`/../../../pico-extras
make raw_av_player -j

Warning

This example (and any other example for Pico DVI) requires that your HDMI display is capable of displaying the output signal and supports the configured timings.

By default this example uses dvi_timing_800x480p_60hz (I should probably change that) which you'll probably need to change to dvi_timing_640x480p_60hz.

You can do this by changing the line: #define DVI_TIMING dvi_timing_800x480p_60hz in main.cpp

Running:

Needs a FAT32-formatted SD card with audio/video files on:

Convert video to raw RGB656 litte-endian using ffmpeg, eg:

ffmpeg -i BigBuckBunny_640x360.m4v -vf scale=400:240,fps=12 -c:v rawvideo -pix_fmt rgb565le BigBuckBunny2.rgb

Convert audio to raw, signed, 16-bit, little-endian mono using ffmpeg, eg:

ffmpeg -i BigBuckBunny_640x360.m4v -f s16le -acodec pcm_s16le -ar 22050 -ac 1 BigBuckBunny2.pcm

Place these files on the SD card, insert, fire up, cross your fingers!

Notes

I'm mindful that this example brings a lot of baggage with the Pimoroni Pico libraries- therefore I have (hopefully) made CMake fail gracefully when these are not available and raw_av_player just wont be available as a target.

Plays raw RGB565 video and 16-bit mono audio from separate files on an SD card.

See comments in apps/raw_av_player/main.cpp for ffmpeg arguments to convert these.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant