Jump to content


Bif Generator (windows tool)


  • Please log in to reply
22 replies to this topic

#21 mickle026 OFFLINE  


    Advanced Member

  • Members
  • 146 posts
  • Local time: 06:11 AM

Posted 28 March 2019 - 09:58 AM

double post removal

Edited by mickle026, 28 March 2019 - 10:02 AM.

#22 mickle026 OFFLINE  


    Advanced Member

  • Members
  • 146 posts
  • Local time: 06:11 AM

Posted 28 March 2019 - 10:02 AM

Command line tool for testing. (Consider it still in Alpha) - use at your own risk - WILL overwrite bif files that exist.


This may not be the fastest version, please bear that in mind.  However so far in my testing all bifs are created, nothing is missing, no truncated files and so far no pixelated of bad images have been made.

  • CPU usage can be controlled by setting cores in use
  • HW Acceleration can be enabled
  • Creating over Network paths is allowed
  • Output will be in the same directory as the input

The tool DOES NOT convert the files to JPEGS!! or write any CACHE to disk - they stay in the original format as motion jpegs (they are closely related but are not the same), therefore nothing gets truncated due to write failures, there is no waiting for drive writes.

BifCreator stacks the thumbnails in Memory and does a final write with them all.  In most uses memory required for this is only a few Megabytes.


There are not many drive accesses. (windows reports drive access at 0% in task manager after starting the tool - see below)

  • Start ffmpeg and decode the video
  • Mount your share (if needed) to a local path
  • Write the bif file.


What's needed now from the Emby guys is for the movie trackbar thumbnails to match the image intervals (ie check the amount of images in the bif and divide the movie length by it), Its an integer written from byte 15 (4 bytes) of the bif and for the thumbnail container to match the thumbnail sizes ;)

And...perhaps a second bif for the chapter markers so that the thumbnails match exactly - that'd be a file likely under 200kb.


I'm pretty sure the guys at Emby will get over those issues in the server, but this is a fix or workaround until then.


Due to command line limitations with unc paths, this tool will temporarily mount and dismount UNC paths as a "free" local drive

\\NAS\Movies will become A:\ temporarily whilst the bif is generated.


The images below show bif creation over a NETWORK to a samba share for a 1.2gb movie at 1280x540 (widescreen as shown by the thumbnail below)mpeg 4 - 10.5 minutes created with a poor old Raedon R7 onboard graphic unit - using just over 50% CPU .  This is not the quickest, however it is utilising GPU, Creating much smaller bif files (1.79mb - about half of Emby) and so far no thumbnail image issues.  I'm certain that users with decent hardware will easily reduce this


For me, smaller bif files = faster response in the player/client, less network usage (bandwidth), less disk usage = better experience - but each person has different preferences :)













In comparison an Avi file 723mb - 1hr23mins with no GPU usage, software decode only - again across a network took 75.4 seconds  (avi files will not use GPU)





Attached Files

Edited by mickle026, 28 March 2019 - 11:46 PM.

#23 Luke OFFLINE  


    System Architect

  • Administrators
  • 140179 posts
  • Local time: 01:11 AM

Posted 24 July 2019 - 03:08 PM

Emby Server 4.1+ can now generate bif files for you. Just enable thumbnail extraction in your library settings.

Also tagged with one or more of these keywords: bif

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users