如何让 LG LS3450 电视正确显示字幕?

Posted

技术标签:

【中文标题】如何让 LG LS3450 电视正确显示字幕?【英文标题】:How to get LG LS3450 TV to properly show subtitles? 【发布时间】:2021-10-12 16:09:49 【问题描述】:

它应该支持 mkv 文件的手册:视频:H.264 /AVC、XViD、MPEG-4 Part2 音频:HE-AAC、杜比数字、MPEG-1 第三层 (MP3) 也支持 .ass 字幕。那么我到底应该怎么做才能以正确的格式和其他一切播放呢?

使用此命令将 FLAC 音频转换为 AAC:

ffmpeg -i CodeGeass01.mkv -c:a libfdk_aac -profile:a aac_he_v2 CodeGeass01_1.mkv

它可以播放,但没有自定义字体和字幕定位也不起作用。所以看来我需要制作一个hardsub视频,需要刻录字幕。并将音频编码为aac。那么我该如何正确地做到这一点,并使用正确的格式、定位等呢?

ffmpeg -i CodeGeass01.mkv的输出:

ffmpeg version 4.3.2-0+deb11u1ubuntu1 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 10 (Ubuntu 10.2.1-20ubuntu1)
  configuration: --prefix=/usr --extra-version=0+deb11u1ubuntu1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  WARNING: library configuration mismatch
  avcodec     configuration: --prefix=/usr --extra-version=0+deb11u1ubuntu1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared --enable-version3 --disable-doc --disable-programs --enable-libaribb24 --enable-liblensfun --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libtesseract --enable-libvo_amrwbenc
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
[matroska,webm @ 0x561477f71200] Could not find codec parameters for stream 3 (Attachment: none): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[matroska,webm @ 0x561477f71200] Could not find codec parameters for stream 4 (Attachment: none): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[matroska,webm @ 0x561477f71200] Could not find codec parameters for stream 5 (Attachment: none): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[matroska,webm @ 0x561477f71200] Could not find codec parameters for stream 6 (Attachment: none): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[matroska,webm @ 0x561477f71200] Could not find codec parameters for stream 7 (Attachment: none): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[matroska,webm @ 0x561477f71200] Could not find codec parameters for stream 8 (Attachment: none): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[matroska,webm @ 0x561477f71200] Could not find codec parameters for stream 9 (Attachment: none): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[matroska,webm @ 0x561477f71200] Could not find codec parameters for stream 10 (Attachment: none): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, matroska,webm, from '[ShadyCrab] Code Geass Lelouch of the Rebellion - S01E01v2 [BD][1080p][Hi10][Dual][8F912937] (1).mkv':
  Metadata:
    encoder         : libebml v1.4.2 + libmatroska v1.6.4
    creation_time   : 2021-10-11T22:08:26.000000Z
  Duration: 00:24:10.45, start: 0.000000, bitrate: 6340 kb/s
    Chapter #0:0: start 0.000000, end 104.104000
    Metadata:
      title           : Chapter 01
    Chapter #0:1: start 104.104000, end 194.194000
    Metadata:
      title           : Chapter 02
    Chapter #0:2: start 194.194000, end 793.793000
    Metadata:
      title           : Chapter 03
    Chapter #0:3: start 793.793000, end 1359.358000
    Metadata:
      title           : Chapter 04
    Chapter #0:4: start 1359.358000, end 1450.449000
    Metadata:
      title           : Chapter 05
    Stream #0:0(jpn): Video: h264 (High 10), yuv420p10le(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
    Metadata:
      BPS             : 5597190
      DURATION        : 00:24:10.449000000
      NUMBER_OF_FRAMES: 34776
      NUMBER_OF_BYTES : 1014804966
      _STATISTICS_WRITING_APP: mkvmerge v62.0.0 ('Apollo') 64-bit
      _STATISTICS_WRITING_DATE_UTC: 2021-10-11 22:08:26
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:1(jpn): Audio: flac, 48000 Hz, stereo, s16 (default)
    Metadata:
      BPS             : 735933
      DURATION        : 00:24:10.449000000
      NUMBER_OF_FRAMES: 16998
      NUMBER_OF_BYTES : 133429238
      _STATISTICS_WRITING_APP: mkvmerge v62.0.0 ('Apollo') 64-bit
      _STATISTICS_WRITING_DATE_UTC: 2021-10-11 22:08:26
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:2: Subtitle: ass (default)
    Metadata:
      BPS             : 158
      DURATION        : 00:23:31.690000000
      NUMBER_OF_FRAMES: 470
      NUMBER_OF_BYTES : 27973
      _STATISTICS_WRITING_APP: mkvmerge v62.0.0 ('Apollo') 64-bit
      _STATISTICS_WRITING_DATE_UTC: 2021-10-11 22:08:26
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:3: Attachment: none
    Metadata:
      filename        : AbbeyHU.ttf
      mimetype        : font/ttf
    Stream #0:4: Attachment: none
    Metadata:
      filename        : Formal421N.ttf
      mimetype        : font/ttf
    Stream #0:5: Attachment: none
    Metadata:
      filename        : ARIBLK_0.TTF
      mimetype        : font/ttf
    Stream #0:6: Attachment: none
    Metadata:
      filename        : INSULA__.ttf
      mimetype        : font/ttf
    Stream #0:7: Attachment: none
    Metadata:
      filename        : BOOKOSI.TTF
      mimetype        : font/ttf
    Stream #0:8: Attachment: none
    Metadata:
      filename        : BOOKOSBI.TTF
      mimetype        : font/ttf
    Stream #0:9: Attachment: none
    Metadata:
      filename        : BOOKOSB.TTF
      mimetype        : font/ttf
    Stream #0:10: Attachment: none
    Metadata:
      filename        : H_DEVTBI.TTF
      mimetype        : font/ttf

