...
View file | ||
---|---|---|
|
View file | ||
---|---|---|
|
Apply patch
Code Block |
---|
cd ~/code/ffmpeg-4.4.4 patch -p1 < 0001-swscale-x86-yuv2rgb-Fix-build-without-SSSE3.patch patch -p1 < 0002-avcodec-vaapi_h264-skip-decode-if-pic-has-no-slices.patch patch -p1 < 0003-libavutil-Fix-mips-build.patch patch -p1 < 0004-configure-add-extralibs-to-extralibs_xxx.patch patch -p1 < 0005-v4l2-hw-codec-support.patch patch -p1 < 0006-v4l2-enc-add-spspps-to-each-idr.patch |
5 . Configure ,build and install in prefix path “/home/sunplus/code/install-ffmpeg
"
...
Code Block |
---|
mplayer output.h264 |
You can also record video and separate the record file by time with fix video length. Action command is below:
Code Block |
---|
ffmpeg -f v4l2 -input_format yuyv422 -framerate 30 -video_size 640x480 -i /dev/video0 -vcodec h264_v4l2m2m -spspps_to_idr 1 -f segment -segment_time 60 -map 0 -reset_timestamps 1 -strftime 1 -preset ultrafast -crf 23 output_%Y-%m-%d_%H:%M:%S.h264 |
Command argument -spspps_to_idr 1
will automatically add SPS and PPS to the second and subsequent recorded video files to prevent playback issues.
Decode H.264 to YUV
Code Block |
---|
ffmpeg -benchmark -y -vcodec h264_v4l2m2m -i output.h264 ffout.yuv |
...