-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Converting video subtitles #376
Comments
Hello, I am your assistant on GitHub, built by the Second State team. I am ready for your question now! To convert video subtitles, you can use tools like FFmpeg. FFmpeg is a powerful multimedia framework that can help you manipulate video subtitles. You can use it to extract, add, or convert subtitles in various formats. If you provide more details about what you are trying to accomplish, I can give you more specific guidance. |
How can I convert a video subtitle in the Advanced Substation Alpha format (*.ass or *.ssa) to one of the DVD “VobSub” format, while keeping size, formatting and positioning the same? I would prefer to use free (preferably open-source) command-line software. |
To convert a video subtitle in Advanced Substation Alpha format (*.ass or *.ssa) to the DVD "VobSub" format while maintaining size, formatting, and positioning, you can use the Below is an example command you can use: ffmpeg -i input_video.mkv -vf subtitles=input_subtitle.ass output_video.mkv In this command:
This command uses the Make sure to install ffmpeg on your system before running this command. You can download ffmpeg from the official website or install it through package managers like Homebrew (for macOS) or APT (for Linux). Please let me know if you need any further assistance or if you have any other questions. |
The output video had no subtitles at all |
I apologize for the oversight. To convert subtitles from Advanced Substation Alpha format (*.ass or *.ssa) to the VobSub format, you can use the ffmpeg -i input_video.mkv -vf subtitles=input_subtitle.ass:force_style='FontName=Arial,FontSize=18,PrimaryColour=&HFFFFFF,SecondaryColour=&HFFFFFF,OutlineColour=&H000000,BackColour=&H012345,BorderStyle=3,Outline=2,Shadow=0.5,Alignment=2,MarginV=10' -c:v copy -c:a copy output_video.mkv In this updated command:
This command overlays the input subtitle file onto the video while keeping its original formatting. It also copies the video and audio streams without re-encoding to maintain quality. Please try running this updated command and let me know if you encounter any issues or need further assistance. |
How to do it such that the subtitle customizations are inherited from the Advanced Substation Alpha file? |
To preserve the original subtitle customizations from the Advanced Substation Alpha file (*.ass or *.ssa) when converting to the VobSub format, you can use the ffmpeg -i input_video.mkv -filter_complex "[0:v][0:s] overlay[v]" -map "[v]" -map 0:a -c:v libx264 -c:a copy -y output_video.mkv In this command:
This command uses the Please try running this command and let me know if it successfully preserves the original subtitle customizations from the Advanced Substation Alpha file. Feel free to reach out if you encounter any issues or need further assistance. |
your example doesn’t include the subtitle as one of the input files |
I apologize for the oversight. To properly include the subtitle file as one of the input files in the ffmpeg -i input_video.mkv -i input_subtitle.ass -map 0 -map 1 -c:v copy -c:a copy -c:s dvd_subtitle output_video.mkv In this command:
By including the subtitle file as an input and mapping both the video and subtitle streams, this command should preserve the original formatting and customizations from the Advanced Substation Alpha file when converting to the VobSub format. Please try running this updated command, and let me know if it successfully preserves the original subtitle customizations. Feel free to reach out if you have any further questions or encounter any issues. |
I received the following error message: Error initializing output stream 0:3 -- Subtitle encoding currently only possible from text to text or bitmap to bitmap |
I apologize for the inconvenience. It seems that the error message indicates that subtitle encoding directly from Advanced Substation Alpha (*.ass or *.ssa) to DVD VobSub format using To work around this limitation and achieve the conversion while preserving the original formatting and customizations, you can convert the Advanced Substation Alpha subtitles to SRT format first, and then convert the SRT subtitles to the VobSub format. Here's the revised approach:
ffmpeg -i input_subtitle.ass output_subtitle.srt
ffmpeg -i input_video.mkv -vf subtitles=output_subtitle.srt output_video.mkv In this revised approach:
Please give this method a try, and let me know if you encounter any issues or have any further questions. Thank you for your patience. |
The revised approach has no method for keeping size, formatting and positioning the same. |
To preserve the original styling, positioning, and formatting of the subtitles when converting from Advanced Substation Alpha (*.ass or *.ssa) format to DVD VobSub format using open-source command-line tools, you can use a combination of tools such as Here are the steps to achieve the conversion while keeping the same visual appearance of the subtitles:
mkvextract tracks input_video.mkv 3:subtitles.ass
ffmpeg -i input_video.mkv -i output_subtitle.sup -c:v copy -c:a copy output_video.mkv In this workflow:
Please follow these steps and let me know if you encounter any issues or if you need further assistance. |
there are no releases at the link provided and BDSup2Sub doesn’t take Substation Alpha or Advanced Substation Alpha as inputs |
I apologize for the confusion. Let's take a different approach to convert subtitles from Advanced Substation Alpha (*.ass or *.ssa) format to DVD VobSub format while preserving the original styling, positioning, and formatting. Here's a modified workflow using
ffmpeg -i input_video.mkv -c copy -map 0:s:0 subtitles.ass
ffmpeg -i input_video.mkv -i output_subtitle.idx -vf subtitles=output_subtitle.idx output_video.mkv In this updated approach:
Please follow these steps, and let me know if this approach successfully preserves the original styling, positioning, and formatting of the subtitles. Feel free to reach out if you encounter any difficulties or need further assistance. |
No description provided.
The text was updated successfully, but these errors were encountered: