Skip to content
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

Subtitle viewing/editing #250

Open
2 of 8 tasks
mifi opened this issue Feb 16, 2020 · 15 comments
Open
2 of 8 tasks

Subtitle viewing/editing #250

mifi opened this issue Feb 16, 2020 · 15 comments

Comments

@mifi
Copy link
Owner

mifi commented Feb 16, 2020

suggested function. We could overlay subtitles on the video, and possibly allow editing them
Could use https://github.com/gsantiago/subtitle.js

@mifi mifi changed the title Subtitle editing Subtitle viewing/editing Feb 28, 2020
@mifi
Copy link
Owner Author

mifi commented Apr 18, 2020

@gtknowledgeshare
Copy link

I was looking for "Transcript" support especially for Microsoft Stream's VTT files that one can download for auto generated transcripts/subtitles.

Any update on this? Despite lossy this would be huge step forward for hearing disabilities where burning in the transcript/subtitles to host on a site/player that doesn't support displaying them via codec/video file (or for convenience).

@mifi
Copy link
Owner Author

mifi commented Jul 23, 2021

Can vtt be converted to srt and vice versa using ffmpeg? If so, then I believe it would be just another subtitle format that would automatically be supported if we add support for subtitle editing in losslesscut.

@gtknowledgeshare
Copy link

gtknowledgeshare commented Jul 23, 2021

Yes VTT can be converted to SRT like https://subtitletools.com/convert-to-srt-online and sure editing them to correct mistakes or timing could be beneficial for subtitles in general I guess.

But I'm referring to burning them into the video visually itself, even if that means lossy it would make the process so much easier than using a video editing program to place subtitles over the video and re-encode.
I haven't found any other app that does this.

Btw. I just tried dragging in both .srt and .mp4 and when selecting first the mp4 and then srt to drag it in then the .srt is on the top position which causes the merged output to be saved as .srt instead of ,mp4

This may need some logic to always save it in the existing video format i.e. .mp4

Anyway I didn't manage to merge the subtiles, despite clicking "include all tracks"

@mifi mifi mentioned this issue Jul 23, 2021
22 tasks
@mifi
Copy link
Owner Author

mifi commented Jul 23, 2021

Ah, you want to burn in subtlties. you're right, that is not a lossless operation, and will need a total re-encode of the video. I know this can be done with ffmpeg. I find it odd if there is no GUI programs for doing this though. I will add it to the list of lossy operations feature requests here: #372

Btw. I just tried dragging in both .srt and .mp4 and when selecting first the mp4 and then srt to drag it in then the .srt is on the top position which causes the merged output to be saved as .srt instead of ,mp4

Sorry it's a bit confusing. merging actually means time-domain, so it's like a concat, which can obviously not be done with a subtitle and a video. In order to add a subtitle track to an existing mp4, you first drag drop ONLY the mp4. then when it's loaded, then drag drop a subtitle.

@gtknowledgeshare
Copy link

gtknowledgeshare commented Jul 23, 2021

Gotcha. Perhaps the logic for dropping in both at once could be improved to handle this i.e. separate tick box to treat subtitles to be loaded into the video (when only two files are dropped in) . =)

I tried it but didn't work. I can open a separate issue but here fyi

Error: Command failed with exit code 1: C:\Users\Markus~1\AppData\Local\Temp\1lgrToPkxih26i5yzUeF1I4J5eW\resources\node_modules\ffmpeg-ffprobe-static\ffmpeg.exe -hide_banner -i C:\Users\markus\Videos\video editing\transcript\Forget the Stigma.mp4 -i C:\Users\markus\Videos\video editing\transcript\[SubtitleTools.com] Forget the Stigma_AutoGeneratedCaption.srt -c copy -map 0:0 -map 0:1 -map 1:0 -map_metadata 0 -movflags +faststart -ignore_unknown -f mp4 -y C:\Users\markus\Videos\video editing\transcript\Forget the Stigma-00.00.00.000-00.01.34.314-seg1.mp4

And here the transcript.zip vtt and converted srt transcript created for the video https://www.youtube.com/watch?v=ClJc3jRsJNE&t=7s

@mifi
Copy link
Owner Author

mifi commented Jul 23, 2021

@gtknowledgeshare I tried to youtube-dl your file as an mkv, then download your zip and add the srt to the mkv as I described above, and for me it works. I think mp4 doesn't support srt, but mkv does. Possibly see also #418

@gtknowledgeshare
Copy link

sorry @mifi should have thought about that lol thanks for checking.

mifi added a commit that referenced this issue Aug 28, 2021
limitation: does not work with 'fastest' preview (due to canvas overlaying the video)
@mifi
Copy link
Owner Author

mifi commented Aug 28, 2021

basic subtitle viewing added:

Screenshot 2021-08-28 at 14 27 35

@taozi1996
Copy link
Contributor

Is it possible to load local subtitle from pc for viewing like youtube cc subtitle?

@mifi
Copy link
Owner Author

mifi commented Aug 29, 2021

Is it possible to load local subtitle from pc for viewing like youtube cc subtitle?

not yet. a workaround is to add the subtitle to a video file, export it, then reload the exported file and view the subtitle

@gjaldb
Copy link

gjaldb commented Jan 15, 2022

Hi, a feature request:

Would it be possible to have an option to include the subtitle overlay on frame grabs?

(and my reason for not just taking a manual screenshot or using other software is the convenient naming of the frame grabs in lossless cut with filename and timestamp)

@mifi
Copy link
Owner Author

mifi commented Jan 16, 2022

It’ possible but it’s not super trivial so I’m not sure it will be implemented unless more people also want that

@erdemdev
Copy link

erdemdev commented May 4, 2023

Is it possible to load local subtitle from pc for viewing like youtube cc subtitle?

I really need this feature so I can ditch VLC player 😄

@tergy22
Copy link

tergy22 commented Mar 12, 2024

Is it possible to load local subtitle from pc for viewing like youtube cc subtitle?

I really need this feature so I can ditch VLC player 😄

Me too, sometime really want to see the subtitle when using LLC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants