# template problem

**URL:** <https://community.transloadit.com/t/template-problem/18196>\
**Category:** Transloadit\
**Tags:** tender-archive\
**Created:** [October 9, 2013, 12:51pm UTC](https://community.transloadit.com/t/template-problem/18196 "2013-10-09T12:51:00Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lucas](https://avatars.discourse-cdn.com/v4/letter/l/ba8739/32.png) [@Lucas](https://community.transloadit.com/u/Lucas)\
**Post date:** [October 9, 2013, 12:51pm UTC](https://community.transloadit.com/t/template-problem/18196/1 "2013-10-09T12:51:00Z")

</div>

> Archived from the Transloadit support forum. Originally posted on October 9, 2013; details may be outdated, see [our docs](https://transloadit.com/docs/) for current behavior. [Original thread](https://web.archive.org/web/20140309102649/http://support.transloadit.com/discussions/problems/9518-template-problem)

Hi!

I’m using this template (id = REDACTED) and If the file doesn’t have bitrate its going to decline.  
I have the same logic on this template (id = REDACTED) and its works fine but on the first template the assembly through an internal code error because the file bitrare is null. Its seems like the decline filter it doesn’t work.

This is dthe assembly = REDACTED.

Thanks!

Cheers!

---

<div class="post-metadata">

**Author:** ![tim-kos](https://avatars.discourse-cdn.com/v4/letter/t/bbe5ce/32.png) [@tim-kos](https://community.transloadit.com/u/tim-kos)\
**Post date:** [October 9, 2013, 1:10pm UTC](https://community.transloadit.com/t/template-problem/18196/2 "2013-10-09T13:10:00Z")

</div>

Hey Lucas,

preserving the video bitrate this way is not a good idea as sometimes the video bitrate cannot be parsed and also the values aren’t compatible with what ffmpeg expects. Just set it to a relatively high value (like “512k”) and you should be fine.

Kind regards,  
Tim

Co-Founder Transloadit  
@tim\_kos

---

<div class="post-metadata">

**Author:** ![Lucas](https://avatars.discourse-cdn.com/v4/letter/l/ba8739/32.png) [@Lucas](https://community.transloadit.com/u/Lucas)\
**Post date:** [October 9, 2013, 1:53pm UTC](https://community.transloadit.com/t/template-problem/18196/3 "2013-10-09T13:53:00Z")

</div>

Thanks for the answer but If I set a value on the ffmpeg like 512k videos with 64k are going to weigh 8 times more than before.

The questions before is about what happend with my template. It has to decline because the filter. But in this case the filter control passed well when it has to decline.

Any other suggestion?

Thanks again.  
Cheers!

---

<div class="post-metadata">

**Author:** ![kvz](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.transloadit.com/kvz/32/606_2.png) [@kvz](https://community.transloadit.com/u/kvz)\
**Post date:** [October 9, 2013, 2:12pm UTC](https://community.transloadit.com/t/template-problem/18196/4 "2013-10-09T14:12:00Z")

</div>

Hi Lucas,

If you pass the `sameq` argument to `ffmpeg`, ffmpeg itself preserves the bitrates; vs some metatool trying to parse it and then feeding it to it again.

Hope this helps,  
Kevin

---

<div class="post-metadata">

**Author:** ![Lucas](https://avatars.discourse-cdn.com/v4/letter/l/ba8739/32.png) [@Lucas](https://community.transloadit.com/u/Lucas)\
**Post date:** [October 9, 2013, 5:41pm UTC](https://community.transloadit.com/t/template-problem/18196/5 "2013-10-09T17:41:00Z")

</div>

Right now, if we use this template ((id = REDACTED) with a video without bitrate, the decline filter does not work and the video passes as a good one. But since the bitrate is not set (or set to null), it eventually fails with a ffmpeg internal error.

We need the decline filter to catch that fail, so we use a different template (id= REDACTED) with a default value.

That implementation (the decline filter detection) is already working in another template (id = REDACTED) which uses videos served from urls, and also with audio presets.

So the question is: should we change something in the template to make the system decline those videos, or the template is fine and this change is required in the robot?

---

<div class="post-metadata">

**Author:** ![tim-kos](https://avatars.discourse-cdn.com/v4/letter/t/bbe5ce/32.png) [@tim-kos](https://community.transloadit.com/u/tim-kos)\
**Post date:** [October 10, 2013, 6:06am UTC](https://community.transloadit.com/t/template-problem/18196/6 "2013-10-10T06:06:00Z")

</div>

Hey Lucas,

why do you want to decline videos for which we cannot identify the bitrate?

---

<div class="post-metadata">

**Author:** ![Lucas](https://avatars.discourse-cdn.com/v4/letter/l/ba8739/32.png) [@Lucas](https://community.transloadit.com/u/Lucas)\
**Post date:** [October 10, 2013, 11:48am UTC](https://community.transloadit.com/t/template-problem/18196/7 "2013-10-10T11:48:00Z")

</div>

Hi Tim!

If the file doesn’t have bitrate this part of the template return an internal comand error (exit code -1). Becaue the b params is NULL.

“ffmpeg”: {  
“b”: “${file.meta.video\_bitrate}”  
}

I want to decline this files in order to use another template without ffmpeg params.

Cheers!

---

<div class="post-metadata">

**Author:** ![kvz](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.transloadit.com/kvz/32/606_2.png) [@kvz](https://community.transloadit.com/u/kvz)\
**Post date:** [October 10, 2013, 12:06pm UTC](https://community.transloadit.com/t/template-problem/18196/8 "2013-10-10T12:06:00Z")

</div>

Hey Lucas, I don’t understand yet why you wouldn’t want to use the `sameq` option like I mentioned?

---

<div class="post-metadata">

**Author:** ![Lucas](https://avatars.discourse-cdn.com/v4/letter/l/ba8739/32.png) [@Lucas](https://community.transloadit.com/u/Lucas)\
**Post date:** [October 16, 2013, 12:53pm UTC](https://community.transloadit.com/t/template-problem/18196/9 "2013-10-16T12:53:00Z")

</div>

Hi Kevin!

sameq doesn’t stand for “same quality”, it stands for “same quant”.  
That ffmpeg param is only useful for maintaining encoding matrices.  
It works only if your output video has the same codec as your input one.  
And as far as i know, it is deprecated on newer versions of ffmpeg.  
Nevertheless it won’t work for what we need.  
That’s why we need to address the original problem: understand why the decline filter is not working on the case described above.

---

<div class="post-metadata">

**Author:** ![Lucas](https://avatars.discourse-cdn.com/v4/letter/l/ba8739/32.png) [@Lucas](https://community.transloadit.com/u/Lucas)\
**Post date:** [October 16, 2013, 4:50pm UTC](https://community.transloadit.com/t/template-problem/18196/10 "2013-10-16T16:50:00Z")

</div>

Hi again!

I need to highlight the problem that I have.

If we have a videoDemo.mp4 without bitrate and I used the template T1 (imports a url) (id = REDACTED) the decline filter works fine!

But if we use the same video videoDemo.mp4 and I used the template T2 this attached the file manually (id =REDACTED ) the decline filter doesn’t work. Its give me a internal command error exit code 1 because b value is null.

I want the template T2 work like T1.  
Cheers!

---

<div class="post-metadata">

**Author:** ![tim-kos](https://avatars.discourse-cdn.com/v4/letter/t/bbe5ce/32.png) [@tim-kos](https://community.transloadit.com/u/tim-kos)\
**Post date:** [October 17, 2013, 6:44am UTC](https://community.transloadit.com/t/template-problem/18196/11 "2013-10-17T06:44:00Z")

</div>

Hey Lucas,

can you please provide an assembly id for each template so that we can take a look at a real assembly?  
If what you say is really true, then this is a bug that we need to fix.

Sorry for all the inconvenience.

Kind regards,  
Tim

Co-Founder Transloadit  
@tim\_kos

---

<div class="post-metadata">

**Author:** ![Lucas](https://avatars.discourse-cdn.com/v4/letter/l/ba8739/32.png) [@Lucas](https://community.transloadit.com/u/Lucas)\
**Post date:** [October 17, 2013, 1:07pm UTC](https://community.transloadit.com/t/template-problem/18196/12 "2013-10-17T13:07:00Z")

</div>

Hi Tim!

This is the assembly that crash = REDACTED. Template id = REDACTED

This is the assembly thats decline filter work fine = REDACTED . template id = REDACTED

---

<div class="post-metadata">

**Author:** ![Lucas](https://avatars.discourse-cdn.com/v4/letter/l/ba8739/32.png) [@Lucas](https://community.transloadit.com/u/Lucas)\
**Post date:** [October 17, 2013, 1:26pm UTC](https://community.transloadit.com/t/template-problem/18196/13 "2013-10-17T13:26:00Z")

</div>

First of all sorry, I noticed that the second template doesn’t have the

```auto
"ffmpeg": {
"b": "${file.meta.video_bitrate}"
}

```

Thats why it was running ok.

There are any posibility to check the robot filter in order not to crash because the b value es null?

We tried sameq and the preset bitrate values but it isn’t what we need. The implementation of this can be possible?

Thanks you very much and sorry for the confusion.

---

<div class="post-metadata">

**Author:** ![tim-kos](https://avatars.discourse-cdn.com/v4/letter/t/bbe5ce/32.png) [@tim-kos](https://community.transloadit.com/u/tim-kos)\
**Post date:** [October 21, 2013, 12:05pm UTC](https://community.transloadit.com/t/template-problem/18196/14 "2013-10-21T12:05:00Z")

</div>

Closing this as we moved the discussion to Skype.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex032/uploads/transloadit/original/1X/04ee57da0cb7ac8728a9ac5965c288164f4ce280.svg) [@system](https://community.transloadit.com/u/system)\
**Post date:** [October 7, 2026, 10:30am UTC](https://community.transloadit.com/t/template-problem/18196/15 "2026-10-07T10:30:54Z")

</div>


