根据语言代码(eng、spa 等)设置默认字幕语言,而不是流说明符

根据语言代码(eng、spa 等)设置默认字幕语言,而不是流说明符

我批量下载了某个频道的视频,但每个视频的字幕语言不一致。有没有办法使用语言代码(例如 eng、spa、fra 等)而不是基于流说明符/编号来设置默认字幕?


Video1.mp4的英文字幕在Stream#0:5,而Video2.mp4的英文字幕在Stream#0:2。

尝试使用-disposition:s:1 default,Video1.mp4 的默认字幕变成了英语(这是我想要的),但现在 Video2.mp4 的默认字幕变成了西班牙语。


视频1.mp4元数据

Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 626x360, 1231 kb/s, 26.20 fps, 26.17 tbr, 10k tbn, 52.39 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 127 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
    Stream #0:2(und): Video: mjpeg (mp4v / 0x7634706D), yuvj420p(pc, bt470bg/unknown/unknown), 640x368 [SAR 96:96 DAR 40:23], 90k tbn, 90k tbc
    Metadata:
      handler_name    : VideoHandler
    Stream #0:3(und): Video: mjpeg (mp4v / 0x7634706D), yuvj420p(pc, bt470bg/unknown/unknown), 640x368 [SAR 96:96 DAR 40:23], 90k tbn, 90k tbc
    Metadata:
      handler_name    : VideoHandler
    Stream #0:4(deu): Subtitle: mov_text (tx3g / 0x67337874), 0 kb/s (default)
    Metadata:
      handler_name    : SubtitleHandler
    Stream #0:5(eng): Subtitle: mov_text (tx3g / 0x67337874), 0 kb/s
    Metadata:
      handler_name    : SubtitleHandler
    Stream #0:6(spa): Subtitle: mov_text (tx3g / 0x67337874), 0 kb/s
    Metadata:
      handler_name    : SubtitleHandler
    Stream #0:7(spa): Subtitle: mov_text (tx3g / 0x67337874), 0 kb/s
    Metadata:
      handler_name    : SubtitleHandler
    Stream #0:8(fra): Subtitle: mov_text (tx3g / 0x67337874), 0 kb/s
    Metadata:
      handler_name    : SubtitleHandler
    Stream #0:9(ind): Subtitle: mov_text (tx3g / 0x67337874), 0 kb/s
    Metadata:
      handler_name    : SubtitleHandler
    Stream #0:10(ita): Subtitle: mov_text (tx3g / 0x67337874), 0 kb/s
    Metadata:
      handler_name    : SubtitleHandler
    Stream #0:11(por): Subtitle: mov_text (tx3g / 0x67337874), 0 kb/s
    Metadata:
      handler_name    : SubtitleHandler
    Stream #0:12(vie): Subtitle: mov_text (tx3g / 0x67337874), 0 kb/s
    Metadata:
      handler_name    : SubtitleHandler
    Stream #0:13(tur): Subtitle: mov_text (tx3g / 0x67337874), 0 kb/s
    Metadata:
      handler_name    : SubtitleHandler
    Stream #0:14(tha): Subtitle: mov_text (tx3g / 0x67337874), 0 kb/s
    Metadata:
      handler_name    : SubtitleHandler
    Stream #0:15(zho): Subtitle: mov_text (tx3g / 0x67337874), 0 kb/s
    Metadata:
      handler_name    : SubtitleHandler
    Stream #0:16(zho): Subtitle: mov_text (tx3g / 0x67337874), 0 kb/s
    Metadata:
      handler_name    : SubtitleHandler
    Stream #0:17(jpn): Subtitle: mov_text (tx3g / 0x67337874), 0 kb/s
    Metadata:
      handler_name    : SubtitleHandler
    Stream #0:18: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 640x368 [SAR 96:96 DAR 40:23], 90k tbr, 90k tbn, 90k tbc

视频2.mp4元数据

Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1280x720, 1309 kb/s, 29.90 fps, 29.90 tbr, 29899 tbn, 59.80 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 192 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
    Stream #0:2(eng): Subtitle: mov_text (tx3g / 0x67337874), 0 kb/s (default)
    Metadata:
      handler_name    : SubtitleHandler
    Stream #0:3(spa): Subtitle: mov_text (tx3g / 0x67337874), 0 kb/s
    Metadata:
      handler_name    : SubtitleHandler
    Stream #0:4(spa): Subtitle: mov_text (tx3g / 0x67337874), 0 kb/s
    Metadata:
      handler_name    : SubtitleHandler
    Stream #0:5(fra): Subtitle: mov_text (tx3g / 0x67337874), 0 kb/s
    Metadata:
      handler_name    : SubtitleHandler
    Stream #0:6(ind): Subtitle: mov_text (tx3g / 0x67337874), 0 kb/s
    Metadata:
      handler_name    : SubtitleHandler
    Stream #0:7(por): Subtitle: mov_text (tx3g / 0x67337874), 0 kb/s
    Metadata:
      handler_name    : SubtitleHandler
    Stream #0:8(vie): Subtitle: mov_text (tx3g / 0x67337874), 0 kb/s
    Metadata:
      handler_name    : SubtitleHandler
    Stream #0:9(eng): Subtitle: mov_text (tx3g / 0x67337874), 0 kb/s
    Metadata:
      handler_name    : SubtitleHandler
    Stream #0:10(zho): Subtitle: mov_text (tx3g / 0x67337874), 0 kb/s
    Metadata:
      handler_name    : SubtitleHandler
    Stream #0:11(kor): Subtitle: mov_text (tx3g / 0x67337874), 0 kb/s
    Metadata:
      handler_name    : SubtitleHandler
    Stream #0:12: Video: png, rgb24(pc), 1334x750, 90k tbr, 90k tbn, 90k tbc

希望您能帮助我。谢谢!

相关内容