Thank you for sharing. I have successfully compiled ffmpeg containing nvmpi.
But when using it, I found that there was an error prompt, which caused the resulting video to have screen flickering and stuttering, making it unusable. See details below
===== NvVideo: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4
875967048
842091865
H264: Profile = 77, Level = 51
Output #0, mp4, to '/home/yzf/media/241fbd906ee0461ea00533d04580ff3c.mp4':
Metadata:
encoder : Lavf61.7.100
Stream #0:0: Audio: aac (LC) (mp4a / 0x6134706D), 24000 Hz, mono, fltp, 69 kb/s
Metadata:
encoder : Lavc61.19.101 aac
Stream #0:1: Video: h264 (avc1 / 0x31637661), yuv420p(tv, bt470bg/bt470bg/smpte170m, progressive), 1080x1440, q=2-31, 2000 kb/s, 30 fps, 15360 tbn
Metadata:
encoder : Lavc61.19.101 h264_nvmpi
NVMEDIA: Need to set EMC bandwidth : 846000
NVMEDIA: Need to set EMC bandwidth : 846000
NvVideo: bBlitMode is set to TRUE
[libnvmpi][W]: EAGAIN. User must read output. nvmpi encoder packet memory pool is empty! Packet will be dropped. There may be artifacts in the output video.
...............
[libnvmpi][W]: EAGAIN. User must read output. nvmpi encoder packet memory pool is empty! Packet will be dropped. There may be artifacts in the output video.
[out#0/mp4 @ 0xaaaaf1321270] video:5169KiB audio:194KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: 0.259492%
frame= 663 fps= 48 q=-0.0 Lsize= 5377KiB time=00:00:23.03 bitrate=1912.3kbits/s speed=1.68x
[aac @ 0xaaaaf1324560] Qavg: 342.678
This is the ffmpeg instruction I executed:
./ffmpeg "-i" "/home/yzf/media/411ac54cdea75620a2b428cdc624bfaf.mp3" "-i" "/home/yzf/media/f46e94049f4b4d9ea46753dcb7e6d13b.aac" "-i" "/home/yzf/media/91bd8d1bc4b84a068a835b670162d4b7.mp4" "-i" "/home/yzf/media/4b4e939a83ad47a6b27668a15ff79ac9.mp4" "-i" "/home/yzf/media/f184559b6a284e288cd594b41b6e79fa.mp4" "-filter_complex" "[0:a]volume=18dB[0a];[1:a]volume=4dB[1a];[0a][1a]amix=inputs=2:duration=longest:dropout_transition=2;[2][3]xfade=transition=fade:duration=1:offset=14,format=yuv420p[v3];[v3][4]xfade=transition=wipeleft:duration=1:offset=18,format=yuv420p" "-c:v" "h264_nvmpi" "-c:a" "aac" "/home/yzf/media/241fbd906ee0461ea00533d04580ff3c.mp4"
After testing, it was found that adding xfade=transition=XXX would cause screen distortion and frame loss, while simple video splicing would not cause screen distortion or frame loss. For example: [2:v][3:v][4:v]concat=n=3:v=1
Is there a way to solve it?
Thank you for sharing. I have successfully compiled ffmpeg containing nvmpi.
But when using it, I found that there was an error prompt, which caused the resulting video to have screen flickering and stuttering, making it unusable. See details below
===== NvVideo: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4
875967048
842091865
H264: Profile = 77, Level = 51
Output #0, mp4, to '/home/yzf/media/241fbd906ee0461ea00533d04580ff3c.mp4':
Metadata:
encoder : Lavf61.7.100
Stream #0:0: Audio: aac (LC) (mp4a / 0x6134706D), 24000 Hz, mono, fltp, 69 kb/s
Metadata:
encoder : Lavc61.19.101 aac
Stream #0:1: Video: h264 (avc1 / 0x31637661), yuv420p(tv, bt470bg/bt470bg/smpte170m, progressive), 1080x1440, q=2-31, 2000 kb/s, 30 fps, 15360 tbn
Metadata:
encoder : Lavc61.19.101 h264_nvmpi
NVMEDIA: Need to set EMC bandwidth : 846000
NVMEDIA: Need to set EMC bandwidth : 846000
NvVideo: bBlitMode is set to TRUE
[libnvmpi][W]: EAGAIN. User must read output. nvmpi encoder packet memory pool is empty! Packet will be dropped. There may be artifacts in the output video.
...............
[libnvmpi][W]: EAGAIN. User must read output. nvmpi encoder packet memory pool is empty! Packet will be dropped. There may be artifacts in the output video.
[out#0/mp4 @ 0xaaaaf1321270] video:5169KiB audio:194KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: 0.259492%
frame= 663 fps= 48 q=-0.0 Lsize= 5377KiB time=00:00:23.03 bitrate=1912.3kbits/s speed=1.68x
[aac @ 0xaaaaf1324560] Qavg: 342.678
This is the ffmpeg instruction I executed:
./ffmpeg "-i" "/home/yzf/media/411ac54cdea75620a2b428cdc624bfaf.mp3" "-i" "/home/yzf/media/f46e94049f4b4d9ea46753dcb7e6d13b.aac" "-i" "/home/yzf/media/91bd8d1bc4b84a068a835b670162d4b7.mp4" "-i" "/home/yzf/media/4b4e939a83ad47a6b27668a15ff79ac9.mp4" "-i" "/home/yzf/media/f184559b6a284e288cd594b41b6e79fa.mp4" "-filter_complex" "[0:a]volume=18dB[0a];[1:a]volume=4dB[1a];[0a][1a]amix=inputs=2:duration=longest:dropout_transition=2;[2][3]xfade=transition=fade:duration=1:offset=14,format=yuv420p[v3];[v3][4]xfade=transition=wipeleft:duration=1:offset=18,format=yuv420p" "-c:v" "h264_nvmpi" "-c:a" "aac" "/home/yzf/media/241fbd906ee0461ea00533d04580ff3c.mp4"
After testing, it was found that adding xfade=transition=XXX would cause screen distortion and frame loss, while simple video splicing would not cause screen distortion or frame loss. For example: [2:v][3:v][4:v]concat=n=3:v=1
Is there a way to solve it?