2013-09-06 3 views
1

자막 스트림이 3 개인 AVI 파일 (mpeg4 비디오)이 있습니다. 변환에 대한 약간의 수정을 위해 SRT/txt로 두 번째 스트림을 추출해야합니다. 나는 현재 우분투 컴퓨터에있다.AVI에서 자막 스트림 추출

avconv를 사용해 보았지만 오류가 발생했습니다. 여기

Stream #0.0: Video: mpeg4 (Advanced Simple Profile), yuv420p ... 
Stream #0.1: Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s 
Stream #0.2: Subtitle: srt 
Stream #0.3: Subtitle: srt 
Stream #0.4: Subtitle: srt 

내가 처음 시도 명령은 다음과 같습니다 : 여기에 'avconv -i'의 결과는 'avconv -i video.avi -map 0 : 3 subs.srt'

이 내게 준 오류 : '출력 스트림 # 0에 대한 인코더 (코덱 id 0)을 찾을 수 없습니다.'

어떤 도움이 필요합니까? 이것이 단순한 문제인 것처럼 보이는다면 용서해주십시오.

답변

0

avconv은 원래 ffmpeg의 분기점이며 종종 기능이 적습니다. 내 우분투 13.04에

나는 터미널에서이 정보를 얻을 (문제 없습니다) :

$ avconv -version 
avconv version 0.8.9-6:0.8.9-0ubuntu0.13.04.1, Copyright (c) 2000-2013 the Libav developers 
    built on Nov 9 2013 19:09:48 with gcc 4.7.3 
avconv 0.8.9-6:0.8.9-0ubuntu0.13.04.1 

당신은 avconv -codecs와 출력 파일에 데이터가 avconv에 알고 인코딩의 코덱을 나열 할 수 있습니다. 그것은 긴 목록입니다. 우리가 그 라인을 grep을 할 수 있습니다 (S) (E)를 인코딩 및 자막을 아래로 필터링하려면 :

$ avconv -codecs |grep ES 
avconv version 0.8.9-6:0.8.9-0ubuntu0.13.04.1, Copyright (c) 2000-2013 the Libav developers 
    built on Nov 9 2013 19:09:48 with gcc 4.7.3 
DES ass    Advanced SubStation Alpha subtitle 
DES dvbsub   DVB subtitles 
DES dvdsub   DVD subtitles 
DES xsub   DivX subtitles (XSUB) 

당신이 srt에 대한 항목이 없습니다 볼 수 있듯이. 파머.

최신 ffmpeg가 있습니다

$ ~/bin/ffmpeg -codecs |grep ES 
ffmpeg version N-60596-gabe3f79 Copyright (c) 2000-2014 the FFmpeg developers 
    built on Feb 14 2014 05:31:07 with gcc 4.6 (Debian 4.6.3-1) 
    configuration: --prefix=/root/ffmpeg-static/64bit --extra-cflags='-I/root/ffmpeg-static/64bit/include -static' --extra-ldflags='-L/root/ffmpeg-static/64bit/lib -static' --extra-libs='-lxml2 -lexpat -lfreetype' --enable-static --disable-shared --disable-ffserver --disable-doc --enable-bzlib --enable-zlib --enable-postproc --enable-runtime-cpudetect --enable-libx264 --enable-gpl --enable-libtheora --enable-libvorbis --enable-libmp3lame --enable-gray --enable-libass --enable-libfreetype --enable-libopenjpeg --enable-libspeex --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-version3 --enable-libvpx 
    libavutil  52. 63.101/52. 63.101 
    libavcodec  55. 52.101/55. 52.101 
    libavformat 55. 32.101/55. 32.101 
    libavdevice 55. 9.100/55. 9.100 
    libavfilter  4. 1.102/4. 1.102 
    libswscale  2. 5.101/2. 5.101 
    libswresample 0. 17.104/0. 17.104 
    libpostproc 52. 3.100/52. 3.100 
DES... ass     ASS (Advanced SSA) subtitle 
DES... dvb_subtitle   DVB subtitles (decoders: dvbsub) (encoders: dvbsub) 
DES... dvd_subtitle   DVD subtitles (decoders: dvdsub) (encoders: dvdsub) 
DES... mov_text    MOV text 
DES... srt     SubRip subtitle with embedded timing 
DES... ssa     SSA (SubStation Alpha) subtitle 
DES... subrip    SubRip subtitle 
DES... xsub     XSUB 

을 그래서 당신은 ffmpeg 합리적으로 전류를 사용하는 경우, 당신은 아마 당신이 이미 사용 명령 줄 작업을해야합니다. 두 도구 모두 동일한 코드 기반을 사용하기 때문에 대부분의 명령 행 옵션은 동일하게 작동합니다.

my answer here 및 단락 ffmpeg setup에서 다운로드 위치를 확인하십시오. 매우 쉽게 할 수 있으며 루트가 될 필요조차 없습니다.