Jump to content


Photo

Bif Generator (windows tool)

bif

  • Please log in to reply
21 replies to this topic

#21 mickle026 OFFLINE  

mickle026

    Advanced Member

  • Members
  • 124 posts
  • Local time: 12:39 PM

Posted 28 March 2019 - 09:58 AM

double post removal


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


#22 mickle026 OFFLINE  

mickle026

    Advanced Member

  • Members
  • 124 posts
  • Local time: 12:39 PM

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

ie:
\\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 :)

 

5c9ce1fa5291a_bifcreator05.jpg

 

5c9ce20415136_bifcreator06.jpg

 

5c9ce6230716a_bifcreator07.jpg

 

5c9ce2a3e0916_bifcreator08.jpg

 

5c9ce4a83b9e5_bifcreator09.jpg

 

 

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)

 

5c9cf07c77e7f_bifcreator10.jpg

 

5c9cf138789d9_bifcreator11.jpg

Attached Files


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






Also tagged with one or more of these keywords: bif

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users