Replies: 1 comment
-
Right now, In the meantime, I don't think it's possible to encode subtitles how you're doing that. One hack would be to manually write an "srt" file, although I don't think PyAV could mux a subtitle either. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I need to either entirely demux a subtitle stream from a video container so that I can put it into e.g. an .ass file and it will be valid ass, or transcode a subtitle into a fixed target format like .srt and output that into a valid file.
I thus tried opening a video file and decoding its subtitle stream (ass) and encoding it into a new file with a .srt stream:
Expected behavior
I expected calling container.decode() returning frames.
Actual behavior
When decoding a subtitle stream though, its instead returning SubtitleSet objects, which the stream encoder doesn't know to convert them to actual frames.
Traceback:
Investigation
I tried decoding the subtitle stream itself, like this:
That however crashes the interpreter silently.
I thought about taking the, I suppose, frames, which can be found in SubtitleSet.rects, and simply writing them to a file one by one, but I don't know if that will actually give a correct .ass file in the end.
So is there a way to get either a valid .ass file (demux the ass stream from my container) or, even better, transcode the ass subtitle into a srt one?
Beta Was this translation helpful? Give feedback.
All reactions