Announcement: Our new CyberLink Feedback Forum has arrived! Please transfer to our new forum to provide your feedback or to start a new discussion. The content on this CyberLink Community forum is now read only, but will continue to be available as a user resource. Thanks!
CyberLink Community Forum
where the experts meet
| Advanced Search >
'Adding timestamp subtitles to a project'
Chrisclocks [Avatar]
Newbie Location: UK Joined: Jun 03, 2011 08:02 Messages: 5 Offline
[Post New]
HI.
I have a friend's camera clips in a new project, about 100 clips of HD video which produce a 12GB mp4 file. It would help my friend if the 'date modified' (it contains the date and time of recording) from each clip could appear as a title (or whatever) in the produced output so that the scenes cvould be identified and real titles added later.

I've done the start of each day manually but some automation would be a lot better.

Thanks for any help,
Chris

This message was edited 1 time. Last update was at Jan 14. 2019 08:08

optodata
Senior Contributor Location: California, USA Joined: Sep 16, 2011 16:04 Messages: 8630 Offline
[Post New]
Someone else asked about that here recently, but it's not something that PD can do - at least not that I'm aware of. The only solutions seem to be paid software like DVMP or Aunsoft or VideoHelp.

YouTube/optodata


DS365 | Win11 Pro | Ryzen 9 3950X | RTX 4070 Ti | 32GB RAM | 10TB SSDs | 5K+4K HDR monitors

Canon Vixia GX10 (4K 60p) | HF G30 (HD 60p) | Yi Action+ 4K | 360Fly 4K 360°
Chrisclocks [Avatar]
Newbie Location: UK Joined: Jun 03, 2011 08:02 Messages: 5 Offline
[Post New]
Quote Someone else asked about that here recently, but it's not something that PD can do - at least not that I'm aware of. The only solutions seem to be paid software like DVMP or Aunsoft or VideoHelp.


Thanks for that.

Via VideoHelp I found 'TimeDateSRTCreator' which will work with individual video files or a whole directory. Initially I tried processing a directory and a file was produced which had subtitles at one second intervals. The file imported successfully but I found that it was shorter than the related video, video 33 mins subtitles 29 mins. Checking further showed that some clips from the Sony camera resulted in too few time stamps, a 12 second clip but only 7 seconds worth of subtitles. The same happened if the single video file was processed on its own.

Is there any way of splitting a subtitle file so that the time stamps can be re-aligned with the video?

I know that I can trim, shorten, the video clips to put things back in line and for the purpose of identifying the clips this would do but I'd prefer to split the subtitles.

Thanks again
Chris
JL_JL [Avatar]
Senior Contributor Location: Arizona, USA Joined: Oct 01, 2006 20:01 Messages: 6091 Offline
[Post New]
This thread may offer another option: https://forum.cyberlink.com/forum/posts/list/52485.page#post_box_274726

It's worked fine for my needs. Your one second intervals as I mentioned there appears to be somewhat manufacturer related. I simply parse subtitle file if too fine in time.

Jeff
optodata
Senior Contributor Location: California, USA Joined: Sep 16, 2011 16:04 Messages: 8630 Offline
[Post New]
Quote Is there any way of splitting a subtitle file so that the time stamps can be re-aligned with the video?

I know that I can trim, shorten, the video clips to put things back in line and for the purpose of identifying the clips this would do but I'd prefer to split the subtitles.

Thanks again
Chris

If you open up the SRT file in Notepad or any text editor, you'll see that the timecodes are absolute, meaning each label already has a fixed place on the timeline. In this screenshot, the specific frames where each title is to be displayed are shown on the second line of each subtitle:



So, no, you can't "trim" the middle of the file to shorten it (or "add" a section that you copied from another part of the file, either). With a "trim" you'd only remove the titles from that section of the file. Then after importing it into PD, you'd simply have a gap on the timeline with the ending subtitles still in the exact same places.

What you'd need to do is go in and add the missing subtitles for each clip, since your software seems to have ended the task prematurely. You can also try a different program, like the "avchd2srt" program that JL_JL linked to. As you can see here, it correctly generated all of the 1-second subtitles for my 3:44 test clip:



However, be forewarned while that works well once it's installed, it's a real PITA getting there unless you're familiar with and know how to work with arcane technical details, poor documentation and missing links to critical files.

Also, the actual name of the program is wrong! Even with everything installed properly, typing exactly what the instructions tell you to, that is avchd2srt filename.mts doesn't work, because the actual name of the file (shown nowhere in any of the docs I saw) is avchd2srt-core.exe, so the magic words are avchd2srt-core filename.mts.