【问题讨论】:

【参考方案1】:

所以看来我需要制作一个 hardsub 视频,需要刻录字幕。并将音频编码为aac。那么我该如何正确地做到这一点,并使用正确的格式、定位等呢?

使用subtitles filter:

ffmpeg -i input.mkv -vf "subtitles=input.mkv" output.mp4

您可以通过添加-t 选项来进行简短测试,例如-t 60 将输出限制为60 秒。

如果字体没有以正确的字体呈现,那么您可能必须:

    使用-dump_attachment转储所有字体文件:

    ffmpeg -dump_attachment:t "" -i INPUT
    

    然后使用subtitles filter 中的fontsdir 选项,或者将字体安装到您的系统中。

【讨论】:

movenc 自 8 月 25 日起支持 ttml:github.com/FFmpeg/FFmpeg/commit/e41bd075dd 感谢您的详细回答。这些不是我的视频或字幕,我只是从不同的网站下载的。我想将其转换为 mp4 以查看它在我的旧电视上的播放效果。它不支持 mkv 格式但支持 mp4 这就是为什么我想转换它并尽可能保留格式等。还是个初学者。 我可能需要将音频转换为 aac 格式 好的,查看手册后,它应该支持 mkv 文件:视频:H.264 /AVC、XViD、MPEG-4 Part2 音频:HE-AAC、杜比数字、MPEG-1 Layer III (MP3 ) 也支持 .ass 字幕。那么我应该怎么做才能以正确的格式和其他一切播放这个? 哦等等,它说它支持 .ass 和更多的 ass 外部字幕和 XSUB(支持 DivX6 生成的内部字幕)作为内部字幕。唔。我还是想试试,也许会玩得很好。

以上是关于如何让 LG LS3450 电视正确显示字幕?的主要内容,如果未能解决你的问题,请参考以下文章

B&O推出BeoVision Eclipse电视 采用LG OLED面板

中国和韩国电视面板技术对决,LG或成为牺牲者

text 根据电视节目名称重命名字幕文件

三星电视显示series5

IFA 2017:B&O推出LG OLED面板的高端电视BeoVision Eclipse

为啥用软件检测小米电视2的屏幕分辨率只有1920+1080P啊?