avalonmediasystem / avalon

Avalon Media System – Samvera Application
http://www.avalonmediasystem.org/
Apache License 2.0
93 stars 51 forks source link

Multiple pre-transcoded derivatives have inconsistent filenames after processing #5218

Open cjcolvar opened 1 year ago

cjcolvar commented 1 year ago

Normal files that are uploaded generate derivatives with a filename format of #{filename}-#{quality}.mp4. Multiple pre-transcoded derivatives generate derivatives with filenames in the form of #{filename}#{quality}.#{extension}. This is not technically a problem but it would be nice for output filenames to be consistent for peace of mind and easier scripting. Prior to the recent standardization of filename sanitization in ActiveEncode there was still an inconsistency with output filenames like #{filename}.#{quality}.#{extension}. We could take hyphens out of the filename sanitization in ActiveEncode or put in more logic to handle this case.

See https://github.com/samvera-labs/active_encode/blob/main/lib/active_encode/filename_sanitizer.rb#LL13C7-L13C54 where the period (and hyphen if there was one) is removed when called from the PassThroughAdapter: https://github.com/samvera-labs/active_encode/blob/main/lib/active_encode/engine_adapters/pass_through_adapter.rb#L80.

Identified by Ron Stanonik.

Done Looks Like

joncameron commented 1 year ago

It would be nice to have an internal doc on how we're doing sanitizing across the application.