Conditional encode based on audio language flag

Questions and answers on how to get the most out of FFAStrans
BernH
Posts: 16
Joined: Thu Jan 23, 2020 2:39 am

Re: Conditional encode based on audio language flag

Post by BernH » Fri Jan 24, 2020 9:22 pm

Yes, I am seeing a full text output.

I am attaching the text output I just ran. It is from an mkv file I downloaded of an old tv show from the 1980's that has multiple language streams in it, as I have been working from home today and needed a test file. Ultimately this would be used for more than this kind of file, but I figured this was a good sample to try to figure out the logic implementation in FFastrans.
Attachments
20200124-1746-4067-08dd-88c5ee0a1e5a.zip
(1.55 KiB) Downloaded 5 times

emcodem
Posts: 503
Joined: Wed Sep 19, 2018 8:11 am

Re: Conditional encode based on audio language flag

Post by emcodem » Fri Jan 24, 2020 9:49 pm

Thanks, that was exactly what i needed.
The reason for your problem is a bug in ffastrans.
In this special case, your ffprobe contains the following value:
mkvmerge v9.3.1 ('Mask Machine')

this contains a ' character, which is the same as you provide in your function:
$jsonget('%s_info_ffprobe%'...
..and because of that, jsonget does not work at all, that is why your output file begins with _MyJsonGet(' while it should as any other JSON begin with a { character

This is actually something we found out today and steinar already fixed it in the code. Sorry for that :-)
I'll prepare a workflow for you that workarounds the troubles, wait some minutes...

BernH
Posts: 16
Joined: Thu Jan 23, 2020 2:39 am

Re: Conditional encode based on audio language flag

Post by BernH » Fri Jan 24, 2020 9:58 pm

Thanks, but there is no need to make a new work flow. I'll just use a different file or convert this one to another format.

emcodem
Posts: 503
Joined: Wed Sep 19, 2018 8:11 am

Re: Conditional encode based on audio language flag

Post by emcodem » Fri Jan 24, 2020 9:59 pm

Too late ;-)
Test Workflow_emcodem.zip
(1.41 KiB) Downloaded 12 times
This is the manifestation of ThomasM idea:
ThomasM wrote:
Thu Jan 23, 2020 9:44 am

3. Use FFprobe and some CMD in CommandExecutor-Node plus PopulateVariables and Conditional-Node to totally control your Picked-Up-Files (
....

BernH
Posts: 16
Joined: Thu Jan 23, 2020 2:39 am

Re: Conditional encode based on audio language flag

Post by BernH » Fri Jan 24, 2020 10:08 pm

Thanks, I'll give it a whirl.

emcodem
Posts: 503
Joined: Wed Sep 19, 2018 8:11 am

Re: Conditional encode based on audio language flag

Post by emcodem » Fri Jan 24, 2020 10:16 pm

Great, please let me know any doubts please and sorry that i did guide you on this experimental path. Anyway, we need to come forward with Version1 and today, your topic was very important for Version1, not only the bug that we found here but also bringing up the importance of the new feature to be able to select any value from the ffprobe (and exiftool and mediainfo).

Thanks for this thread!

BernH
Posts: 16
Joined: Thu Jan 23, 2020 2:39 am

Re: Conditional encode based on audio language flag

Post by BernH » Fri Jan 24, 2020 10:58 pm

You're welcome, I'm only too happy to help improve things, and thanks for the prompt replies and getting to the bottom of the issue.

I just took my test file and converted it to an MP4 using Xmedia Recode to just do a stream copy into a new container, keeping all the stream metadata, and the parsing works correctly now. I will try your workflow also when I get back to testing this evening or tomorrow.

Having done trials with Vantage and Selenio, I can attest to the importance of being able to easily access that ffprobe/mediainfo metadata directly in the decision making nodes, without having to custom code for data extraction and parsing. Whether this means having to drop a mediainfo/ffprobe/populate variables node that auto populates dropdowns with the discovered metadata on the work flow or if it is automatically available is up to you. Vantage and Selenio automatically give you access to some information like basic codec name/version information, frame size, frame rate, audio streams, timecode, ancillary data streams like closed captions and sub titles, etc, if I recall correctly, but more in depth information such as detailed codec information, bitrates in kbps/mbps, writing libraries, etc, is only available if employing a mediainfo node.

Once again, I'm sure other questions will come up as I get deeper into this and start testing for the other kinds of functionality that we require at the office, so I'm sure you will hear from me again.

Post Reply