Skip to content

Instantly share code, notes, and snippets.

@klaxa
Created June 19, 2013 02:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save klaxa/5811286 to your computer and use it in GitHub Desktop.
Save klaxa/5811286 to your computer and use it in GitHub Desktop.
[klaxa@can Uta_no_Prince-sama_[Vyrsalia]]$ for i in *.mkv; do ffmpeg -i "$i" -vf subtitles="$i" -c:a copy -c:v libx264 -crf 20 "hardsub/$i" -loglevel debug -y; done
ffmpeg version N-51025-g286153e Copyright (c) 2000-2013 the FFmpeg developers
built on Mar 16 2013 23:15:00 with gcc 4.4.5 (Debian 4.4.5-8)
configuration: --enable-gpl --enable-nonfree --enable-libass --enable-libfdk-aac --enable-libvorbis --enable-libx264
libavutil 52. 19.101 / 52. 19.101
libavcodec 55. 0.100 / 55. 0.100
libavformat 55. 0.100 / 55. 0.100
libavdevice 55. 0.100 / 55. 0.100
libavfilter 3. 47.102 / 3. 47.102
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100
Splitting the commandline.
Reading option '-i' ... matched as input file with argument '[Vyrsalia] Uta no Prince-sama - 01v3 [720p][FAA4B5D9].mkv'.
Reading option '-vf' ... matched as option 'vf' (set video filters) with argument 'subtitles=[Vyrsalia] Uta no Prince-sama - 01v3 [720p][FAA4B5D9].mkv'.
Reading option '-c:a' ... matched as option 'c' (codec name) with argument 'copy'.
Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'libx264'.
Reading option '-crf' ... matched as AVOption 'crf' with argument '20'.
Reading option 'hardsub/[Vyrsalia] Uta no Prince-sama - 01v3 [720p][FAA4B5D9].mkv' ... matched as output file.
Reading option '-loglevel' ... matched as option 'loglevel' (set libav* logging level) with argument 'debug'.
Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set libav* logging level) with argument debug.
Applying option y (overwrite output files) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input file [Vyrsalia] Uta no Prince-sama - 01v3 [720p][FAA4B5D9].mkv.
Successfully parsed a group of options.
Opening an input file: [Vyrsalia] Uta no Prince-sama - 01v3 [720p][FAA4B5D9].mkv.
[matroska,webm @ 0x1665d60] Format matroska,webm probed with size=2048 and score=100
st:0 removing common factor 1000000 from timebase
st:1 removing common factor 1000000 from timebase
st:2 removing common factor 1000000 from timebase
[matroska,webm @ 0x1665d60] File position before avformat_find_stream_info() is 25438
[h264 @ 0x166d160] Using externally provided dimensions
[h264 @ 0x166d160] no picture
[matroska,webm @ 0x1665d60] All info found
[matroska,webm @ 0x1665d60] File position after avformat_find_stream_info() is 105484
Input #0, matroska,webm, from '[Vyrsalia] Uta no Prince-sama - 01v3 [720p][FAA4B5D9].mkv':
Metadata:
title : Uta no Prince-sama - 01
creation_time : 2011-07-25 03:03:44
Duration: 00:24:31.00, start: 0.000000, bitrate: 2119 kb/s
Chapter #0.0: start 0.000000, end 148.000000
Metadata:
title : Prologue
Chapter #0.1: start 148.000000, end 1362.000000
Metadata:
title : Main
Chapter #0.2: start 1362.000000, end 1464.000000
Metadata:
title : Ending
Chapter #0.3: start 1464.000000, end 1471.000000
Metadata:
title : Preview
Stream #0:0(jpn), 2, 1/1000: Video: h264 (High), yuv420p, 1280x720, 1001/48000, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
Stream #0:1(jpn), 8, 1/1000: Audio: aac, 48000 Hz, stereo, fltp (default)
Stream #0:2(eng), 0, 1/1000: Subtitle: ssa (default)
Codec 0x18000 is not in the full list.
Stream #0:3, 0, 1/90000: Attachment: unknown_codec
Metadata:
filename : Doctor Soos Bold.ttf
mimetype : application/x-truetype-font
Successfully opened the file.
Parsing a group of options: output file hardsub/[Vyrsalia] Uta no Prince-sama - 01v3 [720p][FAA4B5D9].mkv.
Applying option vf (set video filters) with argument subtitles=[Vyrsalia] Uta no Prince-sama - 01v3 [720p][FAA4B5D9].mkv.
Applying option c:a (codec name) with argument copy.
Applying option c:v (codec name) with argument libx264.
Successfully parsed a group of options.
Opening an output file: hardsub/[Vyrsalia] Uta no Prince-sama - 01v3 [720p][FAA4B5D9].mkv.
Successfully opened the file.
[Parsed_subtitles_0 @ 0x169c1c0] No filename provided!
[AVFilterGraph @ 0x1665c20] Error initializing filter 'subtitles' with args ''
Error opening filters!
Statistics: 131072 bytes read, 0 seeks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment