OK, so now I played first PiO[W] video on Pi400 -- and it only gets a bit slow at the end !
First I stored this modified video.c (which can play video from stdin with filename "-") under /opt/vc/src/hello_pi/hello_video/video.c on Pi400. Then I did "cd /opt/vc/src/hello_pi" and started "./rebuild.sh".
Next I verified that playing hello_video test video plays in same time when played as file
Code: Select all
pi@raspberrypi400:/opt/vc/src/hello_pi/hello_video $ time ( ./hello_video.bin test.h264 )
real 0m12.065s
user 0m0.014s
sys 0m0.288s
pi@raspberrypi400:/opt/vc/src/hello_pi/hello_video $
and via stdin:
Code: Select all
pi@raspberrypi400:/opt/vc/src/hello_pi/hello_video $ time ( cat test.h264 | ./hello_video.bin - )
real 0m12.091s
user 0m0.019s
sys 0m0.516s
pi@raspberrypi400:/opt/vc/src/hello_pi/hello_video $
This is sender side commands on Pi0[W], set input/output pins, fix 1GHz CPU frequency, and then stream test.h264 over GPIO:
Code: Select all
pi@raspberrypi0W:~ $ for((i=2;i<28;++i)); do raspi-gpio set $i op; done
pi@raspberrypi0W:~ $ raspi-gpio set 3 ip
pi@raspberrypi0W:~ $ echo 1000000 | sudo tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
1000000
pi@raspberrypi0W:~ $ sudo ./cpy < /opt/vc/src/hello_pi/hello_video/test.h264
pi@raspberrypi0W:~ $
This is receiver side on Pi400, set input/output pins, fix 1.8GHz CPU frequency, and then play h264 video received over GPIO:
Code: Select all
pi@raspberrypi400:~ $ for((i=2;i<28;++i)); do raspi-gpio set $i ip; done
pi@raspberrypi400:~ $ raspi-gpio set 3 op
pi@raspberrypi400:~ $ echo 1800000 | sudo tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
1800000
pi@raspberrypi400:~ $ sudo ./ypc | ( time /opt/vc/src/hello_pi/hello_video/hello_video.bin - )
done(10336243) 12289636814 841750.84
real 0m13.432s
user 0m0.017s
sys 0m0.206s
pi@raspberrypi400:~ $
The video plays fine for the first 10 seconds, but then slows a bit down. Play time increased from 12 seconds locally to 13.4 seconds over GPIO. Average transfer frequency reduced to only 841750, which means 3*841750=2.525MB/s. test.h264 (nice!) video size is 30MB, which requires 30/12=2.5MB/s average transfer speed. I will investigate why the last 2 seconds of video do not play as nicely as the first 10 seconds ...
I did the commands again, this time recording video:
https://youtu.be/nkwserralEU

- Pi0_GPIO_Pi400.video.jpg
- Pi0_GPIO_Pi400.video.jpg (43.03 KiB) Viewed 1921 times
P.S:
First Pi0 video played over 26 GPIO pins of this connector between Pi0[W] and Pi400:

- GPIO_no_crosstalk.png.50%.jpg
- GPIO_no_crosstalk.png.50%.jpg (9.6 KiB) Viewed 1904 times