Bug 433193 - Kdenlive SRT Subtitles stored as H:MM:SS,FFF instead of HH:MM:SS,FFF
Summary: Kdenlive SRT Subtitles stored as H:MM:SS,FFF instead of HH:MM:SS,FFF
Status: RESOLVED FIXED
Alias: None
Product: kdenlive
Classification: Applications
Component: Effects & Transitions (show other bugs)
Version: 20.12.2
Platform: Appimage Linux
: NOR minor
Target Milestone: ---
Assignee: Vincent PINON
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-18 18:59 UTC by A Quinn
Modified: 2021-03-04 12:23 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
fritzibaby: Brainstorm+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description A Quinn 2021-02-18 18:59:42 UTC
SUMMARY
The SRT files produced either during the edit, or upon Project>Subtitles>Export Subtitle are storing the timecodes in H:MM:SS,FFF instead of HH:MM:SS,FFF. It's missing the leading zero.

For example:

1
0:00:12,840 --> 0:00:14,040
Hello everyone,

Should be:

1
00:00:12,840 --> 00:00:14,040
Hello everyone,

This can cause issues with "incorrect encoding" when importing these subtitles into other software (for example KDE Subtitle Composer https://subtitlecomposer.kde.org/)


STEPS TO REPRODUCE
1. Type a subtitle into the timeline of a project
2. Either look at the autogenerated SRT or export subtitle from Kdenlive
3. Compare the file to another SRT, or import it into other software

OBSERVED RESULT
Format is 0:00:00,000 (H:MM:SS,FFF)
"Could not parse the subtitle file.
This may have been caused by usage of the wrong encoding."

EXPECTED RESULT
Format is 00:00:00,000 (HH:MM:SS,FFF)
It is imported successfully into other programs

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Ubuntu 18.04.4 LTS
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Converting the Kdenlive SRT (to SRT) with an online converter adds the leading 0s, which allows it to be imported/re-edited by other software.
Comment 1 Bug Janitor Service 2021-02-25 11:46:05 UTC
A possibly relevant merge request was started @ https://invent.kde.org/multimedia/kdenlive/-/merge_requests/186
Comment 2 Jean-Baptiste Mardelle 2021-03-04 12:23:29 UTC
Git commit b9c8ce82373af1e625941d4598eb1dab76e39747 by Jean-Baptiste Mardelle, on behalf of Jan Paul Batrina.
Committed on 04/03/2021 at 11:00.
Pushed by mardelle into branch 'master'.

Use two digits for hours in SRT timecodes

M  +2    -2    src/bin/model/subtitlemodel.cpp

https://invent.kde.org/multimedia/kdenlive/commit/b9c8ce82373af1e625941d4598eb1dab76e39747