ffmpeg mkv to mp4 ile ses çıkarmadan siyah ekranda görüntüleniyor


0

Bir mkv videoyu mp4'e dönüştürmeye çalışıyorum, ancak kullandığım kodlarla çalışmıyor.

Genellikle bu 2 koddan birini kullanırım:

ffmpeg -i input.mkv -c:v copy -c:a copy output.mp4 ffmpeg -i input.mkv -acodec aac -strict -2 -ab 320k -c:v copy output.mp4

Video için her ikisini de dönüştürmeye çalışıyorum. Bu konuda hala yeni bir şeyim ve neden bu sonuçları aldığımı anlamıyorum.

Sonuç, hiçbir video veya sesi oynatmayacak yalnızca siyah bir ekran olan bir mp4.

Kod 1:

ffmpeg -i input.mkv -c:v copy -c:a copy output.mp4

Sonuçlar:

ffmpeg version N-73633-gdfc5858 Copyright (c) 2000-2015 the FFmpeg developers
  built with gcc 4.9.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enable-zlib
  libavutil      54. 28.100 / 54. 28.100
  libavcodec     56. 47.100 / 56. 47.100
  libavformat    56. 40.100 / 56. 40.100
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 21.100 /  5. 21.100
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.100 /  1.  2.100
  libpostproc    53.  3.100 / 53.  3.100
Input #0, matroska,webm, from 'tb1.mkv':
  Metadata:
    title           : #01 All's well that ends well.
    encoder         : libebml v1.3.0 + libmatroska v1.4.0
    creation_time   : 2013-05-22 02:07:43
  Duration: 00:24:16.33, start: 0.000000, bitrate: 4643 kb/s
    Chapter #0:0: start 0.000000, end 51.051000
    Metadata:
      title           : Introduction
    Chapter #0:1: start 51.051000, end 142.142000
    Metadata:
      title           : OP - "Orion wo Nazoru"
    Chapter #0:2: start 142.142000, end 627.293333
    Metadata:
      title           : Part A
    Chapter #0:3: start 627.293333, end 1326.033042
    Metadata:
      title           : Part B
    Chapter #0:4: start 1326.033042, end 1416.331583
    Metadata:
      title           : ED - "Hoshi no Sumika"
    Chapter #0:5: start 1416.331583, end 1440.439000
    Metadata:
      title           : Conclusion
    Chapter #0:6: start 1440.439000, end 1456.330000
    Metadata:
      title           : Next Time
    Stream #0:0: Video: h264 (High 10), yuv420p10le, 1280x720 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
    Metadata:
      title           : 720p 10-bit h.264
    Stream #0:1(jpn): Audio: aac (LC), 48000 Hz, stereo, fltp (default)
    Metadata:
      title           : Japanese Dialogue (2.0 AAC)
    Stream #0:2(eng): Audio: aac (LC), 48000 Hz, stereo, fltp
    Metadata:
      title           : English Dialogue (2.0 AAC)
    Stream #0:3(jpn): Subtitle: ass (default)
    Metadata:
      title           : Full Subtitles - Karaoke & Hero Colors (ASS)
    Stream #0:4(jpn): Subtitle: ass
    Metadata:
      title           : Full Subtitles - Plain (ASS)
    Stream #0:5(eng): Subtitle: ass
    Metadata:
      title           : Theme Song Only Subtitles - Karaoke (ASS)
    Stream #0:6(eng): Subtitle: ass
    Metadata:
      title           : Theme Song Only Subtitles - Plain (ASS)
    Stream #0:7: Attachment: ttf
    Metadata:
      filename        : BELL.TTF
      mimetype        : application/x-truetype-font
    Stream #0:8: Attachment: ttf
    Metadata:
      filename        : BELLI.TTF
      mimetype        : application/x-truetype-font
    Stream #0:9: Attachment: ttf
    Metadata:
      filename        : KOMTXT__.ttf
      mimetype        : application/x-truetype-font
    Stream #0:10: Attachment: ttf
    Metadata:
      filename        : KOMTXTI_.ttf
      mimetype        : application/x-truetype-font
    Stream #0:11: Attachment: ttf
    Metadata:
      filename        : TEMPSITC.TTF
      mimetype        : application/x-truetype-font
[mp4 @ 00000000053fd800] Codec for stream 0 does not use global headers but container format requires global headers
[mp4 @ 00000000053fd800] Codec for stream 1 does not use global headers but container format requires global headers
Output #0, mp4, to 'tb1.mp4':
  Metadata:
    title           : #01 All's well that ends well.
    encoder         : Lavf56.40.100
    Chapter #0:0: start 0.000000, end 51.051000
    Metadata:
      title           : Introduction
    Chapter #0:1: start 51.051000, end 142.142000
    Metadata:
      title           : OP - "Orion wo Nazoru"
    Chapter #0:2: start 142.142000, end 627.293333
    Metadata:
      title           : Part A
    Chapter #0:3: start 627.293333, end 1326.033042
    Metadata:
      title           : Part B
    Chapter #0:4: start 1326.033042, end 1416.331583
    Metadata:
      title           : ED - "Hoshi no Sumika"
    Chapter #0:5: start 1416.331583, end 1440.439000
    Metadata:
      title           : Conclusion
    Chapter #0:6: start 1440.439000, end 1456.330000
    Metadata:
      title           : Next Time
    Stream #0:0: Video: h264 ([33][0][0][0] / 0x0021), yuv420p10le, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 23.98 fps, 23.98 tbr, 16k tbn, 1k tbc (default)
    Metadata:
      title           : 720p 10-bit h.264
    Stream #0:1(jpn): Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, stereo (default)
    Metadata:
      title           : Japanese Dialogue (2.0 AAC)
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=34917 fps=1057 q=-1.0 Lsize=  795559kB time=00:24:16.30 bitrate=4475.2kbits/s
video:763789kB audio:30446kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.166663%

Kod 2:

ffmpeg -i input.mkv -acodec aac -strict -2 -ab 320k -c:v copy output.mp4

Sonuçlar:

Input #0, matroska,webm, from 'tb1.mkv':
  Metadata:
    title           : #01 All's well that ends well.
    encoder         : libebml v1.3.0 + libmatroska v1.4.0
    creation_time   : 2013-05-22 02:07:43
  Duration: 00:24:16.33, start: 0.000000, bitrate: 4643 kb/s
    Chapter #0:0: start 0.000000, end 51.051000
    Metadata:
      title           : Introduction
    Chapter #0:1: start 51.051000, end 142.142000
    Metadata:
      title           : OP - "Orion wo Nazoru"
    Chapter #0:2: start 142.142000, end 627.293333
    Metadata:
      title           : Part A
    Chapter #0:3: start 627.293333, end 1326.033042
    Metadata:
      title           : Part B
    Chapter #0:4: start 1326.033042, end 1416.331583
    Metadata:
      title           : ED - "Hoshi no Sumika"
    Chapter #0:5: start 1416.331583, end 1440.439000
    Metadata:
      title           : Conclusion
    Chapter #0:6: start 1440.439000, end 1456.330000
    Metadata:
      title           : Next Time
    Stream #0:0: Video: h264 (High 10), yuv420p10le, 1280x720 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
    Metadata:
      title           : 720p 10-bit h.264
    Stream #0:1(jpn): Audio: aac (LC), 48000 Hz, stereo, fltp (default)
    Metadata:
      title           : Japanese Dialogue (2.0 AAC)
    Stream #0:2(eng): Audio: aac (LC), 48000 Hz, stereo, fltp
    Metadata:
      title           : English Dialogue (2.0 AAC)
    Stream #0:3(jpn): Subtitle: ass (default)
    Metadata:
      title           : Full Subtitles - Karaoke & Hero Colors (ASS)
    Stream #0:4(jpn): Subtitle: ass
    Metadata:
      title           : Full Subtitles - Plain (ASS)
    Stream #0:5(eng): Subtitle: ass
    Metadata:
      title           : Theme Song Only Subtitles - Karaoke (ASS)
    Stream #0:6(eng): Subtitle: ass
    Metadata:
      title           : Theme Song Only Subtitles - Plain (ASS)
    Stream #0:7: Attachment: ttf
    Metadata:
      filename        : BELL.TTF
      mimetype        : application/x-truetype-font
    Stream #0:8: Attachment: ttf
    Metadata:
      filename        : BELLI.TTF
      mimetype        : application/x-truetype-font
    Stream #0:9: Attachment: ttf
    Metadata:
      filename        : KOMTXT__.ttf
      mimetype        : application/x-truetype-font
    Stream #0:10: Attachment: ttf
    Metadata:
      filename        : KOMTXTI_.ttf
      mimetype        : application/x-truetype-font
    Stream #0:11: Attachment: ttf
    Metadata:
      filename        : TEMPSITC.TTF
      mimetype        : application/x-truetype-font
[mp4 @ 00000000031b8e00] Codec for stream 0 does not use global headers but container format requires global headers
Output #0, mp4, to 'tb1.mp4':
  Metadata:
    title           : #01 All's well that ends well.
    encoder         : Lavf56.40.100
    Chapter #0:0: start 0.000000, end 51.051000
    Metadata:
      title           : Introduction
    Chapter #0:1: start 51.051000, end 142.142000
    Metadata:
      title           : OP - "Orion wo Nazoru"
    Chapter #0:2: start 142.142000, end 627.293333
    Metadata:
      title           : Part A
    Chapter #0:3: start 627.293333, end 1326.033042
    Metadata:
      title           : Part B
    Chapter #0:4: start 1326.033042, end 1416.331583
    Metadata:
      title           : ED - "Hoshi no Sumika"
    Chapter #0:5: start 1416.331583, end 1440.439000
    Metadata:
      title           : Conclusion
    Chapter #0:6: start 1440.439000, end 1456.330000
    Metadata:
      title           : Next Time
    Stream #0:0: Video: h264 ([33][0][0][0] / 0x0021), yuv420p10le, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 23.98 fps, 23.98 tbr, 16k tbn, 1k tbc (default)
    Metadata:
      title           : 720p 10-bit h.264
    Stream #0:1(jpn): Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, stereo, fltp, 320 kb/s (default)
    Metadata:
      title           : Japanese Dialogue (2.0 AAC)
      encoder         : Lavc56.47.100 aac
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
frame=34917 fps=142 q=-1.0 Lsize=  821767kB time=00:24:16.30 bitrate=4622.6kbits/s
video:763789kB audio:56654kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.161340%

Biri bana ne olup bittiğini anlamamda yardımcı olabilirse çok memnun olurum.


Kayıtlar herhangi bir hata göstermiyor, sadece eklenerek çıkartılabilen bir uyarı var -flags +global_header. Çıktıyı nasıl test ediyorsunuz?
Gyan

Windows media player ve photoshop kullanarak test ettim. Ben gif yapmaya çalışıyorum ama mp4 her iki uygulamada da açılamıyor. Vlc ile çalışır, ancak bir klip kaydetmeye çalıştığımda, klip wmp veya photoshop ile de açılamaz.
Tazberry

Ayrıca, senin ffmpegeski. Yeni bir yapı kullanmanız şiddetle tavsiye edilir. Görünüşe göre, Windows kullanıyorsunuz, Zeranoe'da yeni bir yapı alabilirsiniz .
llogan

Bunu çözdün mü? Aynı sorun var ve -pix_fmt yuv420p çözmedi.
user460114 16:18

Evet, bu benim sorunumu çözdü ...
Tazberry

Yanıtlar:


2

Çıktınız 10 Bit video ( yuv420p10le) - Sanırım WMP ve diğer bazı oyuncular buna dayanamıyor.

Uyumluluk için, -pix_fmt yuv420pHDR yapmak istemiyorsanız veya renk gamını arttırmadıysanız, bugün video uygulamalarının çoğu için varsayılan olan 8-Bit kodlamaya geri dönerek videoyu dönüştürmeniz (yeniden kodlamanız) gerekir.

Sitemizi kullandığınızda şunları okuyup anladığınızı kabul etmiş olursunuz: Çerez Politikası ve Gizlilik Politikası.
Licensed under cc by-sa 3.0 with attribution required.