Webinterface

Questions and answers on how to get the most out of FFAStrans
Post Reply
emcodem
Posts: 1753
Joined: Wed Sep 19, 2018 8:11 am

Webinterface

Post by emcodem »

Dear FFAStrans users,

this webinterface is an officially supported part of ffastrans, overview here: http://ffastrans.com/wiki/doku.php?id=w ... binterface
Note that i will keep on editing this very forum thread whenever there is some new release.

[Download]
Latest Version: https://github.com/emcodem/ffastrans_we ... 4.0.40.zip

[Instructional Videos]
[media]https://www.youtube.com/watch?v=aPlX4yXPdYY&t=8s[/media]

Screenshot:
Webint_14.png
Webint_14.png (408 KiB) Viewed 12763 times
webint_forms.jpg
webint_forms.jpg (390.69 KiB) Viewed 12746 times
[Features]
-) Job Details view
-) Job Scheduler
-) Submit Jobs by upload or server file browsers, along with userinput from webui to a user_variable of the workflow
-) Log viewer with highligting of useful information
-) User authentification and permissions

[Upgrade instructions]
If you already have a configuration, backup the file %installdir%\database\config
-) shutdown the current webinterface windows service or stop the application
-) Default way of upgrading: you just need to unzip and replace the server.exe file from the new release .zip! I'll try to addd a release note in case i know that any new release is not upgradeable this way.

[Usage instructions]
After starting the server.exe, you should be able to access localhost:3002 in your browser and see the jobs from your ffastrans engine.

[Configuration - ffastrans]
You need to enable the API web service, it is turned off by default when "not running as windows service". In the FFASTrans workflow Manager, go to Options->Host->Web REST Service->"Run as application" OR "Install as windows service"

To enable log viewing of workflows, open ffastrans workflow manager and right-click a workflow:
Properties->Special->Log to files->Enable

[Configuration - Webinterface]
Check out the Admin settings (topmost clog symbol on the left)

[Authentification and User Rights]
You can enable password authentification on the admin page. You can only "reset" a password of a user by deleting and re-creating them.
By default, i created an "admin" user (password: admin) that is member of the Administrators group which has all menu items.
On the user manager page, the flow is like:
-) create a group first and select the group by clicking on it in the group list
-) drag&drop permissions from left to right to add permissions to the group
-) create a user, select the user in the top left grid
-) drag&drop a group from left to right to add groups to that user

[Start workflow instructions]
Workflows can be started by either uploading a file (it will be added to the file list automatically), by hitting the "Add Source" btn top right or by browsing for a file and doubleclick it. TIPP: you can add a URL to e.g. an rtsp stream using the "Add Source" Button.
After you have one or more files in the list top right, you can hit the "Start Workflow" btn (also top right ;-))
When adding a Source manually, take care that ffastrans is able to access the path as you enter it.
NOTE!! Please let me know if you are using the upload feature, it does cost a lot of efforts and i am not sure if it is helpful anyway.

[Job Submission with additional Variables]
Check out the Wiki on how to generate nice looking "Form" that allows users to fill in additional information like emails etc..

[File upload instructions]
Uploaded Files through the webinterface go to the folder you configured in the Upload Path you entered on admin page (default: c:\temp)
NOTE: make sure your workflow deletes processed files, or have some maintenance routine clear old files in that directory.

Job Scheduling instructions
There is a new menu item, you will need to modify your administrators usergroup to see the menu item Scheduler.
There are many purposes when you need scheduled jobs, a small doc is contained on the job scheduling page. More to come...
To get started without scripting knowledge, please set this as your script content:

Code: Select all

process.send(["FAKEVALUE"]);
It will cause the target ffastrans workflow to be started and sets the variable %s_source% to FAKEVALUE. You can use it e.g. to schedule a windows batch that deletes files every night and in the morning you have the executed job in the history list of ffastrans jobs.
Last edited by emcodem on Fri Oct 25, 2019 12:05 pm, edited 80 times in total.
emcodem, wrapping since 2009 you got the rhyme?
momocampo
Posts: 594
Joined: Thu Jun 08, 2017 12:36 pm
Location: France-Paris

