I have been using the following command to recompact the Blu-Ray MKV files:
Code: Select all
ffmpeg -y -hwaccel cuvid -c:v h264_cuvid -vsync 0 -i in.mkv -map 0 -codec:v h264_nvenc -codec:a copy -codec:s copy -max_muxing_queue_size 4096 out.mkv
That command works very well for Blu-Rays. It can reduce a 40-50GB MKV file to about 7GB. The problem is, that only works on files produced by ripping Blu-Rays. If I try it on DVD files, I get errors.
Code: Select all
[h264 @ 0x555573579a80] Invalid NAL unit 0, skipping.
Last message repeated 5 times
[h264 @ 0x555573579a80] non-existing PPS 2 referenced
[h264 @ 0x555573579a80] Invalid NAL unit 0, skipping.
Last message repeated 4 times
[h264 @ 0x555573579a80] non-existing PPS 2 referenced
[h264 @ 0x555573579a80] decode_slice_header error
[h264 @ 0x555573579a80] data partitioning is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[h264 @ 0x555573579a80] If you want to help, upload a sample of this file to ftp://upload.ffmpeg.org/incoming/ and contact the ffmpeg-devel mailing list. (ffmpeg-devel@ffmpeg.org)
[h264 @ 0x555573579a80] data partitioning is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[h264 @ 0x555573579a80] If you want to help, upload a sample of this file to ftp://upload.ffmpeg.org/incoming/ and contact the ffmpeg-devel mailing list. (ffmpeg-devel@ffmpeg.org)
[h264 @ 0x555573579a80] data partitioning is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[h264 @ 0x555573579a80] If you want to help, upload a sample of this file to ftp://upload.ffmpeg.org/incoming/ and contact the ffmpeg-devel mailing list. (ffmpeg-devel@ffmpeg.org)
[h264 @ 0x555573579a80] A non-intra slice in an IDR NAL unit.
[h264 @ 0x555573579a80] decode_slice_header error
[h264 @ 0x555573579a80] SEI type 70 size 1120 truncated at 932
[h264 @ 0x555573579a80] crop values invalid 1 5 11 5 / 48 64
Last message repeated 2 times
[h264 @ 0x555573579a80] sps_id 0 out of range
[h264 @ 0x555573579a80] no frame!
[h264 @ 0x555573579a80] non-existing PPS 0 referenced
[h264 @ 0x555573579a80] Invalid NAL unit 1, skipping.
[h264 @ 0x555573579a80] non-existing PPS 0 reference
The following command works on the DVD files produced by MakeMKV, except I get no hardware acceleration:
Code: Select all
ffmpeg -i in.mkv -map 0 -codec:a copy -codec:s copy -max_muxing_queue_size 4096 out.mkv