Jump to content


Photo

Bif Generator (windows tool)

bif

  • Please log in to reply
22 replies to this topic

#1 mickle026 OFFLINE  

mickle026

    Advanced Member

  • Members
  • 145 posts
  • Local time: 01:48 AM

Posted 20 March 2019 - 05:49 PM

Anyone want to test my bif generator? - Windows only

 

It can create bifs without artifacts or compression for mkvs and ts files, but the sizes might be a bit bigger (but still work with Emby)

 

Its not finished yet, consider it an Alpha Version please..........May contain bugs ....May Overwrite existing bifs (so rename or move them if you want to keep them)

 

By using app you agree to my terms - i am not responsible for anything !! anything goes wrong your on your own. (just in case - probably nothing will go wrong - it doesn't have a delete function :P )

 

USE A TEST FOLDER & FILE FIRST

 

files at the moment are created in the same directory as the movie

 

Still to add:
file queue
 

NEEDS

ffmpeg to be in the same directory OR to be in the same directory as ffmpeg ;)

 

If you try it and crash it, let me know what you did

 

5c92b4d39f6b2_BiffGenerator.jpg

 

 

PLEASE USE THE LATEST VERSION (ALPHA 4 Lower down in posts)

It will be at bottom or last post I made - thanks


Edited by mickle026, 20 April 2019 - 02:52 PM.

  • Oxide, neik and Senna like this

#2 mickle026 OFFLINE  

mickle026

    Advanced Member

  • Members
  • 145 posts
  • Local time: 01:48 AM

Posted 20 March 2019 - 06:19 PM

Added an experimental processing style scalar - very small bif file sizes (compression may be off)

 

Please also note that not all movie files will trigger hardware acceleration.

 

Hardware acceleration might not provide quicker results as in some causes it just changes where the decoding takes place and frees up cpu to do another job.

 

Mp4/Mkv does on the Raedon Using DVXA2 but most avi files do not.

For Example

 

Setting the App to use two cores and creating bif from an mkv with a Raedon will use about 50% CPU, but about 85-100% GPU

Setting the App to use two cores and creating bif from an avi with a Raedon will use about 50% CPU, but about 0% GPU

 

Attachment removed


Edited by mickle026, 20 April 2019 - 02:52 PM.


#3 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 139713 posts
  • Local time: 08:48 PM

Posted 20 March 2019 - 11:10 PM

how fast is it? we're obviously going to fix the pixelation so i wouldn't factor that into comparison much. Can  you try generating some with 320 width for a more direct comparison? Thanks.



#4 PenkethBoy OFFLINE  

PenkethBoy

    Advanced Member

  • Members
  • 3407 posts
  • Local time: 01:48 AM
  • LocationWarrington,UK

Posted 21 March 2019 - 03:52 AM

A couple of questions

 

1. Where does it save the images to before it creates the BIF?

2. Does it delete them afterwards?

 

Observations to help improve on what you have done so far

1. you need to add in more sizes - e.g for 16:9 media - so 320x180 and for 2.35 media so 320x136 - these are suggested by the Roku dev pages

2. The save log option is always greyed out after a run - so no option to save - and the log view is not scrollable so you cant review what it did :) - this is on win10

3. If you use the Emby ffmpeg(4.1.0..15) and the emby ffmpeg command line format - you will get significantly better times

e.g. Running with a normal ffmpeg on a 2hr video - currently your app takes 257 seconds for 320x240 @10 secs with no hw accel - Emby Type on a 6700k - auto threads(so 8)

with the same video file i can achieve a time of less than 20 seconds to extract and create a bif file with almost the same setting - images are @ 320x180

[Thursday, 21 March 2019 07:26:52] - INFO: BifMaker: - Processing: "input.mkv"
[Thursday, 21 March 2019 07:26:52] - INFO: BifMaker: - Checking if an existing BIF file with an Interval of 10 seconds already exists
[Thursday, 21 March 2019 07:26:52] - INFO: BifMaker: - BIF File does not exist - Continuing
[Thursday, 21 March 2019 07:26:52] - INFO: BifMaker: - Creating Temp Directory - F:\Video\Temp\input-320-10
[Thursday, 21 March 2019 07:26:52] - INFO: BifMaker: - Starting FFMpeg Process to extract images at 10 second Intervals
[Thursday, 21 March 2019 07:27:09] - INFO: FFMpeg: - Time Taken to Extract Images: 00:00:16.65
[Thursday, 21 March 2019 07:27:11] - INFO: BifMaker: - Starting BifTool Process to produce the Video BIF file
[Thursday, 21 March 2019 07:27:12] - INFO: BifTool: - Time Taken to Produce Bif file: 00:00:00.31
[Thursday, 21 March 2019 07:27:12] - INFO: BifMaker: - BIF file successfully produced
[Thursday, 21 March 2019 07:27:12] - INFO: BifMaker: - BIF file moved to: F:\Video\ffmpeg\bin
[Thursday, 21 March 2019 07:27:12] - INFO: BifMaker: - Removing Temp Directory - F:\Video\Temp\input-320-10

