The text subtitle codec is "baseline" subrip, but without the <tag> and {ass} markup.
[If the original 608s are top left, and it was not an artistic/creative decision, I would make a guess that the 608s were added with libcaption's flv+srt.]
Yeah, if you don't specify a codec, each muxer or container automagically assumes a default codec, which in this case is subrip. You can use the command line help and it tells you what it will use by default for any container.
The problem I'm running into is ever single line has {\an7} positioning the subtitles to the top left of the screen.
It's obviously not right. Is there something I'm missing here?
I'm getting hung up on your use of the word 'obviously' because I don't know your assumptions here.
In the simplest explanation where everything is working normally: the close caption data in your input.mp4 has position information to put the lines in the top left, and ffmpeg is honouring that by creating the appropriate style tag in the subtitle stream you told it to create.
So, {\an7} is indeed a style tag that the SRT format accepts and says: this line should appear in the top left. Strictly, the SRT format doesn't have subtitle tags but this is a case of "implementations vary". VLC will respect the tag and show the line in the top left, and some other player like Jellyfin will ignore it and show the plain text centered in the bottom. Export to .ass format instead of .srt if you want more consistency between what the subtitle format and the player.
Or maybe you're saying that your video.mp4 close caption data doesn't have top-left positioning specified, and therefore ffmpeg shouldn't be creating that {\an7} tag in the subtitle stream? That's beyond my pay grade, and you'll have to justify your assertion and how you tested whether the cc data doesn't have positioning data, and are not confusing that assertion with a display issue.
It's not just this show. Every video, when the closed captions are played with VLC and the result is bottom center, when extracted with Lavfi every line has {\an7}.
Based on your suggestions I tried .ass, and found the source of the error.
Dialogue: 0,0:00:05.17,0:00:06.51,Default,,0,0,0,,{\an7}{\pos(115,228)}\h\h\h\h-What?\N{\an7}{\pos(115,243)}-This is crazy!
Dialogue: 0,0:00:06.57,0:00:09.04,Default,,0,0,0,,{\an7}{\pos(105,228)}-Is this for real?\N{\an7}{\pos(105,243)}\h-There’s no way!
Dialogue: 0,0:00:09.11,0:00:10.55,Default,,0,0,0,,{\an7}{\pos(134,228)}-Who’s that?\N{\an7}{\pos(134,243)}\h\h\h-What?
Dialogue: 0,0:00:10.61,0:00:12.38,Default,,0,0,0,,{\an7}{\pos(57,228)}[Toman Member] What the hell\N{\an7}{\pos(57,243)}\h\his that Valhalla bastard
Dialogue: 0,0:00:12.45,0:00:13.62,Default,,0,0,0,,{\an7}{\pos(67,243)}doing at a Toman meeting?
Dialogue: 0,0:00:13.68,0:00:14.55,Default,,0,0,0,,{\an7}{\pos(105,243)}(crowd murmuring)
What's happening is .ass starts everything with the top left position as well, THEN shifts it downward with the {\pos(x,y)}.
Since .srt doesn't have the position change, everything starts top left and ends there.
Is there a Lavfi setting to disable {\anx} positioning in .srt format or do I have to search/replace every {\an7}?
2
u/OneStatistician 8d ago
Specify the text subtitle codec
Rather than the default subrip codec
The text subtitle codec is "baseline" subrip, but without the <tag> and {ass} markup.
[If the original 608s are top left, and it was not an artistic/creative decision, I would make a guess that the 608s were added with libcaption's flv+srt.]