[FFmpeg-user] Re-encoding mkv files from makemkv

William C Bonner wbonner at wimsworld.com
Sat Sep 10 02:03:01 EEST 2022


On Thu, Sep 8, 2022 at 1:24 PM llee040 <llee040 at sbcglobal.net> wrote:

>
> > On Sep 7, 2022, at 5:04 PM, James Board via ffmpeg-user <
> ffmpeg-user at ffmpeg.org> wrote:
> >
> > I'm trying to re-encode an MKV file that I originally created with
> makemkv from the original BluRay disc.  My ffmpeg command is:
> >     ffmpeg-4.1.2-amd64-static/ffmpeg -y -i
> Twin_Peaks-_A_Limited_Event_Series_-_Disc_2_t01.mkv -c:a copy -c:v libx264
> -preset slow -crf 20
> Twin_Peaks-_A_Limited_Event_Series_-_Disc_2_t01_RECODE.mkv
> >
> > The error is
> >     Too many packets buffered for output stream 0:1.
> >     Conversion failed!
> >
> > I just want to re-encode these files to save disk space.  Does anyone
> know how I can resolve the above error?  The full error message is below.
> > Thanks
> >
>
> Here’s a blind-leading-the-blind answer, hopefully you find it useful.
>
> You’re specifying libx264, but keeping .mkv as container. Is that what you
> want? I ran this and it seemed to work, but I also have a later version of
> ffmpeg, perhaps (“.mp4" specified for output):
>
> ffmpeg -y -i Twin_Peaks-_A_Limited_Event_Series_-_Disc_2_t01.mkv -c:a copy
> -c:v libx264  -preset slow -crf 20
> Twin_Peaks-_A_Limited_Event_Series_-_Disc_2_t01_RECODE.mp4
>
> To change the output bit rate, I added "-b:v 2000k” (which does affect
> quality, of course):
>
> ffmpeg -y -i Twin_Peaks-_A_Limited_Event_Series_-_Disc_2_t01.mkv -c:a copy
> -c:v libx264 -b:v 2000k -preset slow -crf 20
> Twin_Peaks-_A_Limited_Event_Series_-_Disc_2_t01_RECODE.mp4
>

I've saved space on DVD rips using a similar command:  ffmpeg.exe -i
"MyMovie_t00.mkv" -c:v libx264 -crf 17 -preset veryfast -c:a copy -c:s copy
-map 0 -movflags +faststart -n "MyMovie_t00.x264.mkv"

If I was doing Blu Ray, I'd be trying to use libx265 instead of libx264.
Everything I've read says that h.265 is mainly useful at higher resolution
and it definitely uses more CPU for the compression so I'm sticking with
h.264.


More information about the ffmpeg-user mailing list