From my testing using HW accel actually slows down the extraction process using the Emby ffmpeg(which has been modified to do fast extraction) 

 

So your app can gain a speed increase with a few mods etc :)


  • CBers likes this

#5 mickle026 OFFLINE  

mickle026

    Advanced Member

  • Members
  • 145 posts
  • Local time: 01:48 AM

Posted 21 March 2019 - 06:26 AM

A couple of questions

 

1. Where does it save the images to before it creates the BIF?

2. Does it delete them afterwards?

 

Observations to help improve on what you have done so far

1. you need to add in more sizes - e.g for 16:9 media - so 320x180 and for 2.35 media so 320x136 - these are suggested by the Roku dev pages

2. The save log option is always greyed out after a run - so no option to save - and the log view is not scrollable so you cant review what it did :) - this is on win10

3. If you use the Emby ffmpeg(4.1.0..15) and the emby ffmpeg command line format - you will get significantly better times

e.g. Running with a normal ffmpeg on a 2hr video - currently your app takes 257 seconds for 320x240 @10 secs with no hw accel - Emby Type on a 6700k - auto threads(so 8)

with the same video file i can achieve a time of less than 20 seconds to extract and create a bif file with almost the same setting - images are @ 320x180

[Thursday, 21 March 2019 07:26:52] - INFO: BifMaker: - Processing: "input.mkv"
[Thursday, 21 March 2019 07:26:52] - INFO: BifMaker: - Checking if an existing BIF file with an Interval of 10 seconds already exists
[Thursday, 21 March 2019 07:26:52] - INFO: BifMaker: - BIF File does not exist - Continuing
[Thursday, 21 March 2019 07:26:52] - INFO: BifMaker: - Creating Temp Directory - F:\Video\Temp\input-320-10
[Thursday, 21 March 2019 07:26:52] - INFO: BifMaker: - Starting FFMpeg Process to extract images at 10 second Intervals
[Thursday, 21 March 2019 07:27:09] - INFO: FFMpeg: - Time Taken to Extract Images: 00:00:16.65
[Thursday, 21 March 2019 07:27:11] - INFO: BifMaker: - Starting BifTool Process to produce the Video BIF file
[Thursday, 21 March 2019 07:27:12] - INFO: BifTool: - Time Taken to Produce Bif file: 00:00:00.31
[Thursday, 21 March 2019 07:27:12] - INFO: BifMaker: - BIF file successfully produced
[Thursday, 21 March 2019 07:27:12] - INFO: BifMaker: - BIF file moved to: F:\Video\ffmpeg\bin
[Thursday, 21 March 2019 07:27:12] - INFO: BifMaker: - Removing Temp Directory - F:\Video\Temp\input-320-10

From my testing using HW accel actually slows down the extraction process using the Emby ffmpeg(which has been modified to do fast extraction) 

 

So your app can gain a speed increase with a few mods etc :)

 

Hi,

 

It doesn't save the images to disk at all until its complete, it stacks them in memory so there is no disk access at all except from ffmpeg : 1 access to read the file

It actually reads ffmpeg output as a direct input through memory into my app - there is no disk access from my app until it writes the biff. : 1 access to write the file.

 

2 disk accesses in total

 

I did consider saving them to disk, but most systems these days can save anything from 500kb to 500mb in memory without issue - firefox sometimes uses up to 2GB!, so I decided that it was more than likely unnecessary to write them out to disk..

 

Fixing the log grayed out is no problem, neither is adding the option to scroll - I'll do that shortly

Adding more sizes is no problem, simple and easy :) - Adding the option for the user to create a size list is a good idea - a little more time though.

 

I'll release the version that's in my machine in the next few days,  It has more options to scale the image, can create biffs without pixellation (in my tests) about 25%-33% smaller than Emby at the moment :)

 

