문제

I am trying to convert an mkv file to mp4, webm, and ogv using ffmpeg and I am getting really drastic performance results.

The mkv -> mp4 conversion took all of 2 seconds while the webm and ogv conversions took about 5-10minutes. Is there a faster way to convert to these formats?

Commands used:

mkv -> mp4

ffmpeg -i ironman2trailer.mkv -vcodec copy -acodec copy -absf aac_adtstoasc output.mp4

mkv -> webm

ffmpeg -i -f webm -vcodec libvpx -acodec libvorbis output.webm
도움이 되었습니까?

해결책

In the second command the most of the time was probably taken by video encoding.

More specifically, in addition to changing file container format (that is from mkv to webm), the second command changed codecs of video and audio streams. This includes decoding original streams and encoding them with new codecs.

Your first command just changed the file container format that is not a processor-intensive operation. The original audio and video streams encodings were kept intact that is specified by copy option for audio and video codecs.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top