
Recherche avancée
Médias (91)
-
#3 The Safest Place
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#4 Emo Creates
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#2 Typewriter Dance
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#1 The Wires
11 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
ED-ME-5 1-DVD
11 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
Revolution of Open-source and film making towards open film making
6 octobre 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (36)
-
Pas question de marché, de cloud etc...
10 avril 2011Le vocabulaire utilisé sur ce site essaie d’éviter toute référence à la mode qui fleurit allègrement
sur le web 2.0 et dans les entreprises qui en vivent.
Vous êtes donc invité à bannir l’utilisation des termes "Brand", "Cloud", "Marché" etc...
Notre motivation est avant tout de créer un outil simple, accessible à pour tout le monde, favorisant
le partage de créations sur Internet et permettant aux auteurs de garder une autonomie optimale.
Aucun "contrat Gold ou Premium" n’est donc prévu, aucun (...) -
Ajouter notes et légendes aux images
7 février 2011, parPour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
Modification lors de l’ajout d’un média
Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...) -
Encoding and processing into web-friendly formats
13 avril 2011, parMediaSPIP automatically converts uploaded files to internet-compatible formats.
Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
All uploaded files are stored online in their original format, so you can (...)
Sur d’autres sites (5398)
-
Increasing Website Traffic : 11 Tips To Attract Visitors
25 août 2023, par Erin — Analytics Tips, Marketing -
FFmpeg drawtext filter error : "Cannot find a valid font for the family Sans"
7 septembre 2024, par fatdrogenI'm trying to add text overlay to a video using FFmpeg's drawtext filter in my iOS app, but I'm encountering the following error :


error : Cannot load default config file


ERROR : Cannot find a valid font for the family Sans


ERROR : Error initializing filter 'drawtext'


ERROR : with args 'text=write some thing :'


Here's the relevant part of my FFmpeg command :


Copydrawtext=text='write some thing '


Questions :


What's causing this error, and how can I resolve it ?
Is there a way to specify a font that's guaranteed to be available on iOS devices ?
Are there any alternative approaches to adding text overlay in FFmpeg that might avoid this issue ?


Environment :


Platform : iOS
FFmpeg : Using MobileFFmpeg library
Swift


Any help or guidance would be greatly appreciated !


func makeGIFData(asset: AVAsset, startTime: Double, endTime: Double, rotation: Double, overlayText: String) async throws -> Data {
 let fileName = "\(ProcessInfo.processInfo.globallyUniqueString)_input.mp4"
 let fileURL = URL(fileURLWithPath: NSTemporaryDirectory()).appendingPathComponent(fileName)
 
 // Export the asset to a temporary file
 guard let exporter = try? await AVAssetExportSession(asset: asset, presetName: AVAssetExportPresetHighestQuality) else {
 throw NSError(domain: "GIFConversionError", code: -1, userInfo: [NSLocalizedDescriptionKey: "Failed to create AVAssetExportSession"])
 }
 
 exporter.outputURL = fileURL
 exporter.outputFileType = .mp4
 exporter.timeRange = CMTimeRange(start: CMTime(seconds: startTime, preferredTimescale: 600), end: CMTime(seconds: endTime, preferredTimescale: 600))
 
 do {
 try await exporter.export()
 } catch {
 throw NSError(domain: "GIFConversionError", code: -2, userInfo: [NSLocalizedDescriptionKey: "Failed to export video: \(error.localizedDescription)"])
 }
 
 let outfileName = "\(ProcessInfo.processInfo.globallyUniqueString)_outfile.gif"
 let outfileURL = URL(fileURLWithPath: NSTemporaryDirectory()).appendingPathComponent(outfileName)
 
 // Get video dimensions
 guard let track = try? await asset.loadTracks(withMediaType: .video).first,
 let videoSize = try? await track.load(.naturalSize) else {
 throw NSError(domain: "GIFConversionError", code: -4, userInfo: [NSLocalizedDescriptionKey: "Failed to get video dimensions"])
 }
 
 // Prepare FFmpeg command
 var command = "-i \(fileURL.path) -vf "
 
 
 // Add text overlay
 let escapedText = overlayText.replacingOccurrences(of: ":", with: "\\:").replacingOccurrences(of: "'", with: "\\'")
 let fontColor = textColor.toHexString()
 
 // Use a more universally available font, or provide multiple options
 filters += ",drawtext=text='write some thing ':"
 
 // Add palette generation and application
 filters += ",split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse"
 
 // Add filters to command
 command += "\"\(filters)\""
 
 // Finalize command
 command += " -loop 0 \(outfileURL.path)"
 
 print("FFmpeg command: \(command)")
 
 let startTime = CFAbsoluteTimeGetCurrent()
 
 let result = MobileFFmpeg.execute(command)
 
 if result != RETURN_CODE_SUCCESS {
 throw NSError(domain: "GIFConversionError", code: Int(result), userInfo: [NSLocalizedDescriptionKey: "FFmpeg conversion failed"])
 }
 
 let timeElapsed = CFAbsoluteTimeGetCurrent() - startTime
 print("Time elapsed: \(timeElapsed) s.")
 
 // Read the generated GIF file
 guard let gifData = try? Data(contentsOf: outfileURL) else {
 throw NSError(domain: "GIFConversionError", code: -3, userInfo: [NSLocalizedDescriptionKey: "Failed to read generated GIF file"])
 }
 
 print("Animated GIF data created successfully. Size: \(gifData.count) bytes")
 
 // Clean up temporary files
 try? FileManager.default.removeItem(at: fileURL)
 try? FileManager.default.removeItem(at: outfileURL)
 
 return gifData
}
'''



-
Revision bf212edc10 : Merge "Choosing GOOD mode by default."
23 août 2014, par Dmitry KovalevMerge "Choosing GOOD mode by default."