0

I've downloaded a rather vast number of videos from YouTube over the past couple of years (probably in excess of 1500) - and these are all MKV.

Unfortunately — Premiere Pro seems only capable of importing some of them, some of the time, which appears to be a whole rabbit hole in and of itself.

I would like to transcode these files into something which Premiere can import/edit without difficulty - like MP4 or WebM - and without compromising quality.

I've gone through a large number of videos on YouTube to try and find a way of doing this - but what I've found has either been extremely time-consuming or not yielded a result that's lossless.

Some have suggested various "converter" type applications - but the processing time per file (not even major files) is absolutely insane.

I've seen FFmpeg being mentioned - but is the result actually lossless?

Giacomo1968
  • 53,069
  • 19
  • 162
  • 212
ReEA
  • 1
  • 1
  • 1
  • `Premiere Pro seems only capable of importing some of them` most likely it's because of a lack of codec for their video and/or audio streams? So "losslessly" convert them into another formats (i.e. remux their streams into a different container, like mp4 or webm) wouldn't help? – Tom Yan May 10 '20 at 15:13
  • If Premiere doesn't like the file the only options are to 1) re-mux if Premiere supports the video and audio formats but not the container format, or 2) do a full re-encode if it does not support the video and/or audio formats. 3) Use a different editor. – llogan May 10 '20 at 16:47
  • 5
    Does this answer your question? [How to convert an MKV to AVI with minimal loss](https://superuser.com/questions/227338/how-to-convert-an-mkv-to-avi-with-minimal-loss) – Giacomo1968 May 10 '20 at 17:14

1 Answers1

4

Transcoding is slow and lossy, because it literally means re-compressing the entire video frame by frame in the new format, the same way as when it was compressed in the first place. And generally, the better a codec is at compressing video without being noticeably lossy, the more processing power it'll need and the longer it'll take.

You might be able to tune the codec to do its job much faster if you can deal with the output file being 10 times larger, for example. You could even choose an 100%-lossless codec (if Premiere supports one), at the cost of massive output files.

But it's not clear whether you're actually looking for transcoding in the first place.

  • "MKV", "MP4", etc. themselves are just container formats – they don't directly define how the video is compressed, only how it's packaged. (The actual video codec would be H.264 or HEVC or VP9; the audio would be AAC or Opus or MP3.)

    It is possible to convert files from one container format to another (e.g. MP4 to MKV) without any transcoding – only by re-packaging (re-muxing) the same data in a different way. In FFMPEG you would do this using the special 'copy' codec, e.g. -c:a copy -c:v copy. This is always lossless and it's as fast as the computer can copy data, but only because it does not transcode anything.

  • But although I said the container formats don't directly define the codec, some of them are compatible only with certain codecs – sometimes for technical reasons, and sometimes just because the "codec ID" or other parameters haven't been agreed on yet. For example, as far as I know you cannot put Opus-encoded audio in an MP4 file, and "officially" you cannot put VP9 video in MP4 either.

    As a result some YouTube download tools deliberately generate MKV files because they have to – they need its greater flexibility regarding which codecs can fit in an MKV file, and either audio or video would need to be transcoded if you wanted to put it into MP4.

  • It is very likely that the problem with Premiere, too, lies not in the container, but in the specific codecs used. For example, if Premiere was incapable of decoding Opus audio, then it couldn't import Opus audio no matter if it's inside an MKV file or a WebM file.

    In these cases, the only way to make it work would be to transcode using a different codec. Sometimes you might be able to keep the video but transcode (or re-download) just the audio. But re-encoding video will be lossly and slow.

u1686_grawity
  • 426,297
  • 64
  • 894
  • 966
  • Thank you for the detailed answer. "It is possible to convert video files from one container format to another (e.g. MP4 to MKV) without any re-encoding – only re-packaging (re-muxing) the same data in a different way. Using FFMPEG you would do this using the 'copy' codec, e.g. -c:a copy -c:v copy." I'll have to try this at once. – ReEA May 10 '20 at 15:38
  • I'm getting the same error when importing the MP4 as I did with the original MKV. "The file has an unsupported compression type." I followed this tutorial, by the way: https://www.youtube.com/watch?v=6mV3o2GYOrw – ReEA May 10 '20 at 16:17
  • 1
    As user1686 has suggested, this "_error_" is not likely to be resolved by simply re-muxing the media... you'll need to acquire it in a different format, or transcode it using a different codec. Look into which codecs are supported by the software, and look into the possibility of installing support for additional codecs. – Attie May 10 '20 at 16:22
  • Tried using this tutorial instead: https://www.youtube.com/watch?v=s9JdI6ivJBg And the result was a red popup error message in the bottom right of Premiere Pro saying: File uses unsupported video compression type "vp09" – ReEA May 10 '20 at 16:29
  • 1
    Both tutorials are okay; and they show you the same thing. Can you try converting to .webm instead of MP4? If that still doesn't work, then you can conclude that Premiere just doesn't understand the VP9 codec at all and the video _has_ to be transcoded the slow way. (And in that case, the fastest and least lossy method would be to re-download the original video in a different codec since YouTube offers several.) – u1686_grawity May 10 '20 at 16:50
  • @user1686 OH. MY. GOD. DUDE. THIS FREAKING WORKED!!! I've spent God only knows how many hours (and generally worrying over months - not even kidding) on trying to resolve this issue and this works perfectly!!! Thank you so much. Seriously. – ReEA May 10 '20 at 16:59