Webinterface

Questions and answers on how to get the most out of FFAStrans
User avatar
Silicon
Posts: 98
Joined: Fri Sep 04, 2020 6:34 am

Re: Webinterface

Post by Silicon »

Hey @emcodem
Thanks now I see it :roll:
BR,
Silicon
--------
FFAStrans 1.3.0.2; WebInterface 1.3.0.0
Manager: VM: 2x Xeon E5-2630v3@2.4GHz, 8GB RAM
Workers: 3x HP DL360 G9 (2x Xeon E5-2643v3@3.4GHz,16GB RAM, nVidia M2000)+ 2x Lenovo SR665 (2x AMD EPYC730216C@3.0GHz,128GB RAM, nVidia P2200)
emcodem
Posts: 1646
Joined: Wed Sep 19, 2018 8:11 am

Re: Webinterface

Post by emcodem »

@Silicon What a stupid mistake :D
About the player, i don't yet have updated the wiki with the infos about it, meanwhile i can post you what i wrote internally to the guys:

The Player is based on vlc and does live transcoding (acutally vlc pipes to ffmpeg which streams to the player). This adds some latency but for the usecase it is okayish i believe. How it works is that on the server where webinterface is installed, vlc.exe (piped to ffmpeg rewrapping) will be spawned and they'll remain open and happily stream data to the client until they close the player window or the webpage (or the playing stops at the end).
Transcoding is done to mpeg1 low resolution low bitrate, shouldnt use more than 0.5-1 core on server. Absolute maximum of paralell instances is currently set to 10 (or 11)players. In case there is any error or too many viewers, this will ensure that it's not indefinite VLC instances running on the server.

VLC.exe will listen locally on the server on port 8000-8010 but this is just for control interface internally on the server, not for the data stream to the client, the data is transported over the already opened connection via websocket, so no extra ports to open on the firewall.
emcodem, wrapping since 2009 you got the rhyme?
User avatar
Silicon
Posts: 98
Joined: Fri Sep 04, 2020 6:34 am

Re: Webinterface

Post by Silicon »

Hi @emcodem
Webinterface embeded player is really cool stuff! Do you have any plans / ideas how to further develop its potential?
I've got one idea :idea: - let me describe the uscase:
- users are droping UCG (mediafiles in various codecs and formats) to watchfolders, which are processed by FFAStrans and results are then forwarded to production
- these mediafiles are usualy short / small, but sometimes they are long / big, but user needs to import only part of it i.e. one ot more segment)
- it would be nice to be able to define Mark In & Mark Out points (or EDL if possible) using the built-in player
- Mark In & Mark Out points (or EDL) will then used in FFAStrans workflow (submited from Webinterface) for "partial import"

I'm looking forward to hear your comments on that 8-)

P.S. I know there are dozens of free ffmpeg based tools on web available that can do this stuff ... but they are too complicated for standard BFUs (like journalists)
BR,
Silicon
--------
FFAStrans 1.3.0.2; WebInterface 1.3.0.0
Manager: VM: 2x Xeon E5-2630v3@2.4GHz, 8GB RAM
Workers: 3x HP DL360 G9 (2x Xeon E5-2643v3@3.4GHz,16GB RAM, nVidia M2000)+ 2x Lenovo SR665 (2x AMD EPYC730216C@3.0GHz,128GB RAM, nVidia P2200)
emcodem
Posts: 1646
Joined: Wed Sep 19, 2018 8:11 am

Re: Webinterface

Post by emcodem »

Hehe sure, i wanted to add simple in and out functionality from start but i was not sure if the player based on vlc mpeg1 live encoding with all its limitations will be acceptable.
As time was running by i decided to just post what i have and wait for some feedback to see if i am om the right track.
If you can, please try it in production with some users and let me know if it works acceptable.
emcodem, wrapping since 2009 you got the rhyme?
taurojo
Posts: 32
Joined: Mon Dec 19, 2016 2:44 pm

Re: Webinterface

Post by taurojo »

Is it possible to implement a checkbox option in the interface, and a boolean in FFASTRANS to be able to select certain options from the WEB viewer?
emcodem
Posts: 1646
Joined: Wed Sep 19, 2018 8:11 am

Re: Webinterface

Post by emcodem »