EDIT: Here is a screenshot of the command window on my machine:



Clearly there are differences between what I see and what Jeff sees, which is why I wanted to put up the notice that this isn't a simple "one-click and you're all set" kind of installation.

As long as you can get to this point, a simple command line and a wildcard or two will get you all the subtitles you want

This message was edited 1 time. Last update was at Jan 11. 2019 19:23



YouTube/optodata


DS365 | Win11 Pro | Ryzen 9 3950X | RTX 4070 Ti | 32GB RAM | 10TB SSDs | 5K+4K HDR monitors

Canon Vixia GX10 (4K 60p) | HF G30 (HD 60p) | Yi Action+ 4K | 360Fly 4K 360°
JL_JL [Avatar]
Senior Contributor Location: Arizona, USA Joined: Oct 01, 2006 20:01 Messages: 6091 Offline
[Post New]
Quote However, be forewarned while that works well once it's installed, it's a real PITA getting there unless you're familiar with and know how to work with arcane technical details, poor documentation and missing links to critical files.

Also, the actual name of the program is wrong! Even with everything installed properly, typing exactly what the instructions tell you to, that is avchd2srt filename.mts doesn't work, because the actual name of the file (shown nowhere in any of the docs I saw) is avchd2srt-core.exe, so the magic words are avchd2srt-core filename.mts

A few basic steps, I guess not for everyone. It runs off a very basic cmd script. So with no input it tells you what to do as below:

E:\junk\Idiotsatwork>avchd2srt.cmd
Usage: avchd2srt.cmd videofilename [videofilenames]
NB: no paths, only files, wildcards allowed
E:\junk\Idiotsatwork>

So something as basic as this simple command creates srt file for every .mts file.
E:\junk\Idiotsatwork>avchd2srt.cmd *.mts
Processing file 00000.MTS:
.srt: creating basic subtitles
.log: information on video and processing
.srt: adding addresses via google maps
Processing file 00001.MTS:
.srt: creating basic subtitles
.log: information on video and processing
.srt: adding addresses via google maps
Processing file 00002.MTS:
.srt: creating basic subtitles
.log: information on video and processing
.srt: adding addresses via google maps
Processing file 00003.MTS:
.srt: creating basic subtitles
.log: information on video and processing
.srt: adding addresses via google maps
Processing file 00004.MTS:
.srt: creating basic subtitles
.log: information on video and processing
.srt: adding addresses via google maps

I simply then have a srt for every video file.

Jeff

Edit: attaching the readme.html file that was part of the avchd2srt download as it provides the links to these missing files and fairly complete instructions and usage if any would be interested
 Filename
Readme.html
[Disk]
 Description
 Filesize
12 Kbytes
 Downloaded:
154 time(s)

This message was edited 1 time. Last update was at Jan 11. 2019 19:32

optodata
Senior Contributor Location: California, USA Joined: Sep 16, 2011 16:04 Messages: 8630 Offline
[Post New]
Quote Edit: attaching the readme.html file that was part of the avchd2srt download as it provides the links to these missing files and fairly complete instructions and usage if any would be interested

Thanks, Jeff.

That's the document I worked with as well, and if anyone were to click on the link for WGET for Windows near the bottom, they'd find that the webpage is non-existant - hence my original reference to "missing links."

After more searching and digging through various fourms, I located a source here. I chose the 32-bit version of v1.20, and I assume that any other interested people would benefit from a working link to it, along with my other notes above.

YouTube/optodata


DS365 | Win11 Pro | Ryzen 9 3950X | RTX 4070 Ti | 32GB RAM | 10TB SSDs | 5K+4K HDR monitors

Canon Vixia GX10 (4K 60p) | HF G30 (HD 60p) | Yi Action+ 4K | 360Fly 4K 360°
Chrisclocks [Avatar]
Newbie Location: UK Joined: Jun 03, 2011 08:02 Messages: 5 Offline
[Post New]
Quote

Thanks, Jeff.

That's the document I worked with as well, and if anyone were to click on the link for WGET for Windows near the bottom, they'd find that the webpage is non-existant - hence my original reference to "missing links."

After more searching and digging through various fourms, I located a source here. I chose the 32-bit version of v1.20, and I assume that any other interested people would benefit from a working link to it, along with my other notes above.



Again, very many thanks to you both for all this.

I obtained avchd2srt-core and copied to the folder where my video files exist. I didn't bother with 'awk' and 'wget' but just used a couple of command lines.

