run_env.sh 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #!/bin/bash
  2. ##################################################################
  3. ## ##
  4. ## SPDX-License-Identifier: GPL-2.0-or-later ##
  5. ## ##
  6. ## Copyright (C) 2018-2022 Starfive Technology ##
  7. ## ##
  8. ##################################################################
  9. CURDIR=$(cd `dirname $0`; pwd)
  10. export LD_LIBRARY_PATH=$CURDIR/target/usr/lib/
  11. ## load wave511 vdec.ko
  12. pushd $CURDIR/target/root/wave511
  13. ./vdec_load.sh
  14. popd
  15. ## load wave420l venc.ko
  16. pushd $CURDIR/target/root/wave420l
  17. ./venc_load.sh
  18. popd
  19. ## load codaj12 jpu.ko
  20. pushd $CURDIR/target/root/codaj12
  21. ./load.sh
  22. popd
  23. ## e.g.: ffmpeg use h264_omx to hard decode 264 file and output to yuv420p file, use 7yuv tool to check
  24. #$CURDIR/target/usr/bin/ffmpeg -vcodec h264_omx -i Sintel_720_10s_10MB.mp4 -pix_fmt yuv420p 720p_i420.yuv
  25. ## e.g. ffplay use h264_omx to hard decode and play video on SDL2.
  26. ## Note: this not good now, will fix it asap
  27. #$CURDIR/target/usr/bin/ffplay -vcodec h264_omx -i Sintel_720_10s_10MB.mp4
  28. ## e.g. gstreamer decode + display
  29. # gst-launch-1.0 filesrc location=Audio_Video_Sync_Test_1_1920x1080.mp4 ! qtdemux name=demux demux.video_0 ! queue ! h264parse ! omxh264dec ! xvimagesink
  30. # gst-launch-1.0 filesrc location=4K_30FPS_AVC_MainL5_2.h265 ! h265parse ! omxh265dec ! videoconvert ! videoscale ! xvimagesink
  31. # gst-launch-1.0 filesrc location=youtube001_1080p_h264_aac.mp4 ! qtdemux name=demux demux.video_0 ! queue ! h264parse ! omxh264dec ! xvimagesink
  32. # gst-launch-1.0 filesrc location=2k.18fps.mp4 ! qtdemux name=demux demux.video_0 ! queue ! h265parse ! omxh265dec ! videoconvert ! videoscale ! xvimagesink
  33. # gst-launch-1.0 filesrc location=youtube002_1080p_h264_aac.mp4 ! qtdemux name=demux demux.video_0 ! queue ! h264parse ! omxh264dec ! xvimagesink
  34. # gst-launch-1.0 filesrc location=file_example_MP4_640_3MG.mp4 ! qtdemux name=demux demux.video_0 ! queue ! h264parse ! omxh264dec ! xvimagesink