[OK] Marker

Questions and answers on how to get the most out of FFAStrans
Post Reply
Manjik
Posts: 16
Joined: Thu Mar 15, 2018 11:16 am

[OK] Marker

Post by Manjik »

Hello,
First of all, thanks for your fantastic job from Paris.

I'm a question, i create a workflow to transcode some files in XDCAM HD with a WatchFolder in input.
That's work like a charm.
I'd like to add a possibility to send a markin / markout to the workflow to transcode only a part of a file.

Is there a way to do that ? like add an xml or text file with this informations maybe ?

thanks a lot and have a good day.
Last edited by Manjik on Mon Mar 19, 2018 10:12 am, edited 1 time in total.
momocampo
Posts: 592
Joined: Thu Jun 08, 2017 12:36 pm
Location: France-Paris

Re: Marker

Post by momocampo »

Hello Manjik,

I'm also from Paris :) I will write in English for the forum.
Anyway, I create a workflow with text file from Avid Media composer which gives to FFAStrans the Timecode where cut the videofile. Difficult to explain because this is quiet complicated. Overall, the idea is to extract the timecode in text file (with $read function), transform it in variable and use ffmpeg to cut the entire file where you want to deliver the good parts.
I worked on this workflow about 3 weeks to check all possibilities and avoid problem and bugs. Now it works.

Where do your markin and mark out come from?
Cheers ;)

PS : on peut discuter en mp si tu veux.:)
Manjik
Posts: 16
Joined: Thu Mar 15, 2018 11:16 am

Re: Marker

Post by Manjik »

hello momocampo,
I continue too with my bad english, happy to meet you (i can't write private message, it's disable for me)

I'm a developper too and i would try to integrate FFASTANS in an existing app to make a subclip server side. Actualy, i use FFMPEG but client Side so it's too long throught network. (and not very stable).

I generate myself the markers (Markin like 00:00:02.440 and duration like 00:00:27.100 for exemple). So, in my case, i extract myself the timecode and i'd like to pass this at Ffastans (ffastans make the job for me server side :)). Not a problem to create a text file or Xml.
But perhaps, it's possible to remote control ffstans with an api or something else, to for exemple, submit a file (with this parameters) to a workflow ? that would will be very nice

thanks for your help ;)
momocampo
Posts: 592
Joined: Thu Jun 08, 2017 12:36 pm
Location: France-Paris

Re: Marker

Post by momocampo »

Hi ,
Ok so if you can specify your timecode manually it is not too complicated but hard with only words( especially in English!). Anyway, I can create and send the workflow for you but I need more details. How do you cut your videofiles? From a Timecode to another ?From a Timecode and during a specific time? Have you always 1 TC ? 2TC?
Very important thing to know : if you want to cut frame accurate you MUST have a I-Frame codec (like DNxHD) otherwise it will be quiet difficult to cut precisely.
So tell me more about your aim and we will see.

Cheers.

B.
admin
Site Admin
Posts: 1661
Joined: Sat Feb 08, 2014 10:39 pm

Re: Marker

Post by admin »

Hi Manjik, thank you for using FFAStans and welcome to the forum.

Actually, FFAStrans has been able to take an xml-file with in and out points since day one but it has never been documented. It's VERY basic and you MUST use the "A/V Media" decoder for it to work. So, it's like this:

<sClipName>\\full\path\to\file.mov</sClipName>
<clip_inn_point>start frame</clip_inn_point>
<clip_out_point>end frame</clip_out_point>

"clip_inn_point" is misspelled but don't mind that...;-) But that's basically it. So if FFAStrans picks up this xml and you have the "A/V Media"-decoder then it should work. It has some known issues but should get you what you want.

Also, the REST API accepts files along with user populated variables. From the web service documentation:
#Title: Submit job
#Description: Submit a file to a workflow. "start_proc" is optional but lets you choose a spesific node to submit the file to. The "Variables" are optional but lets you inject data to the specified variables used by the workflow. Available variables are obtained from the workflows list uri.
#Method: POST
#Content-Type:application/json
#URI: http://127.0.0.1:65445/api/json/v1/jobs/<job_id>
#Body:JSON
{
 "wf_id": "<workflow id>",
 "inputfile": "<full path to file>",
 "start_proc": "<processor node id>",
 "variables": [{
  "name": "<s_string>",
  "content": "<string>"
}, {
  "name": "<i_string>",
  "content": <integer>
}, {
  "name": "<f_string>",
  "content": <number>
}]
}


#Response: 202 Accepted
#Content-Type:application/json; charset=utf-8
#Body:JSON
{
 "uri": "<url to the job>",
 "job_id": "<identifier for the job>"
}


Hope you find this helpful.

-steinar
Manjik
Posts: 16
Joined: Thu Mar 15, 2018 11:16 am

Re: Marker

Post by Manjik »

hi,
very cool, i just test with the xml file and it's OK. No Problem to create a subclip.
Thanks a lot admin and momocampo

Very simple. I will test the rest api an other day.
have a good day
Post Reply