for /f %f in ('dir /b *.mts') do avchd2srt-core %f to produce the *.srt files.

These files have the correct number of entries but all the times start at zero for each file.

After a considerable amount of time I found the freeware program SubtitleWorkshop which has a tool within it which will combine subtitle files 'Join subtitles'. If the box is ticked it will also adjust the start and end times of each sub title. I tried it with five files and the result fitted the equivalent video clips in the timeline perfectly.


Just a bit of background. I spent 30+ years in commercial computing starting when paper tape was still in use. During this time I wrote code in ever so many languages from machine code to c++, designed systems and databases then ended up leading our technical support team.

Chris

This message was edited 2 times. Last update was at Jan 12. 2019 11:38

JL_JL [Avatar]
Senior Contributor Location: Arizona, USA Joined: Oct 01, 2006 20:01 Messages: 6091 Offline
[Post New]
Quote Now all I need to do is make the start and end times continuous through the whole file and not restart from zero with each new clip, not sure of the best way to do this

As I mentioned in the other thread,
"It even works fine if several source camera clips are muxed together with like tsMuxeR.exe or similar. One then gets the proper date/time when each time slice was recorded. "

Since you are working with transport stream (mts) files this will work fine. You will get one srt file in this case with continuous timecode srt placement for the entire muxed stream. Just use the muxed video stream in PD too.

Jeff
Chrisclocks [Avatar]
Newbie Location: UK Joined: Jun 03, 2011 08:02 Messages: 5 Offline
[Post New]
Quote

As I mentioned in the other thread,
"It even works fine if several source camera clips are muxed together with like tsMuxeR.exe or similar. One then gets the proper date/time when each time slice was recorded. "

Since you are working with transport stream (mts) files this will work fine. You will get one srt file in this case with continuous timecode srt placement for the entire muxed stream. Just use the muxed video stream in PD too.

Jeff



I must have edited my post after you replied but before I saw your reply. I used the 'join' tool in 'SubtitleWorkshop' to join the '.srt' files together.

Some information and timings from the project in question:

Input of 40 HD Video files 1920 x 1080/25p with total duration 34 minutes.
Combined subtitles file has 2034 entries.

11:03:00 Import started
11:08:30 Import complete
11:10:00 Subtitle track appears

Produce HD output in 00:35:40, filesize 3.8GB

dxdiag info:
Operating System: Windows 10 Pro 64-bit (10.0, Build 17134) (17134.rs4_release.180410-1804)
Language: English (Regional Setting: English)
System Manufacturer: To Be Filled By O.E.M.
System Model: To Be Filled By O.E.M.
BIOS: BIOS Date: 07/23/15 21:33:02 Ver: 04.06.05 (type: BIOS)
Processor: Intel(R) Core(TM) i5-4590 CPU @ 3.30GHz (4 CPUs), ~3.3GHz
Memory: 8192MB RAM
Available OS Memory: 7868MB RAM
Page File: 3172MB used, 12631MB available
Windows Dir: C:\WINDOWS
DirectX Version: DirectX 12
DX Setup Parameters: Not found
User DPI Setting: 96 DPI (100 percent)
System DPI Setting: 96 DPI (100 percent)
DWM DPI Scaling: Disabled
Miracast: Available, with HDCP
Microsoft Graphics Hybrid: Not Supported
DxDiag Version: 10.00.17134.0001 64bit Unicode

This thread would be more sensibly called 'Adding timestamp subtitles to a project' can this be changed?

Thanks again
Chris
PowerDirector Moderator [Avatar]
Senior Contributor Location: New Taipei City, Taiwan Joined: Oct 18, 2016 00:25 Messages: 2104 Offline
[Post New]
Quote

...............This thread would be more sensibly called 'Adding timestamp subtitles to a project' can this be changed?............



Hi,

As the original poster, you can edit your post and change the topic header.

In this case, as I'm in my formatting and editing process, I've just done it for you!!

Cheers
PowerDirector Moderator


For customer support related issues, please contact:
- Customer service: https://membership.cyberlink.com/support/customer-services.do
- Technical support: https://membership.cyberlink.com/support/service/technical-support.do
Chrisclocks [Avatar]
Newbie Location: UK Joined: Jun 03, 2011 08:02 Messages: 5 Offline
[Post New]
Quote


Hi,

As the original poster, you can edit your post and change the topic header.

In this case, as I'm in my formatting and editing process, I've just done it for you!!

Cheers
PowerDirector Moderator




Thank you, most kind.
Powered by JForum 2.1.8 © JForum Team