Thread with 8 posts
jump to expanded posti can never stop thinking about this scene from nekomonogatari shiro where senjougahara realises hanekawa has no taste
making hardsubbed anime clips with ffmpeg is a huge pain i don't recommend it. it doesn't support seeking properly so it wastes cycles rendering 20 minutes to /dev/null, and the fonts are plain because i didn't extract the files from the mkv. i shouldn't even have to do that.
but for my own future reference:
ffmpeg -i foo.mkv foo.ass
ffmpeg -i foo.mkv -vf ass=foo.ass -pix_fmt yuv420p foo.mp4
ffmpeg -t 2:00 -i clip.mp4 -vcodec copy -acodec copy -sn -map_chapters -1 -map_metadata -1 clip_clean.mp4
got this wonderful reply over on twitter with the magic incantation, quoting here so i won't lose it:
ooh I know this, you can do it in one step, have it read the fonts from the mkv, and seek relatively quickly
ffmpeg -ss -to -copyts -i in.mkv -ss -to -vf "subtitles='in.mkv'" -pix_fmt yuv420p out.mp4
(the nested quotes are loadbearing)
@hikari oh thatβs a good trick. My setup to fix things was to copy the subs to a separate file before clipping.
@hikari oh gods, sudden flashbacks to teen-us fucking around attempting to convert specifically the afk fansub of Lucky Star to, um, ".dpg" using <sketchy Windows GUI wrappers from back in the day for what was almost certainly also ffmpeg>
@hikari oh right, half of the janky tools were probably ffmpeg wrappers while the other half operated via... DirectShow
gods why is "media + computers" a perpetual dumpsterfire? it cannot be *this* difficult to wrangle "lol hi we combined a Fourier-like transform with some entropy coding"
@hikari out of curiosity this made me dig out my old scripts from 2010, when I used to watch anime on my w760i... and it turns out I had been using mencoder (-vf harddup) for the subtitles and encoding (to mpeg4 at the time), but ffmpeg for muxing to mp4, because *neither* of them could do both tasks properly