[FFmpeg-user] Trying to Reduce Sizes of Movies Ripped with MakeMKV

Marc Barrett mnealbarrett at gmail.com
Mon Oct 26 13:26:29 EET 2020


You are right:
"Stream #0:0(eng): Video: mpeg2video (Main)"

And, anyway, your suggestion worked!! Thank you so much!


>As far as I remember MakeMKV, and from the sizes you posted, it creates
>a non-reencoded dump of the disk's contents.
>
>DVDs are *not* encoded with H.264, but rather MPEG-2 video. So you
>simply cannot use the h264_cuvid decoder on that material. ffmpeg
>should have shown you what it thinks the video codec is. Check with
>
>$ ffmpeg -i in.mkv
>
>and if that confirms my suspicion, use the "mpeg2_cuvid" input codec on
>your command line.
>
>Let us know,
>cheers,
>Moritz

On Mon, Oct 26, 2020 at 4:31 AM Moritz Barsnick <barsnick at gmx.net> wrote:

> Hi Marc
>
> On Sun, Oct 25, 2020 at 13:21:45 -0500, Marc Barrett wrote:
> > I have been using the following command to recompact the Blu-Ray MKV
> files:
> >
> > 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.
> >
> >
> > [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
>
> As Carl/z pointed out:
> > But there _is_ output from ffmpeg, and that can tell us a lot about the
> files.
>
> You never actually showed us the complete output from ffmpeg. Even just
> an ffprobe of the input file would suffice.
>
> > I am using ffmpeg version n4.1.4 on a Ubuntu Mate 20.04 system, Intel X64
> > PC. Everything is up-to-date (I run apt update/upgrade regularly).
>
> (As others mentionend: That ffmpeg version is not up to date, though.
> You should try to get hold of a recent binary.)
>
>
> As far as I remember MakeMKV, and from the sizes you posted, it creates
> a non-reencoded dump of the disk's contents.
>
> DVDs are *not* encoded with H.264, but rather MPEG-2 video. So you
> simply cannot use the h264_cuvid decoder on that material. ffmpeg
> should have shown you what it thinks the video codec is. Check with
>
> $ ffmpeg -i in.mkv
>
> and if that confirms my suspicion, use the "mpeg2_cuvid" input codec on
> your command line.
>
> Let us know,
> cheers,
> Moritz
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-user mailing list