Hardware acceleration completely depends on the file type its processing and the hardware its using.  I think people miss understand what this does and just think it should be faster.  That's not always the case,  it simply moves resources in use to the GPU (if it can).  So in test with a 1.5gb mkv I  had only 15% CPU in use but my crappy old Raedon R7 at 99% use (and it is crap).  Speed increase was negligible - about the same, but my CPU was free to do other things.



#6 PenkethBoy OFFLINE  

PenkethBoy

    Advanced Member

  • Members
  • 3407 posts
  • Local time: 01:48 AM
  • LocationWarrington,UK

Posted 21 March 2019 - 06:41 AM

Ok - i pointed things out so you can improve your tool

 

have you checked if emby can read the different sizes of images you give as an option - i.e the non standard roku ones?



#7 mickle026 OFFLINE  

mickle026

    Advanced Member

  • Members
  • 145 posts
  • Local time: 01:48 AM

Posted 21 March 2019 - 06:43 AM

how fast is it? we're obviously going to fix the pixelation so i wouldn't factor that into comparison much. Can  you try generating some with 320 width for a more direct comparison? Thanks.

 

 

How quick is it?

 

Well as you know that depends on the settings and the file type, some of my tests have been about a minute for an 800mb avi whilst others have been slightly over 10 minutes for a 1.5gb mkv at the smallest bif size.  I think though that it is probably "close" on being the fastest you can get.

 

I have an AMD A8-7650K 10 Compute cores 4C+6G (Quad core) 3.3GHz with 16GB of old Ram (not sure what speed the ram is)

 

I am guessing that if you are implementing the Roku sdk - it'll be faster that that just because of the disk access, and that can be major amount on systems where people are using old hardware and not using ssd's.

 

My machine is quite old too, I don't have up to date hardware simply because I don't need it.

 

I'm only a hobby programmer so even though my app does some really complicated stuff for a hobby programmer its not that many lines of code .

 

its vb.net because I don't know much c#

 

There no command line processor at the moment because I've got to find out how to do that yet :( - it'll come though so it can be scripted or direct controlled.

 

I'll probably implement a pipe listener for commands so you can send a series of instructions in one line (like you do with ffmpeg) - because even though I don't yet know how to do a command line interpreter, I do know how to do do piping :D .


Edited by mickle026, 21 March 2019 - 06:46 AM.


#8 mickle026 OFFLINE  

mickle026

    Advanced Member

  • Members
  • 145 posts
  • Local time: 01:48 AM

Posted 21 March 2019 - 06:50 AM

Ok - i pointed things out so you can improve your tool

 

have you checked if emby can read the different sizes of images you give as an option - i.e the non standard roku ones?

 

 

No I have not checked if Emby can support all the output types - although I think it should.  The tool at the moment is still just built because i can do it - it definitely needs refining.

 

I am also adding a time line editor for the biff.  My thoughts are that you will be able to add a larger scale image at chapter markers.

 

for example a 320x280 biff with 480x360 images at 5 minute intervals.

 

Well its just a thoughtr anyway :)



#9 PenkethBoy OFFLINE  

PenkethBoy

    Advanced Member

  • Members
  • 3407 posts
  • Local time: 01:48 AM
  • LocationWarrington,UK

Posted 21 March 2019 - 07:04 AM

Have you looked at the speed difference yet?



#10 CBers OFFLINE  

CBers

    Advanced Member

  • Moderators
  • 15023 posts
  • Local time: 01:48 AM
  • LocationKent, England.

Posted 21 March 2019 - 07:05 AM

Probably easier via a PowerShell script :)
  • PenkethBoy likes this

#11 PenkethBoy OFFLINE  

PenkethBoy

    Advanced Member

  • Members
  • 3407 posts
  • Local time: 01:48 AM
  • LocationWarrington,UK

Posted 21 March 2019 - 07:06 AM

Funny you should say that  :P  ;)


  • CBers likes this

#12 mickle026 OFFLINE  

mickle026

    Advanced Member

  • Members
  • 145 posts
  • Local time: 01:48 AM

Posted 21 March 2019 - 08:03 AM

Probably easier via a PowerShell script :)

 

Maybe, but definitely not as flexible.

 

So example script that outputs a biff ?



#13 PenkethBoy OFFLINE  

PenkethBoy

    Advanced Member

  • Members
  • 3407 posts
  • Local time: 01:48 AM
  • LocationWarrington,UK

Posted 21 March 2019 - 08:13 AM

LOL

 

done and being used by a few people

 

tried to help

 

see ya


  • CBers likes this

#14 CBers OFFLINE  