Re: New Webinterface available

Post by momocampo »

Hello Encodem,
It's really a great idea I think !! I'm so excited by that :)
Anyway, I have already a problem, maybe you can help me. Node.js installed, ffastrans api started. I run serve.exe and type localhost. All seems ok but when I try to upload a file the serve.exe close immediately and i have an error message in webinterface(under upload file).
It works with add source and full path. have you an idea why upload doesn't work?
Can you confirm me where I must place the FFastrans folder and websevice folder? maybe it's the cause of my problem?.

Other question, can you explain me what "this workflow has no user variable"means? not sure to understand.
Last, is there a way to submit a file through network? The idea is a network workstation could submit a file for encode.
Thanks a lot emcodem ;) and I'm ready to test all the new features and so excited by your work !

Cheers ;)

Benjamin

PS: Beware, windows 10 doesn't allow by default to start the server.exe. Must go to security, software and at last set it by ask.
Last edited by momocampo on Mon Jul 22, 2019 11:52 am, edited 1 time in total.
emcodem
Posts: 1753
Joined: Wed Sep 19, 2018 8:11 am

Re: New Webinterface available

Post by emcodem »

Hey Benjamin,

thank you for the very kind words and for using the ffastrans webinterface ;-)
Actually you don't Need to have node installed when you only run the Server.exe (node is part of the exe). I was able to reproduce your Problem, it is because my download does not deliver the Folder of interest: "upload_backend\Files". If you just create this Folder, Uploads should work - this problem is already corrected if you download the most current version.

It does not really matter where you place all the files, as Long as there are write permissions into the "upload_bakend/Files" Directory. E.g. i placed one Installation here:
C:\Program Files\ffastrans_webui-master\

About user_variables not available, it means that you did not define any user variables in your workflow (e.g. using the populate variables Plugin). If you create new user_variables there, they should be listed and useable when selecting the corresponding workflow. This way you could e.g. set the Output Directory dynamically. I'll Need to write some guide About that ASAP.

Thanks for the Windows 10 tipp, i'll try if i can workaournd this issue somehow - it also would be solved automatically when there are a number of users using the Software :-).
Let me know any Questions!

Cheers,
emcodem
Last edited by emcodem on Mon Dec 17, 2018 2:10 pm, edited 1 time in total.
emcodem, wrapping since 2009 you got the rhyme?
momocampo
Posts: 594
Joined: Thu Jun 08, 2017 12:36 pm
Location: France-Paris

Re: New Webinterface available

Post by momocampo »

Yo,
Ok you're right with the new folder "Files" it works ;) But once I upload file(ok), choose my workflow and clic start workflow I have an error message :"job ended no video or audio found in the media". I tried manually by a submit into ffastrans and it's a success.
Other thing, when I clic on trash in webservice, the file disappear but it is not deleted in work folder ( upload_bakend/Files\), maybe can be or it's for another reason it must stay in?
Do you think it will be possible to submit a file through network?
Thanks ;)

B.
emcodem
Posts: 1753
Joined: Wed Sep 19, 2018 8:11 am

Re: New Webinterface available

Post by emcodem »

Hm, it might be a permission issue, when ffastrans is running as a service. Maybe it is best for the moment to keep all the webserver installations files outside of the protected dir "C:\program files", e.g. just keep in in c:\ffastrans_webserver or so, or alternatively just set NTFS security permission to everyone for the "files" folder.

I need to make the upload directory configureable so you can place the uploaded files on a UNC share. Also i need to enable some logging in order to let you give me some more easy insight in what exactly is happening for you.
Uploading the same file twice will just end up in an overwrite, that shouln't really influence your workflow.

Can you define what you meant by "submit a file through network?"

Cheers,
emcodem
emcodem, wrapping since 2009 you got the rhyme?
momocampo
Posts: 594
Joined: Thu Jun 08, 2017 12:36 pm
Location: France-Paris

Re: New Webinterface available

Post by momocampo »

