![]() |
#1 |
Human being with feelings
Join Date: Jun 2012
Location: Spain
Posts: 7,470
|
![]() Last edited by heda; 06-09-2022 at 08:42 AM. Reason: added downloads |
![]() |
![]() |
![]() |
#2 |
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 10,672
|
![]()
During the past few months, I tried to optimize the SRT management in REAPER, using regions. That was pretty nice, but I have to admit that subtitles imported has empty item (which we liked to call text items because they are not empty)... that is the best idea on the subject ever.
Why subtitling with empty item ?
Next steps? I will transpose some scripts I wrote for regions / subtitling to make it work with our new worflow. On my do to list:
I'm feel excited ![]() Heda, you're the man! Note: If you want to work 0 based, without cursor offset for import/export, you can use use this script: ReaScript: Move edit cursor to time 0 or to project start
__________________
Free ReaScripts - Premium Scripts - Custom Scripts Dev - Learn ReaScript - XR Theme - Stash Files - ReaLinks - Website - ReaComics - Alien 2347 - Donation |
![]() |
![]() |
![]() |
#3 |
Human being with feelings
Join Date: Jun 2012
Location: Spain
Posts: 7,470
|
![]()
Thank you for your words and for sharing your excitement X-Raym
![]() I hope we can make a video effects processor too, that displays the text from the notes, like Notes Reader does, but integrated in the Video Preview window. ![]() I agree, that using Items is better than Regions. It is easier to edit them, and support multiline. tip: If you don't want to have the note icon in the item visible, double click an item to edit the note. Or use SWS Notes window, to edit selected item note quickly. Maybe I can do the HTML formatting for Notes Reader, which is part of the SRT specifications. Bold – <b> ... </b> or {b} ... {/b} Italic – <i> ... </i> or {i} ... {/i} Underline – <u> ... </u> or {u} ... {/u} Font color – <font color="color name or #code"> ... </font> (as in HTML) |
![]() |
![]() |
![]() |
#4 | |
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 10,672
|
![]() Quote:
![]() HTML formating for note reader would be very nice, indeed!!
__________________
Free ReaScripts - Premium Scripts - Custom Scripts Dev - Learn ReaScript - XR Theme - Stash Files - ReaLinks - Website - ReaComics - Alien 2347 - Donation |
|
![]() |
![]() |
![]() |
#5 |
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 10,672
|
![]()
Idea: Optionnal function (or fork) for the export to srt script, with font-color markup based on item color
![]()
__________________
Free ReaScripts - Premium Scripts - Custom Scripts Dev - Learn ReaScript - XR Theme - Stash Files - ReaLinks - Website - ReaComics - Alien 2347 - Donation |
![]() |
![]() |
![]() |
#6 | |
Human being with feelings
Join Date: Jun 2012
Location: Spain
Posts: 7,470
|
![]() Quote:
Notes Reader for SRT is almost ready ![]() |
|
![]() |
![]() |
![]() |
#7 |
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 10,672
|
![]()
@heda
It could be nice but it will not auto update if item color change. So, another idea: color text in note reader from item color, without coloring the background. I personnaly like the export with font color based on background item, as a separate script, :P Damn, there is so much things to do with these subtitles.
__________________
Free ReaScripts - Premium Scripts - Custom Scripts Dev - Learn ReaScript - XR Theme - Stash Files - ReaLinks - Website - ReaComics - Alien 2347 - Donation |
![]() |
![]() |
![]() |
#8 |
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 10,672
|
![]()
I am trying the export script on Mac OS and it the writting part doesn't work.
I tried to replace \\ by / in the script, and I tried several path type including file:///Users/username or just /Users/username but it doesn't work. Code:
/Users/username/Desktop/HeDa_Export SRT.lua:81: cannot open file 'file:///Users/username/sub.srt' (No such file or directory) It then would be easy to copy paste the result in an empty file and save it. -- I was trying to make the font color part of the script, but I dont. Here is how far I get (but I don't know if it works or no). LINE 99: Code:
-- FONT COLOR, by X_RAYM color_int = reaper.GetMediaItemInfo_Value(item, "I_CUSTOMCOLOR") if color_int > 0 then R = color_int & 255 G = (color_int >> 8) & 255 B = (color_int >> 16) & 255 color_hex = string.format("%02x", R) + string.format("%02x", G) + string.format("%02x", B) ShowConsoleMsg(color_hex)-- debug note = "<font-color:#" .. color_hex .. ">" .. note .. "</font-color>" end
__________________
Free ReaScripts - Premium Scripts - Custom Scripts Dev - Learn ReaScript - XR Theme - Stash Files - ReaLinks - Website - ReaComics - Alien 2347 - Donation |
![]() |
![]() |
![]() |
#9 |
Human being with feelings
Join Date: Jun 2012
Location: Spain
Posts: 7,470
|
![]()
I don't have a mac so I can't test that.
As for the automatic color from item, sometimes you can have multiple lines at the same time when two people speak at the same time for example. And you have one line in one color and the other line in other color. What do you do then? The best would be to do each actor (color) in one track.. then a function that merges all items in one track with multiple lines if needed and colored formatting where needed. But that's too much for now ![]() |
![]() |
![]() |
![]() |
#10 |
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 10,672
|
![]()
@heda
I tested it on a mac for you, that's how I now it doesnt work. Note: it's not my computer. :P Totally right for multiple character dialog item. I can create a fork of my merge text item that handle font color form original items color. That said we more often used font color for more basic things than representig each different characters. It is more used to represent other sounds for non hearing people. All of the dialog subtitles are often pure white, for contrast with picture. That why be your current script to export without color from item background will be the most used ![]() I can create probably create script that add font color from item background for select text items. Edit: I succee to write a file a mac, with a script modification. I will try to improve it.
__________________
Free ReaScripts - Premium Scripts - Custom Scripts Dev - Learn ReaScript - XR Theme - Stash Files - ReaLinks - Website - ReaComics - Alien 2347 - Donation Last edited by X-Raym; 03-04-2015 at 01:50 PM. |
![]() |
![]() |
![]() |
#11 |
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 10,672
|
![]()
I did succeed to write the code on mac!
So, several things can be corrected:
EDIT: I propose you modification via direct editing in github. So you just have to "validate the commit" :P -- I saw a mistake, forget to add 0.3 in changelog, and to put a signature :P
__________________
Free ReaScripts - Premium Scripts - Custom Scripts Dev - Learn ReaScript - XR Theme - Stash Files - ReaLinks - Website - ReaComics - Alien 2347 - Donation Last edited by X-Raym; 03-04-2015 at 03:17 PM. |
![]() |
![]() |
![]() |
#12 |
Human being with feelings
Join Date: Oct 2013
Posts: 77
|
![]()
Just curious.. Do you guys have careers in video editing / post-production?
These scripts are great and i plan to incorporate them. |
![]() |
![]() |
![]() |
#13 | |
Human being with feelings
Join Date: Jun 2012
Location: Spain
Posts: 7,470
|
![]() Quote:
![]() I do video fx/production/editing for music videos, among other things I'm happy to hear that you will be using them. A lot of subtitling scripts are coming, right X-Raym? ![]() |
|
![]() |
![]() |
![]() |
#14 |
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 10,672
|
![]()
@heda
Oh yes! The subtitles scripts release night is coming! Btw, a new fork proposition! ![]() Code:
* Change log: * v0.4 (2015-03-05), by X-Raym + contextual os-based separator + negative timing fix + no item selected => export track all items as SRT, starting from time 0 in the project * v0.3 (2015-03-04), by X-Raym + default folder based on OS + user area Oh yes, I have a really deep background on video, especially with Premiere Pro, After Effects, Photoshop, Illustrator and DaVinci resolve :P I used the first three since 10 years, and I made my studies in multimedia ![]() ![]()
__________________
Free ReaScripts - Premium Scripts - Custom Scripts Dev - Learn ReaScript - XR Theme - Stash Files - ReaLinks - Website - ReaComics - Alien 2347 - Donation |
![]() |
![]() |
![]() |
#15 |
Human being with feelings
Join Date: Oct 2013
Posts: 77
|
![]()
You sound like quite the expert
![]() I was mostly wondering if you guys were getting paid to subtitle videos online, and that's why you were making these workflows. Haha I'm skeptical, but I think if you can do it fast enough, some (minor) profits could be made. They're pay rate is low so some form of beating the system would be necessary. That's where Reaper comes in. |
![]() |
![]() |
![]() |
#16 |
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 10,672
|
![]()
@Samelot
Thank you a lot ![]() I'm not paid for subtitlting, when I do it, it is more for help things I like or for y personnal work. But I think that subtitling and translation is very important. --- Annoucement: Thanks to Heda, I'm now in charge of the SRT exporter script. And I have lot of new things for you guys! In one word: Multitracks subtitling is born! ![]() Code:
* Change log: * v0.6 (2015-03-06), by X-Raym + Multitrack export support -> every selected track can would be exported + Selected items on non selected track will also be exported + If no track selected, selected items notes can be exported anyway + Better track and item selection restoration * v0.5 (2015-03-05), by X-Raym # default name is track name - thanks to spk77 for split at comma # default folder is project folder # if empty fields, back to default values * v0.4 (2015-03-05), by X-Raym # contextual os-based separator + negative first (selected) item pos fix (consider first (selected) item start as time = 0 if cursor pos is after) + no item selected => export all items on first selected track as subtitles + item selected => export only selected items as subtitles
I renamed the file with a less generic name, so you can easily distinguish this way to export SRT than any other, which whould be based on custom actions for exemple. Download here: My REAPER Scripts / ExtremRaym Click and download an browse for: Text Items and Item Notes\Subtitles Cheers And many thanks Heda for the hard work he put in it! This is the man who made it possible!
__________________
Free ReaScripts - Premium Scripts - Custom Scripts Dev - Learn ReaScript - XR Theme - Stash Files - ReaLinks - Website - ReaComics - Alien 2347 - Donation Last edited by X-Raym; 03-07-2015 at 09:26 AM. |
![]() |
![]() |
![]() |
#17 |
Human being with feelings
Join Date: Jun 2006
Posts: 22,701
|
![]()
I plan on trying to do some subtitling for some jobs as an added value feature.
if this yields some profit, as my videos have in the past, I want to donate. Where would I donate to? |
![]() |
![]() |
![]() |
#18 |
Human being with feelings
Join Date: Jun 2006
Posts: 22,701
|
![]()
so is X-raym's version of this the most updated one?
thanks to both of you! |
![]() |
![]() |
![]() |
#19 |
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 10,672
|
![]()
@Jason
This would be very kind of you! Really ![]() This is the new page which gave access to all my scripts. It leads to my dropbox account, so you will be able to browser folers and downlads scripts (or folders) individually. My GitHub account is now reserved for developpement. I put a donation button on it. It is pretty raw for the moment, but it works. For donate to Heda, I think he will give you all necessary infos ![]() I will add screenshots and infos later! Thank you again, Jason ![]() Edit: Exactly. it correspond to v0.6 of the script! It is on my dropbox! ![]()
__________________
Free ReaScripts - Premium Scripts - Custom Scripts Dev - Learn ReaScript - XR Theme - Stash Files - ReaLinks - Website - ReaComics - Alien 2347 - Donation |
![]() |
![]() |
![]() |
#20 |
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 10,672
|
![]()
OMG!
HEDA! There is table.sort function in Lua, that allow sorting datas! Look at this, it is a comparaison between the GetSelectedItem function order and what it does if we use table.sort! ![]() In the actual version of the script exporter, I did a whole thing so that it look for selected items in position order and not in track + position in track order, involving actions in background to put all selected items one one track only ![]() Lua is so cool, really ![]()
__________________
Free ReaScripts - Premium Scripts - Custom Scripts Dev - Learn ReaScript - XR Theme - Stash Files - ReaLinks - Website - ReaComics - Alien 2347 - Donation |
![]() |
![]() |
![]() |
#21 |
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 10,672
|
![]()
I just remembered that I had prepared screenshots of all functionalities of the SRT exporter v0.6 (renammed 1.0, cause it works well :P) !
So, the text of the pop up windows has change, but you will have overview of the capacities: Offset From Cursor Pos ![]() Track Selection ![]() Item Selection ![]() Mixed Selection (track + item) ![]() Empty Track Detection ![]() No Selection Detection ![]() ![]() ![]() ![]()
__________________
Free ReaScripts - Premium Scripts - Custom Scripts Dev - Learn ReaScript - XR Theme - Stash Files - ReaLinks - Website - ReaComics - Alien 2347 - Donation |
![]() |
![]() |
![]() |
#22 |
Human being with feelings
Join Date: Nov 2009
Location: UK
Posts: 669
|
![]()
Item notes are really useful for storing metadata. I use them in Vordio to store an ID for each item which is later used to reconform the sound edit to a new version of the visual edit. I also use them to display useful information to the sound editor such as scene and take.
However, I recently started worrying about conflicts with other tools that use item notes and also not stopping people from writing their own notes. So in the end, instead of taking over the whole note, I started prefixing lines with a header for each line. Each header I can use to store different metadata. ![]() This way Vordio can ignore all lines that don't contain a header that Vordio uses. I just mention this because it is an easy way to avoid conflicting with other people's tools. |
![]() |
![]() |
![]() |
#23 |
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 10,672
|
![]()
@mrlimbic
Thanks for the tip ! In case of a subtitling workflow, no prefix is needed. We use empty items for that: it items without audio and without MIDI, just the text notes. +, the srt exporter is selective, you can choose what items/tracks to consider or not.
__________________
Free ReaScripts - Premium Scripts - Custom Scripts Dev - Learn ReaScript - XR Theme - Stash Files - ReaLinks - Website - ReaComics - Alien 2347 - Donation |
![]() |
![]() |
![]() |
#24 | |
Human being with feelings
Join Date: Nov 2009
Location: UK
Posts: 669
|
![]() Quote:
It is just a general worry with so many wonderful scripts people are writing that there may be note conflicts unless we try to come up with some standard for not affecting other scripts/tools. |
|
![]() |
![]() |
![]() |
#25 |
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 10,672
|
![]()
@mrlimbic
Other text (empty) items related scripts I know also work with certain tracks. As long as your organize your tracks and items right (grouped tracks for subtitles, grouped tracks for region for heda's regions and marker from item script, etc...), you will have no conflict ![]() It's all about project organization.
__________________
Free ReaScripts - Premium Scripts - Custom Scripts Dev - Learn ReaScript - XR Theme - Stash Files - ReaLinks - Website - ReaComics - Alien 2347 - Donation |
![]() |
![]() |
![]() |
#26 |
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 10,672
|
![]()
Question: Actual export text encoding format is ANSI, do you think it could be UTF-8 ?
It can be useful for some languages.
__________________
Free ReaScripts - Premium Scripts - Custom Scripts Dev - Learn ReaScript - XR Theme - Stash Files - ReaLinks - Website - ReaComics - Alien 2347 - Donation |
![]() |
![]() |
![]() |
#27 |
Human being with feelings
Join Date: Jun 2012
Location: Spain
Posts: 7,470
|
![]()
mmm no idea... I didn't check that. I always assume on modern OS everything should be UTF-8
here is some information about Lua and UTF-8 http://lua-users.org/wiki/LuaUnicode |
![]() |
![]() |
![]() |
#28 |
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 10,672
|
![]()
@heda
Thanks for your answer. ![]() Well for the moment, SRT exporter is ANSI. I just read your doc, and some other page... That's quite hard. I didn't find a way to tell that the export file have to be utf-8. Can you take a look ?
__________________
Free ReaScripts - Premium Scripts - Custom Scripts Dev - Learn ReaScript - XR Theme - Stash Files - ReaLinks - Website - ReaComics - Alien 2347 - Donation |
![]() |
![]() |
![]() |
#29 |
Human being with feelings
Join Date: Jun 2012
Location: Spain
Posts: 7,470
|
![]()
Sorry I have a bug to kill this morning
![]() but I annotate this in the txt of things to look at. |
![]() |
![]() |
![]() |
#30 |
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 10,672
|
![]()
Thanks for the note
![]() I guess it is something to look with the io libraries. I found this page that gave some infos of why it works with ansi on windows. http://lua.2524044.n2.nabble.com/Lua...td4285043.html Maybe some infos for you in it ![]() Meanwhile, good luck for the bug !
__________________
Free ReaScripts - Premium Scripts - Custom Scripts Dev - Learn ReaScript - XR Theme - Stash Files - ReaLinks - Website - ReaComics - Alien 2347 - Donation |
![]() |
![]() |
![]() |
#31 | |
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 10,672
|
![]() Quote:
ANd sure, empty items can be used in a lot of things. I'm still, surprised there is only one native actions for them in REAPER. They are so useful !
__________________
Free ReaScripts - Premium Scripts - Custom Scripts Dev - Learn ReaScript - XR Theme - Stash Files - ReaLinks - Website - ReaComics - Alien 2347 - Donation |
|
![]() |
![]() |
![]() |
#32 |
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 10,672
|
![]()
__________________
Free ReaScripts - Premium Scripts - Custom Scripts Dev - Learn ReaScript - XR Theme - Stash Files - ReaLinks - Website - ReaComics - Alien 2347 - Donation |
![]() |
![]() |
![]() |
#33 |
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 10,672
|
![]()
@TonE
Be aware of two things:
An detailed article about the text item workflow will came out when Rv5 will.
__________________
Free ReaScripts - Premium Scripts - Custom Scripts Dev - Learn ReaScript - XR Theme - Stash Files - ReaLinks - Website - ReaComics - Alien 2347 - Donation |
![]() |
![]() |
![]() |
#34 |
Human being with feelings
Join Date: Jan 2014
Posts: 52
|
![]()
Hello. I am very excited by the possibilities of X-Raym's workflow for subtitling but I seem to get stuck with the very first step, importing the SRT file.
I installed HeDa script import SRT but when I run it, with a correctly formatted SRT file, absolutely nothing happens. No error message, nothing hangs. Just ... Nothing. Probably there is something simple I am missing, but I cannot see what. I am on OSX Thanks for any help. Jeremy |
![]() |
![]() |
![]() |
#35 |
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 10,672
|
![]()
@JeremyCherfas
Can you post your SRT somewhere so we can test ? EDIT: Note that IMPORT may need you to select a track.
__________________
Free ReaScripts - Premium Scripts - Custom Scripts Dev - Learn ReaScript - XR Theme - Stash Files - ReaLinks - Website - ReaComics - Alien 2347 - Donation Last edited by X-Raym; 09-14-2017 at 06:39 AM. Reason: extra precision |
![]() |
![]() |
![]() |
#36 |
Human being with feelings
Join Date: Jan 2014
Posts: 52
|
![]()
I've come back to this, starting again from scratch.
Two basic questions, for now: Is there a way to render the subtitles on top of the video image within Reaper? It would make it easier to fix long lines, etc. On a similar line, how can I burn the subtitles to the rendered video file from Reaper, if I do not want to use an SRT file? Thanks |
![]() |
![]() |
![]() |
#37 | ||
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 10,672
|
![]() Quote:
Maybe their creation can be scripted but for the moment, no solution exists. Quote:
__________________
Free ReaScripts - Premium Scripts - Custom Scripts Dev - Learn ReaScript - XR Theme - Stash Files - ReaLinks - Website - ReaComics - Alien 2347 - Donation |
||
![]() |
![]() |
![]() |
#38 |
Human being with feelings
Join Date: Jan 2014
Posts: 52
|
![]()
I'll keep plugging away. Converting the notes to a text processor would be a good solution for me.
|
![]() |
![]() |
![]() |
#39 |
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 10,672
|
![]()
Hi Heda,
The IMPORT srt script need a small update to prevent error: Code:
line = '' repeat line = f:read ("*l") -- read next line with the text if line and line ~= "" then textline = textline .. "|" .. line .. "\n"; end; until not line or line=="" This works as expected :P It could also be way more efficient with SWS API functions but that's okay :P
__________________
Free ReaScripts - Premium Scripts - Custom Scripts Dev - Learn ReaScript - XR Theme - Stash Files - ReaLinks - Website - ReaComics - Alien 2347 - Donation |
![]() |
![]() |
![]() |
#40 | |
Human being with feelings
Join Date: Jun 2012
Location: Spain
Posts: 7,470
|
![]() Quote:
![]() Which SWS API functions are you referring to? |
|
![]() |
![]() |
![]() |
Thread Tools | |
|
|