CBers

    Advanced Member

  • Moderators
  • 15023 posts
  • Local time: 01:48 AM
  • LocationKent, England.

Posted 21 March 2019 - 08:18 AM

done and being used by a few people


And working well :)

#15 mickle026 OFFLINE  

mickle026

    Advanced Member

  • Members
  • 145 posts
  • Local time: 01:48 AM

Posted 21 March 2019 - 08:29 AM

LOL

 

done and being used by a few people

 

tried to help

 

see ya

 

 

Sorry If i found "use the PowerShell" comment not very helpful to my tool - glad your script is done.  I don't really care about speed, more about cpu use and quality - but hey there you go we cant suit everyone all the time.

I also think you miss the whole point of this tool.  Whilst it can create bif's like your script can, the tool is actual code, not a script - so the code can be modified to be anything.  It can be a dll too, it can be a server in its own right - pushing frames over http to create animations on the fly - just image animated dvd covers,  and it could also mean it can go on to be an advertisment detecting routine in its own right.  It can be used to extract subs to .srt files because I have another bit of code that can convert ffmpeg extracted subs to srt's.  The ideas that spawn from this are far more versatile than a PowerShell script.

 

But hey I digress its apparently not as fast as powershell ;)


Edited by mickle026, 21 March 2019 - 12:59 PM.

  • Jdiesel, Happy2Play and cybergrimes like this

#16 mickle026 OFFLINE  

mickle026

    Advanced Member

  • Members
  • 145 posts
  • Local time: 01:48 AM

Posted 21 March 2019 - 04:01 PM

Updated version with a bif file viewer (any bif file on the system hdd/usb/ssd - not the from the generator window)

 

*Fixed last image index out of bounds error (previous versions was creating the correct index but was not writing the last image data to the bif file)

 

5c93ed81130b0_bifgen.jpg

5c93ed8b6a513_bifviewer.jpg

 

Attached File  Bif Generator -alpha 4.zip   26.34KB   15 downloads


Edited by mickle026, 21 March 2019 - 05:17 PM.


#17 PenkethBoy OFFLINE  

PenkethBoy

    Advanced Member

  • Members
  • 3407 posts
  • Local time: 01:48 AM
  • LocationWarrington,UK

Posted 21 March 2019 - 06:47 PM

Sorry If i found "use the PowerShell" comment not very helpful to my tool - glad your script is done.  I don't really care about speed, more about cpu use and quality - but hey there you go we cant suit everyone all the time.

I also think you miss the whole point of this tool.  Whilst it can create bif's like your script can, the tool is actual code, not a script - so the code can be modified to be anything.  It can be a dll too, it can be a server in its own right - pushing frames over http to create animations on the fly - just image animated dvd covers,  and it could also mean it can go on to be an advertisment detecting routine in its own right.  It can be used to extract subs to .srt files because I have another bit of code that can convert ffmpeg extracted subs to srt's.  The ideas that spawn from this are far more versatile than a PowerShell script.

 

But hey I digress its apparently not as fast as powershell ;)

LOL

 

Nice list most if not all programing languages whether "scripts" or "code" could achieve the same - with some exceptions

 

The speed has nothing to do with powershell or windows forms - but you cant see that - and that's fine 



#18 mickle026 OFFLINE  

mickle026

    Advanced Member

  • Members
  • 145 posts
  • Local time: 01:48 AM

Posted 21 March 2019 - 10:59 PM

LOL

 

Nice list most if not all programing languages whether "scripts" or "code" could achieve the same - with some exceptions

 

The speed has nothing to do with powershell or windows forms - but you cant see that - and that's fine 

 

but you cant see that - and that's fine

 

 

Ha-ha whatever !!!



#19 Jdiesel ONLINE  

Jdiesel

    Advanced Member

  • Members
  • 2698 posts
  • Local time: 07:48 PM
  • LocationRegina, SK

Posted 21 March 2019 - 11:29 PM

Not sure why there is so much hostility. I'm glad to see any new project that has an Emby focus. Thanks for sharing!
  • cybergrimes, mickle026 and neik like this

#20 neik OFFLINE  

neik

    Advanced Member

  • Members
  • 805 posts
  • Local time: 02:48 AM

Posted 22 March 2019 - 02:13 AM

Not sure why there is so much hostility. I'm glad to see any new project that has an Emby focus. Thanks for sharing!

 

This!

There are two approaches, better for us users who can choose which one to use.

 

Thanks for sharing your solutions! :-)


  • mickle026 likes this





Also tagged with one or more of these keywords: bif

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users