Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


SerjTank

42 posts

Geek
+1 received by user: 2


#296043 17-May-2022 00:40
Send private message

As I understand it, this is a pretty nifty tool which can automatically synchronize subtitles and audio for a video source where it's out of sync. I have a few of these such files (mostly Korean subtitles - for study) and would really like to give this a try.

 

 

 

The only thing is, it seems to be written in Python and doesn't have a GUI. I don't have enough skills to get it to work on my own. Is there someone who could give me a few pointers on how to get started with this?

 

 

 

Thanks,

 

 

 

-t





War does not determine who is right. War determines who is left.


Create new topic
SumnerBoy
2079 posts

Uber Geek
+1 received by user: 306

ID Verified
Lifetime subscriber

  #2914839 17-May-2022 09:17
Send private message

You might want to check out https://fileflows.com/. It has been written by a Kiwi fella, who used to be (maybe still is) on GZ... @reven.

 

Not sure if it does exactly what you need, but it is pretty powerful and I am sure if you asked nicely it could possibly be added.




reven
3748 posts

Uber Geek
+1 received by user: 874

Trusted

  #2914883 17-May-2022 10:58
Send private message

yeah im still around :)

 

 

 

Had a look at that tool, its doing some tricky voodoo.  so not something FileFlows can do currently.  It could automatically run an external command against the file and do this.  but you would have to know the parameters for the ffsubsync app in the first place.


SerjTank

42 posts

Geek
+1 received by user: 2


  #2915168 17-May-2022 15:35
Send private message

Thanks for your suggestion. It's not quite what I'm after in this particular case but definitely something I'm going to look at more in the future. Looks like a pretty nifty toy.

 

@reven if you're interested in adding this functionality please let me know. I have a few files that can be used as test cases and I'd be willing to help develop this functionality in anyway which I can.





War does not determine who is right. War determines who is left.




reven
3748 posts

Uber Geek
+1 received by user: 874

Trusted

  #2915178 17-May-2022 15:49
Send private message

SerjTank:

 

@reven if you're interested in adding this functionality please let me know. I have a few files that can be used as test cases and I'd be willing to help develop this functionality in anyway which I can.

 

 

not at the moment, roadmap is already full for now, and this seems like such a specific edge case.  and trying to reinvent what this util is doing is a lot of work.   the way to work with this would be to just call the external app from a flow.     or a specific node that would call this app for you.  but not to reimplement all that logic.


SerjTank

42 posts

Geek
+1 received by user: 2


  #2915239 17-May-2022 17:03
Send private message

Alright thanks for your help anyhow.

 

 

 

Would it be easy enough to try this on my own? I have some basic ability to stumble my way through things. My thoughts are as follows:

 

 

 

1) download source files

 

2) setup Python environment(?). I've done this before with mixed results.

 

3) run downloaded program and try to get it to work using my video/subtitle files that are out of sync.

 

 

 

 

 

Of course, there are other programs out there e.g subtitleedit

 

and they're very handy but compared to an automated process (which is what I understand ffsubsync to be) there would be next to no comparison.

 

 





War does not determine who is right. War determines who is left.


reven
3748 posts

Uber Geek
+1 received by user: 874

Trusted

  #2915251 17-May-2022 18:09
Send private message

Heres a basic exported flow that would run ffsubsync.  You would need to tweak it and it assumes the srt is the same dir as the video file with a srt extension.


 

Just save this as a json file and import it as a flow

 

 

 

 

 

 

{

 

  "Enabled": true,

 

  "Description": "A blank file template with a single \u0022Input File\u0022 input node.",

 

  "Type": 0,

 

  "Template": "File",

 

  "Parts": [

 

    {

 

      "Uid": "1058ab2d-3225-4910-8ff1-b81991b14cd3",

 

      "Name": "Input File",

 

      "FlowElementUid": "FileFlows.BasicNodes.File.InputFile",

 

      "xPos": 210,

 

      "yPos": 60,

 

      "Icon": "far fa-file",

 

      "Label": null,

 

      "Inputs": 0,

 

      "Outputs": 1,

 

      "OutputConnections": [

 

        {

 

          "Input": 1,

 

          "Output": 1,

 

          "InputNode": "7ba29ada-dab3-43b5-b9b4-5af3cb5a7684"

 

        }

 

      ],

 

      "Type": 0,

 

      "Model": null

 

    },

 

    {

 

      "Uid": "7ba29ada-dab3-43b5-b9b4-5af3cb5a7684",

 

      "Name": "run ffsybsync",

 

      "FlowElementUid": "FileFlows.BasicNodes.Functions.Function",

 

      "xPos": 210,

 

      "yPos": 260,

 

      "Icon": "fas fa-code",

 

      "Label": "Function",

 

      "Inputs": 1,

 

      "Outputs": 1,

 

      "OutputConnections": null,

 

      "Type": 3,

 

      "Model": {

 

        "Outputs": 1,

 

        "Code": "let python = \u0027/path/to/python\u0027;\nlet ffsubsync = \u0027/path/to/ffsubsync\u0027;\n\nlet videoFile = Variables.file.FullName;\nlet srtFile = videoFile.substring(0, videoFile.lastIndexOf(\u0027.\u0027) \u002B 1) \u002B \u0027srt\u0027;\nlet newSrtFile = videoFile.substring(0, videoFile.lastIndexOf(\u0027.\u0027) \u002B 1) \u002B \u0027new.srt\u0027;\n\nlet process = Flow.Execute({\n\tcommand: python,\n\tworkingDirectory: ffsubsync,\n\targumentList: [\n\t\t\u0027ffsubsync\u0027,\n\t\tvideoFile,\n\t\t\u0027-i\u0027,\n\t\tsrtFile,\n\t\t\u0027-o\u0027,\n\t\tnewSrtFile\n\t]\n});\n\nif(process.standardOutput)\n\tLogger.ILog(\u0027Standard output: \u0027 \u002B process.standardOutput);\nif(process.starndardError)\n\tLogger.ILog(\u0027Standard error: \u0027 \u002B process.starndardError);\n\nif(process.exitCode !== 0){\n\tLogger.ELog(\u0027Failed processing output: \u0027 \u002B process.exitCode);\n\treturn -1;\n}\n\n// worked, now you have the new srt in the newSrtFile parameter.  \n\nreturn 1;"

 

      }

 

    }

 

  ],

 

  "Uid": "5ae4d04a-9b62-4941-bb59-2c0c048e7948",

 

  "Name": "ffsubsync",

 

  "DateCreated": "2022-05-17T18:07:19.6343743+12:00",

 

  "DateModified": "2022-05-17T18:07:19.6343743+12:00"

 

}

 

 

 


Create new topic








Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.