0
1
I have a video with MediaInfo:
General
Unique ID : 194272504823943671508252267080776685075 (0x922786003D50C005A20E0EC561081613)
Complete name : input.mkv
Format : Matroska
Format version : Version 4 / Version 2
File size : 92.3 MiB
Duration : 24 min 46 s
Overall bit rate : 521 kb/s
Encoded date : UTC 2014-04-24 19:50:03
Writing application : mkvmerge v6.9.0 ('On Duende') 32bit built on Apr 18 2014 12:49:35
Writing library : libebml v1.3.0 + libmatroska v1.4.1
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High 10@L4
Format settings : CABAC / 16 Ref Frames
Format settings, CABAC : Yes
Format settings, ReFrames : 16 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 24 min 46 s
Width : 720 pixels
Height : 480 pixels
Display aspect ratio : 1.85:1
Frame rate mode : Constant
Frame rate : 30.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 10 bits
Scan type : Progressive
Writing library : x264 core 133 r2334 a3ac64b
Encoding settings : cabac=1 / ref=16 / deblock=1:1:2 / analyse=0x3:0x133 / me=umh / subme=10 / psy=1 / psy_rd=0.40:0.00 / mixed_ref=1 / me_range=24 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=6 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=8 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=24 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=23.0 / qcomp=0.60 / qpmin=0 / qpmax=81 / qpstep=4 / ip_ratio=1.40 / aq=1:0.60
Language : English
Default : Yes
Forced : No
Audio #1
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Codec ID : A_AAC-2
Duration : 24 min 46 s
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 kHz
Frame rate : 46.875 FPS (1024 SPF)
Compression mode : Lossy
Default : No
Forced : No
Audio #2
ID : 3
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Codec ID : A_AAC-2
Duration : 24 min 46 s
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 kHz
Frame rate : 46.875 FPS (1024 SPF)
Compression mode : Lossy
Default : Yes
Forced : No
Text
ID : 4
Format : VobSub
Muxing mode : zlib
Codec ID : S_VOBSUB
Codec ID/Info : Picture based subtitle format used on DVDs
Title : Japanese Audio
Language : English
Default : Yes
Forced : No
I want to remove 1 audio stream and convert VobSub to ass, so I used
!ffmpeg \
-analyzeduration 100M -probesize 100M \
-i 'input.mkv' \
-map 0:0 -map 0:2 -map 0:3 \
-c:v libx265 -preset ultrafast \
-c:a aac -vbr 5 \
-c:s ssa -y \
'output.mkv'
But I am getting error as
ffmpeg version 3.4.6-0ubuntu0.18.04.1 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libavresample 3. 7. 0 / 3. 7. 0
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
Input #0, matroska,webm, from 'input.mkv':
Metadata:
encoder : libebml v1.3.0 + libmatroska v1.4.1
creation_time : 2014-04-24T19:50:03.000000Z
Duration: 00:24:46.03, start: 0.000000, bitrate: 520 kb/s
Stream #0:0(eng): Video: h264 (High 10), yuv420p10le(progressive), 720x480 [SAR 37:30 DAR 37:20], 120 tbr, 1k tbn, 2000000000.00 tbc (default)
Stream #0:1: Audio: aac (LC), 48000 Hz, stereo, fltp
Stream #0:2: Audio: aac (LC), 48000 Hz, stereo, fltp (default)
Stream #0:3(eng): Subtitle: dvd_subtitle, 720x480 (default)
Metadata:
title : Japanese Audio
Codec AVOption vbr (Variable bit rate mode) specified for output file #0 (output.mkv) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> hevc (libx265))
Stream #0:2 -> #0:1 (aac (native) -> aac (native))
Stream #0:3 -> #0:2 (dvd_subtitle (dvdsub) -> ass (ssa))
Press [q] to stop, [?] for help
x265 [info]: HEVC encoder version 2.6
x265 [info]: build info [Linux][GCC 7.2.0][64 bit] 10bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x265 [info]: Main 10 profile, Level-4 (Main tier)
x265 [info]: Thread pool created using 2 threads
x265 [info]: Slices : 1
x265 [info]: frame threads / pool features : 1 / wpp(15 rows)
x265 [warning]: Source height < 720p; disabling lookahead-slices
set_mempolicy: Operation not permitted
set_mempolicy: Operation not permitted
set_mempolicy: Operation not permitted
set_mempolicy: Operation not permitted
set_mempolicy: Operation not permitted
set_mempolicy: Operation not permitted
x265 [info]: Coding QT: max CU size, min CU size : 32 / 16
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge : dia / 57 / 0 / 2
x265 [info]: Keyframe min / max / scenecut / bias: 25 / 250 / 0 / 5.00
x265 [info]: Lookahead / bframes / badapt : 5 / 3 / 0
x265 [info]: b-pyramid / weightp / weightb : 1 / 0 / 0
x265 [info]: References / ref-limit cu / depth : 1 / off / off
x265 [info]: AQ: mode / str / qg-size / cu-tree : 1 / 0.0 / 32 / 1
x265 [info]: Rate Control / qCompress : CRF-28.0 / 0.60
x265 [info]: tools: rd=2 psy-rd=2.00 early-skip rskip tmvp fast-intra
x265 [info]: tools: strong-intra-smoothing deblock
Output #0, matroska, to 'output.mkv':
Metadata:
encoder : Lavf57.83.100
Stream #0:0(eng): Video: hevc (libx265), yuv420p10le, 720x480 [SAR 37:30 DAR 37:20], q=2-31, 120 fps, 1k tbn, 120 tbc (default)
Metadata:
encoder : Lavc57.107.100 libx265
Stream #0:1: Audio: aac (LC) ([255][0][0][0] / 0x00FF), 48000 Hz, stereo, fltp, 128 kb/s (default)
Metadata:
encoder : Lavc57.107.100 aac
Stream #0:2(eng): Subtitle: ass (ssa), 720x480 (default)
Metadata:
title : Japanese Audio
encoder : Lavc57.107.100 ssa
[ssa @ 0x55f536c64500] Only SUBTITLE_ASS type supported.
Subtitle encoding failed
x265 [info]: frame I: 4, Avg QP:34.90 kb/s: 2168.16
x265 [info]: frame P: 246, Avg QP:37.75 kb/s: 737.95
x265 [info]: frame B: 729, Avg QP:39.66 kb/s: 279.17
x265 [info]: consecutive B-frames: 1.2% 0.8% 2.0% 96.0%
encoded 979 frames in 12.11s (80.83 fps), 402.17 kb/s, Avg QP:39.16
[aac @ 0x55f536cb7200] Qavg: 5998.170
[aac @ 0x55f536cb7200] 2 frames left in the queue on closing
Conversion failed!
Please let me know what am I doing wrong.
2VobSub is a "Picture based subtitle format used on DVDs" according to your mediainfo output, but ASS is text based. You would have to perform OCR to convert it. A lazier option could be to find existing ASS or SRT subtitles for this video. – llogan – 2019-06-21T17:12:48.117