자막을 디코딩하는 FFMpeg

자막을 디코딩하는 FFMpeg

150개 이상의 스트림 URL이 있는데, 일부는 608개의 캡션이 있고, 일부는 708개의 캡션이 있고, 일부는 캡션이 없고, 다른 일부는 두 개 이상의 조합이 있고 각각의 변환이 여러 개 있습니다.

목표: FFMpeg에 URL을 입력하고 스트림당 존재하는 캡션 유형을 뱉어내도록 합니다.

다음에서 영화 입력에 네트워크 스트림 URL을 사용할 때 사용 가능한 출력을 얻지 못하는 것 같습니다.

ffmpeg -f lavfi -i movie=input.ts[out+subcc]  -map 0:1  output.srt

산출:

semccart$ ffmpeg -f lavfi -i movie=https://hostname.com/master.m3u8?token [out+subcc]  -map 0:1  output.srt
[5] 16438
[6] 16439
-bash: -map: command not found
[6]   Done                    cdn=sa
bos-mpfnp:~ semccart$ ffmpeg version 3.2.2 Copyright (c) 2000-2016 the FFmpeg developers
  built with Apple LLVM version 8.0.0 (clang-800.0.42.1)
  configuration: --prefix=/opt/local --enable-swscale --enable-avfilter --enable-avresample --enable-libmp3lame --enable-libvorbis --enable-libopus --enable-libtheora --enable-libschroedinger --enable-libopenjpeg --enable-libmodplug --enable-libvpx --enable-libsoxr --enable-libspeex --enable-libass --enable-libbluray --enable-lzma --enable-gnutls --enable-fontconfig --enable-libfreetype --enable-libfribidi --disable-libxcb --disable-libxcb-shm --disable-libxcb-xfixes --disable-indev=jack --disable-outdev=xv --enable-audiotoolbox --enable-sdl2 --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/usr/bin/cc --enable-vda --enable-videotoolbox --arch=x86_64 --enable-yasm --enable-libx265 --enable-gpl --enable-postproc --enable-libx264 --enable-libxvid --enable-nonfree --enable-libfdk-aac
  libavutil      55. 34.100 / 55. 34.100
  libavcodec     57. 64.101 / 57. 64.101
  libavformat    57. 56.100 / 57. 56.100
  libavdevice    57.  1.100 / 57.  1.100
  libavfilter     6. 65.100 /  6. 65.100
  libavresample   3.  1.  0 /  3.  1.  0
  libswscale      4.  2.100 /  4.  2.100
  libswresample   2.  3.100 /  2.  3.100
  libpostproc    54.  1.100 / 54.  1.100

이곳이 바로 걸려 있는 곳입니다. TS 세그먼트도 직접 시도했습니다.

또한 여러 소스 URL을 사용하여 대규모로 이 작업을 수행하려면 어떻게 해야 합니까?

답변1

당신은 본 적이 있나요?스택 오버플로이 질문에 대한 답은?

어떤 사람들은 이 명령을 사용하여 운이 좋았습니다.

ffmpeg -i input.mov -an -vn -c:s copy -f rawvideo -map 0:s sub.txt

TS 파일이 아닌 엔딩 동영상을 사용할 수 있습니다.

관련 정보