taurojo wrote: Tue Apr 18, 2023 10:54 am Is it possible to implement a checkbox option in the interface, and a boolean in FFASTRANS to be able to select certain options from the WEB viewer?
hey @taurojo,
your message could mean so much different things, can you specify what you look for? You mean something job submit realted or some admin settings or what?
emcodem, wrapping since 2009 you got the rhyme?
taurojo
Posts: 32
Joined: Mon Dec 19, 2016 2:44 pm

Re: Webinterface

Post by taurojo »

Sorry for the way I expressed myself, I don't think I was very clear. The question is regarding adding a file to one of the workflows. Is it possible to include not only a string, but also a true or false value based on a checkbox within the Conversion section and User variables? Currently, only user variables of type string, integer, and float can be added. I think it would be useful to add a boolean type so that it can be modified with a checkbox from the outside, in this case, the web interface.


I understand that it is complicated, since it would require an addition to FFSTRANS and the web interface
emcodem
Posts: 1646
Joined: Wed Sep 19, 2018 8:11 am

Re: Webinterface

Post by emcodem »

Hey @taurojo

You can already do what you want, there is a functionality in webint that lets you construct a custom form for job submission. There are various types of form fields that you can use, checkbox is among them.

Here some example workflow:
emcodem_webui_checkbox_example.json
(2.96 KiB) Downloaded 78 times
The wiki has some examples how to build a form input, calendar, select and multiselect here:
https://www.ffastrans.com/wiki/doku.php ... binterface

I am very sorry that this functionality is not well documented. Also, please be aware before you dive deep into this, the next webint version is just a few weeks before release and it brings a massive update to this "build your own form" functionality that makes it very easy to work with.

The wiki writes it in short words, basically how it works is that when you name your variable "webui_*", and you add a special JSON in the variable "description", then this variable will be displayed in webinterface after selecting the workflow:
checkbox.png
checkbox.png (81.42 KiB) Viewed 3879 times
On a sidenote: no, it is not needed or makes sense to add a new variable type in ffastrans for boolean. Bool is usually just a shortcut for the number 0 or 1, depending on the programming language. There would be no visible benefit if ffastrans supported such a variable type natively. Actually as long as you dont need to calculate, string variable type should fulfill all your needs.
emcodem, wrapping since 2009 you got the rhyme?
emcodem
Posts: 1646
Joined: Wed Sep 19, 2018 8:11 am

Re: Webinterface

Post by emcodem »

To dive deeper into this, the next webui version basically delivers the same functionality but it needs different Form field definitions. I am trying to automatically translate between old (existing in your workflow) and new definitions but as i said, if you dive too deep into it now, there is a big change that you have to re-visit some your form inputs with the next updates. So, keep it simple currently, especially with calendar form input.

Next Webint Version also slightly changes the look and feel of the final form:
1.png
1.png (78.44 KiB) Viewed 3873 times
And the sugar is that it brings a graphical userinterface that allows you to easily design and play with each and every userinput that is created.
2.png
2.png (169.38 KiB) Viewed 3873 times
The reason why i am changing the complete definitions is because i am updating the main javascript framework that i use for webinterface from dhtmlx5 to dhtmlx8.
List of Form fields (most of them will work without problems):
https://docs.dhtmlx.com/suite/category/ ... -controls/
emcodem, wrapping since 2009 you got the rhyme?
taurojo
Posts: 32
Joined: Mon Dec 19, 2016 2:44 pm

Re: Webinterface

Post by taurojo »

I'm sorry but I've tried and it doesn't work in my environment. I have the latest updates and this is what appears, it's not a checkbox :( . Instead, a select option appears with no Yes or No, or zero and one options

Code: Select all

<fieldset class="dhxform_fs" style="width: 348px;">
<legend class="fs_legend" align="dhxform_label_left" style="text-align:dhxform_label_left">User Variables</legend>
<div class="dhxform_base_nested dhxform_fs_nested" style="padding-left: 20px;">
<div class="dhxform_base"><div class="dhxform_item_label_left" style="padding-left: 10px !important;">
<div class="dhxform_label dhxform_label_align_left"><label for="dhxId_5ljp1LbjtWVk">checkbox</label>
</div>
<div class="dhxform_control">
<select class="dhxform_select" name="s_webui_checkbox" id="dhxId_5ljp1LbjtWVk" style="width: 150px;"></select>
</div></div></div></div></fieldset>
Post Reply