i use string:
Code: Select all
{n} {s00e00} {t}.{y}.{source.lower()}.{af.lower()}.{ac.lower()}.{video[0].frameRate}fps.{media.overallBitRateString.replaceAll(/ /)}.{vc.lower()}.{vf}
I want to convert kbps to mbps, how to do it?
Code: Select all
{n} {s00e00} {t}.{y}.{source.lower()}.{af.lower()}.{ac.lower()}.{video[0].frameRate}fps.{media.overallBitRateString.replaceAll(/ /)}.{vc.lower()}.{vf}
Code: Select all
{bitrate / 1e6}
Code: Select all
{bitrate / 1e6 as int}
Code: Select all
{(bitrate / 1e6d).round(2)}
so the correct groovy format to force Mbps (not Mb/s) with a single decimal would be +media.overallBitRateString.replace('/', 'p').XXXXXXX ?rednoah wrote: ↑09 Apr 2017, 07:46 Here's how you get the bitrate in megabit, with and without decimals, and 2-decimal precision:Code: Select all
{bitrate / 1e6}
Code: Select all
{bitrate / 1e6 as int}
Code: Select all
{(bitrate / 1e6d).round(2)}
EDIT:
{mbps} binding has been added with r5007.
Code: Select all
{video[0].FrameRate}
I don't follow for the mbps. What is the exact code I would enter? Right now I am usingrednoah wrote: ↑24 Jan 2018, 09:10 1.
You can use {mbps} for the first one.
2.
There is no convenience binding for the frame rate, so you'll have to grab it from the video stream directly:@see viewtopic.php?f=5&t=4285Code: Select all
{video[0].FrameRate}
Code: Select all
+media.overallBitRateString.replace('/', 'p')