Проблемы с преобразованием формата ffmpeg MKV в MP4 - PullRequest
0 голосов
/ 28 сентября 2019

Я преобразовал видеофайл 3Gb MKV в формат MP4, используя следующую команду ffmpeg:

ffmpeg -i input.mkv -c: v libx264 -crf 23 -c: a aac -movflags faststart output.mp4
ffmpeg -i input.mkv -acodec copy -vcodec copy output.mp4
ffmpeg version N-95111-g87ddf9f1ef Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 9.2.1 (GCC) 20190918
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
  libavutil      56. 35.100 / 56. 35.100
  libavcodec     58. 59.100 / 58. 59.100
  libavformat    58. 33.100 / 58. 33.100
  libavdevice    58.  9.100 / 58.  9.100
  libavfilter     7. 59.100 /  7. 59.100
  libswscale      5.  6.100 /  5.  6.100
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
Input #0, matroska,webm, from 'input.mkv':
  Metadata:
    title           : claucha75
    encoder         : libebml v1.3.5 + libmatroska v1.4.8
    creation_time   : 2018-01-23T22:07:33.000000Z
  Duration: 01:37:13.89, start: 0.000000, bitrate: 5044 kb/s
    Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive), 1920x1080, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
    Metadata:
      title           : claucha75
      BPS             : 4146894
      BPS-eng         : 4146894
      DURATION        : 01:37:12.952000000
      DURATION-eng    : 01:37:12.952000000
      NUMBER_OF_FRAMES: 139851
      NUMBER_OF_FRAMES-eng: 139851
      NUMBER_OF_BYTES : 3023579528
      NUMBER_OF_BYTES-eng: 3023579528
      _STATISTICS_WRITING_APP: mkvmerge v20.0.0 ('I Am The Sun') 64-bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v20.0.0 ('I Am The Sun') 64-bit
      _STATISTICS_WRITING_DATE_UTC: 2018-01-23 22:07:33
      _STATISTICS_WRITING_DATE_UTC-eng: 2018-01-23 22:07:33
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:1(spa): Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s (default)
    Metadata:
      title           : Latino
      BPS             : 448000
      BPS-eng         : 448000
      DURATION        : 01:37:13.888000000
      DURATION-eng    : 01:37:13.888000000
      NUMBER_OF_FRAMES: 182309
      NUMBER_OF_FRAMES-eng: 182309
      NUMBER_OF_BYTES : 326697728
      NUMBER_OF_BYTES-eng: 326697728
      _STATISTICS_WRITING_APP: mkvmerge v20.0.0 ('I Am The Sun') 64-bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v20.0.0 ('I Am The Sun') 64-bit
      _STATISTICS_WRITING_DATE_UTC: 2018-01-23 22:07:33
      _STATISTICS_WRITING_DATE_UTC-eng: 2018-01-23 22:07:33
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:2(eng): Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s
    Metadata:
      title           : Ingles
      BPS             : 448000
      BPS-eng         : 448000
      DURATION        : 01:37:13.856000000
      DURATION-eng    : 01:37:13.856000000
      NUMBER_OF_FRAMES: 182308
      NUMBER_OF_FRAMES-eng: 182308
      NUMBER_OF_BYTES : 326695936
      NUMBER_OF_BYTES-eng: 326695936
      _STATISTICS_WRITING_APP: mkvmerge v20.0.0 ('I Am The Sun') 64-bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v20.0.0 ('I Am The Sun') 64-bit
      _STATISTICS_WRITING_DATE_UTC: 2018-01-23 22:07:33
      _STATISTICS_WRITING_DATE_UTC-eng: 2018-01-23 22:07:33
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:3(spa): Subtitle: subrip
    Metadata:
      title           : Sub. Latino
      BPS             : 58
      BPS-eng         : 58
      DURATION        : 01:27:56.723000000
      DURATION-eng    : 01:27:56.723000000
      NUMBER_OF_FRAMES: 1048
      NUMBER_OF_FRAMES-eng: 1048
      NUMBER_OF_BYTES : 38641
      NUMBER_OF_BYTES-eng: 38641
      _STATISTICS_WRITING_APP: mkvmerge v20.0.0 ('I Am The Sun') 64-bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v20.0.0 ('I Am The Sun') 64-bit
      _STATISTICS_WRITING_DATE_UTC: 2018-01-23 22:07:33
      _STATISTICS_WRITING_DATE_UTC-eng: 2018-01-23 22:07:33
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:4(eng): Subtitle: subrip
    Metadata:
      title           : Sub. Ingles
      BPS             : 72
      BPS-eng         : 72
      DURATION        : 01:32:29.880000000
      DURATION-eng    : 01:32:29.880000000
      NUMBER_OF_FRAMES: 1820
      NUMBER_OF_FRAMES-eng: 1820
      NUMBER_OF_BYTES : 50243
      NUMBER_OF_BYTES-eng: 50243
      _STATISTICS_WRITING_APP: mkvmerge v20.0.0 ('I Am The Sun') 64-bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v20.0.0 ('I Am The Sun') 64-bit
      _STATISTICS_WRITING_DATE_UTC: 2018-01-23 22:07:33
      _STATISTICS_WRITING_DATE_UTC-eng: 2018-01-23 22:07:33
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
File 'output.mp4' already exists. Overwrite ? [y/N] y
[mp4 @ 000002935ee0ff00] track 1: codec frame size is not set
Output #0, mp4, to 'output.mp4':
  Metadata:
    title           : claucha75
    encoder         : Lavf58.33.100
    Stream #0:0: Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 23.98 fps, 23.98 tbr, 16k tbn, 1k tbc (default)
    Metadata:
      title           : claucha75
      BPS             : 4146894
      BPS-eng         : 4146894
      DURATION        : 01:37:12.952000000
      DURATION-eng    : 01:37:12.952000000
      NUMBER_OF_FRAMES: 139851
      NUMBER_OF_FRAMES-eng: 139851
      NUMBER_OF_BYTES : 3023579528
      NUMBER_OF_BYTES-eng: 3023579528
      _STATISTICS_WRITING_APP: mkvmerge v20.0.0 ('I Am The Sun') 64-bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v20.0.0 ('I Am The Sun') 64-bit
      _STATISTICS_WRITING_DATE_UTC: 2018-01-23 22:07:33
      _STATISTICS_WRITING_DATE_UTC-eng: 2018-01-23 22:07:33
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:1(spa): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), fltp, 448 kb/s (default)
    Metadata:
      title           : Latino
      BPS             : 448000
      BPS-eng         : 448000
      DURATION        : 01:37:13.888000000
      DURATION-eng    : 01:37:13.888000000
      NUMBER_OF_FRAMES: 182309
      NUMBER_OF_FRAMES-eng: 182309
      NUMBER_OF_BYTES : 326697728
      NUMBER_OF_BYTES-eng: 326697728
      _STATISTICS_WRITING_APP: mkvmerge v20.0.0 ('I Am The Sun') 64-bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v20.0.0 ('I Am The Sun') 64-bit
      _STATISTICS_WRITING_DATE_UTC: 2018-01-23 22:07:33
      _STATISTICS_WRITING_DATE_UTC-eng: 2018-01-23 22:07:33
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=139851 fps=2149 q=-1.0 Lsize= 3275868kB time=01:37:13.85 bitrate=4600.0kbits/s speed=89.7x
video:2952714kB audio:319041kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.125715%

Команда создает файл MP4.Открытие файла занимает много времени, а затем для появления кадра требуется еще несколько минут.В преобразованном файле также отсутствует звук.

У кого-нибудь есть представление о медленном времени загрузки и отсутствии звука?

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...