1
encode part of a file and at the same time add the subtitles for that part. I am using:
ffmpeg -ss 00:02:00 -t 00:00:30 -i "path/to/input" -c:v libvpx -crf 5 -b:v 3M -c:a libvorbis -vf "ass=path/ass" "output.webm"
it shows that it loads the subtitles but in the output they don't exist (subtitle:0kB). As far as I could tell the subtitles part doesn't work with -ss ? (Or it ignores -ss and tries to add the whole subs beginning with 00:00:00 of the .ass on 00:02:00 of the video stream).
Only way I could do it was to re-encode the whole file and then use:
ffmpeg -ss 00:02:00 -i "output.webm" -t 00:00:30 -c:v copy -c:a copy "new_output.webm"
to keep what I wanted. Am I missing something or it's just not possible to do what i want all in one?
Hope what I wrote made some sense and thx.
Output #0, webm, to 'target/test.webm':
Metadata:
encoder : Lavf55.37.101
Stream #0:0: Video: vp8 (libvpx), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 2500 kb/s, 1k tbn, 23.81 tbc (default) (forced)
Stream #0:1: Audio: vorbis (libvorbis), 44100 Hz, stereo, fltp (default) (forced)
Stream mapping:
Stream #0:0 -> #0:0 (h264 -> libvpx)
Stream #0:1 -> #0:1 (aac -> libvorbis)
Press [q] to stop, [?] for help
frame= 953 fps= 22 q=0.0 Lsize= 6990kB time=00:00:40.02 bitrate=1430.6kbits/s dup=0 drop=5
video:6499kB audio:464kB subtitle:0kB other streams:0kB global headers:4kB muxing overhead: 0.376779%
Pretty sure that it's taking the subtitles from 00:00:00. Maybe it works if you put the
-ss
option after-i
. Also note that-t
should always go as an output option, i.e. after-i
as well. Can you include the full uncut ffmpeg command line output for the first command as well for us? Note that code formatting is applied by indenting text by 4 spaces or selecting it and pressing Ctrl-K. – slhck – 2014-06-28T15:12:33.657Putting -ss with -t after the -i worked! It's heavier (I think because it's more precise right?) and it takes some pre processing but works fine! Thank you. – Loke – 2014-06-28T17:01:40.180