Skip to content

Commit 12d2ddc

Browse files
committed
feat(linux): wave5: Add FFMPEG Encode commands
Wave5 driver has been updated to make it operable with FFMPEG. Update documentation with relevant commands to expose this feature to customers. Signed-off-by: Brandon Brnich <[email protected]>
1 parent 086b098 commit 12d2ddc

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

source/linux/Foundational_Components_Multimedia_wave5.rst

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,33 @@ To pipe the output from ffmpeg to ffplay with hardware acceleration, the followi
638638
639639
ffmpeg -re -codec:v hevc_v4l2m2m -i input.h265 -fps_mode passthrough -f rawvideo - | ffplay -framerate 30 -video_size 1920x1080 -f rawvideo -autoexit -
640640
641+
FFMPEG also has support to use V4L2 HW accelerators for video encoding. The below command is an example for encoding a raw video utilizing the Wave5 IP:
642+
643+
.. code-block:: console
644+
645+
ffmpeg -f rawvideo -pix_fmt yuv420p -s:v 352x288 -r 30 -i <input-video>.yuv -c:v h264_v4l2m2m <output-video>.h264 -y -nostdin
646+
647+
Below is the equivalent if H265 encoding is desired.
648+
649+
.. code-block:: console
650+
651+
ffmpeg -f rawvideo -pix_fmt yuv420p -s:v 352x288 -r 30 -i <input-video>.yuv -c:v hevc_v4l2m2m city.h265 -y -nostdin
652+
653+
352x288 above is just an example resolution. This value should be updated to properly reflect the resolution of the raw video. FFMPEG can also
654+
capture video using cameras attached to the device. Please see below for an example.
655+
656+
.. code-block:: console
657+
658+
ffmpeg -f v4l2 -framerate 30 -video_size 1280x720 -i /dev/video3 -c:v h264_v4l2m2m <video-destination>
659+
660+
Keep in mind that the Wave5 does have HW requirements for the raw video; please refer to :ref:`Introduction` for these constraints. If the video being
661+
captured is a resolution not aligned to the HW requirements, ffmpeg can be told to pad the video to make it compliant with HW. The following command
662+
accomplishes this.
663+
664+
.. code-block:: console
665+
666+
ffmpeg -f rawvideo -pix_fmt yuv420p -s 1920x1080 -r 30 -i <1080p-input-video>.yuv -vf "pad=width=1920:height=1088:x=0:y=0:color=black" -c:v h264_v4l2m2m <output-video>.h264
667+
641668
To print out the packet's data and payload data in hexadecimal from a given multimedia stream named :file:`foo.h265`, the following can be used:
642669

643670
.. code-block:: console

0 commit comments

Comments
 (0)