emcodem,
So, I tried again and same thing : I moved webservice folder in c:\program files (not x86 I suppose) but no result. I upload file well (0% to 100%) then clic start workflow but always "no video or audio". My workflow is a simple monitor folder-h264 encoder-delivery folder. My file is a quicktime contener with DNxHD 120 codec. Nothing complicated. I continue to seek why it doesn't work. It works with the same file if I choose add source and I write the path.

My question about network is because I wonder if a client of network (same lan network) could submit a file to encode it. Ok I could create a watch folder but it will be useful to encode manually a specific file in a specific encoder.
I'm really sorry but if it's not possible, what is the useful of this webservice? (Very sorry but maybe something I don't understand (I'm french so english isn't my own language :) )
Thanks again emcodem!

B.
emcodem
Posts: 1753
Joined: Wed Sep 19, 2018 8:11 am

Re: New Webinterface available

Post by emcodem »

Your Problem should be pretty simple, i hope the following Questions clear it up, otherwise please wait until i added some logging that Shows me what exactly you are doing :-)
On the Web interface, In the "File Column" for a failed Job do you see the full and correct path to the file that resides in the "web_backend/files" Directory? Can you also try using the "Add source" button and enter the path as seen by ffastrans manually? Would ffastrans pick up new files if you set a watchfolder to the upload Directory "upload_backend\Files"?


Basically what you can do currently is 2 different things regarding Job submission:
1) upload a file from any client through the webinterface so the file is stored on the server where the webserver is installed on (and ffastrans)
2) instead of uploading, enter file paths manually, using the "add source" button. This way the file is not moved but instead ffastrans will access exactly the path as you provided it
emcodem, wrapping since 2009 you got the rhyme?
momocampo
Posts: 594
Joined: Thu Jun 08, 2017 12:36 pm
Location: France-Paris

Re: New Webinterface available

Post by momocampo »

Hello emcodem,

Ok, so in file column I have the good path I think : "upload_backend\files\test.mov" It's not the full path indeed.
If I use "add source" and write the full path it works well (success).
If I try with ffastrans to set watch folder to "upload_backend\files\" it works too.

Thanks for the answers 1 and 2 ;) I understand well now but instead of full path to type, isn't it better to do a "browse" (avoid write a full path)?

I stop the questions now and let you work :) I don't want to be invasive.

Thanks !

B.
emcodem
Posts: 1753
Joined: Wed Sep 19, 2018 8:11 am

Re: New Webinterface available

Post by emcodem »

Ah, great. I need to work a little on the compiled mode, it behaves different than running the development mode (on commandline, run "node server.js"). Let me fix this quickly...
momocampo wrote: Mon Dec 17, 2018 4:39 pm but instead of full path to type, isn't it better to do a "browse" (avoid write a full path)?
Hehe that is kind of the holy grail for web applications. Unfotunately as a browser application, one cannot get the full path to a file but only the filename instead using the built in browse buttons, no matter if HTML4 or 5 (security stuff). I can add support for browsing for files on the server itself, but not on the client unless a special application is installed on the client. This again opens lots of security problems and needs to be well engineered.
For start, i plan to provide a small workaround that might work like: in windows explorer, rightclick the file and choose "start ffastrans" workflow. This would open the browser and pass the full path as a url parameter - so i can access the full path in the web application.
But i am not sure about this, allowing smart file submitting for users is a huge portion of work and there is still so much to do ;-)

It is great to get some response Benjamin, you don't really need to stop. What i need to know is what features users need most urgently . I am aware about the need for simplified job starting and i am keen on getting out if more users demand that.

[EDIT] Please check out the newest version, it allows to configure the upload directory and windows service installer

cheers,
emcodem
emcodem, wrapping since 2009 you got the rhyme?
momocampo
Posts: 594
Joined: Thu Jun 08, 2017 12:36 pm
Location: France-Paris

Re: New Webinterface available

Post by momocampo »

Hello emcodem,

Well, I tried your new release but error when I loaded it "error could not get fullpath" (In webinterface), in commandline server.exe I have "upload path does not exist [\\localhost\c$\temp\]"
How can I configure the upload directory? Or Where?
Thanks.

B.
Post Reply