Recherche avancée

Médias (1)

Mot : - Tags -/pirate bay

Autres articles (94)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • Gestion générale des documents

    13 mai 2011, par

    MédiaSPIP ne modifie jamais le document original mis en ligne.
    Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
    Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...)

Sur d’autres sites (7733)

  • how to get exact position in video as image view ?

    16 février 2024, par Dhruvisha Joshi

    I want to give photo editing feature in my app. so I am allowing user to add text to photo and after that I want to convert it to video using Ffmpeg command.here is what my screen looks like where user can edit photos

    


    here is my command that adds text and convert photo to video.
ffmpeg -loop 1 -i /var/mobile/Containers/Data/Application/88F535C3-A300-456C-97BB-1A9B83EAEE7B/Documents/Compress_Picture/input.jpg -filter_complex "[0]scale=1080:trunc(ow/a/2)*2[video0];[video0]drawtext=text='Dyjfyjyrjyfjyfkyfk':fontfile=/private/var/containers/Bundle/Application/DE5C8DAA-4D66-4345-834A-89F8AC19DF9B/Clear Status.app/avenyt.ttf:fontsize=66.55112651646448:fontcolor=#FFFFFF:x=349.92:y=930.051993067591" -c:v libx264 -t 5 -pix_fmt yuv420p -y /var/mobile/Containers/Data/Application/88F535C3-A300-456C-97BB-1A9B83EAEE7B/Documents/Compress_Picture/output0.mp4

    


    here is my swift code to generate command.

    


    var filterComplex = ""
var inputs = ""
var audioIndex = ""

if currentPhotoTextDataArray.contains(where: { $0.isLocation }) {
 // At least one element has isLocation set to true
 // Do something here
 print("There's at least one element with isLocation == true")
                            inputs = "-i \(inputPath) -i \(self.locImagePath)"
                            audioIndex = "2"
                            
                        } else {
                            // No elements have isLocation == true
                            print("No elements have isLocation set to true")
                            inputs = "-i \(inputPath)"
                            audioIndex = "1"
                        }
                        
                        for (index, textData) in currentPhotoTextDataArray.enumerated() {
                            print("x: \(textData.xPosition), y: \(textData.yPosition)")
                            let x = (textData.xPosition) * 1080 / self.photoViewWidth
                            let y = (textData.yPosition) * 1920 / self.photoViewHeight
                            
                            let fontSizeForWidth = (textData.fontSize * 1080) / self.photoViewWidth
                            let fontSizeForHeight = (textData.fontSize * 1920) / self.photoViewHeight
                            print("fontSizeForWidth: \(fontSizeForWidth)")
                            print("fontSizeForHeight: \(fontSizeForHeight)")
                            
                            let fontPath = textData.font.fontPath
                            let fontColor = textData.fontColor.toHexOrASS(format: "hex")
                            let backColor = textData.backColor?.toHexOrASS(format: "hex")
                            print("fontPath: \(fontPath)")
                            print("fontColor: \(fontColor)")
                            
                            let breakedText = self.addBreaks(in: textData.text, with: UIFont(name: textData.font.fontName, size: fontSizeForHeight) ?? UIFont(), forWidth: 1080, padding: Int(x))
                            
                            if textData.isLocation {
                                print("Location is there.")
                                
                                let textFont = UIFont(name: textData.font.fontName, size: fontSizeForHeight)
                                let attributes: [NSAttributedString.Key: Any] = [NSAttributedString.Key.font: textFont ?? UIFont()]
                                let size = (textData.text as NSString).size(withAttributes: attributes)
                                let textWidth = Int(size.width) + 130
                                
                                var endTimeLoc = 0.0
                                if let audioData = self.audioDataArray.first(where: { $0.photoIndex == mainIndex }) {
                                    let duration = audioData.audioEndTime - audioData.audioStartTime
                                    endTimeLoc = duration
                                } else {
                                    endTimeLoc = 5
                                }
                                
                                let layerFilter = "color=color=black@.38:size=\(textWidth)x130[layer0];[video\(index)][layer0]overlay=enable='between(t,0,\(endTimeLoc))':x=\(x):y=(\(y)-(overlay_h/2))[layer1];"
                                filterComplex += layerFilter
                                let imageFilter = "[1:v]scale=80:80[image];[layer1][image]overlay=enable='between(t,0,\(endTimeLoc))':x=\(x)+10:y=(\(y)-(overlay_h/2))[v\(index)];"
                                filterComplex += imageFilter
                                
                                if index == currentPhotoTextDataArray.count - 1 {
                                    let textFilter = "[v\(index)]drawtext=text='\(breakedText)':fontfile=\(fontPath):fontsize=\(fontSizeForHeight):fontcolor=\(fontColor):x=(\(x)+100):y=(\(y)-(text_h/2))"
                                    filterComplex += textFilter
                                } else {
                                    let textFilter = "[v\(index)]drawtext=text='\(breakedText)':fontfile=\(fontPath):fontsize=\(fontSizeForHeight):fontcolor=\(fontColor):x=(\(x)+100):y=(\(y)-(text_h/2))[video\(index + 1)];"
                                    filterComplex += textFilter
                                }
                                
                            } else {
                                
                                let textBack = textData.backColor != nil ? ":box=1:boxcolor=\(backColor ?? "")@0.8:boxborderw=25" : ""
                                
                                if index == currentPhotoTextDataArray.count - 1 {
                                    let textFilter = "[video\(index)]drawtext=text='\(breakedText)':fontfile=\(fontPath):fontsize=\(fontSizeForHeight):fontcolor=\(fontColor):x=\(x):y=\(y)\(textBack)"
                                    filterComplex += textFilter
                                } else {
                                    let textFilter = "[video\(index)]drawtext=text='\(breakedText)':fontfile=\(fontPath):fontsize=\(fontSizeForHeight):fontcolor=\(fontColor):x=\(x):y=\(y)\(textBack)[video\(index + 1)];"
                                    filterComplex += textFilter
                                }
                            }
                            
                        }
                        
                        if let audioData = self.audioDataArray.first(where: { $0.photoIndex == mainIndex }) {
                            
                            let audioSTime = self.getSTimeAudio(index: mainIndex, secondsPhoto: Int(audioData.audioStartTime))
                            let audioETime = self.getETimeAudio(index: mainIndex, secondsPhoto: Int(audioData.audioEndTime))
                            let duration = audioData.audioEndTime - audioData.audioStartTime
                            
                            command = "-loop 1 \(inputs) -ss \(audioSTime) -to \(audioETime) -i \"\(audioData.audioURL.path)\" -filter_complex \"[0]scale=1080:trunc(ow/a/2)*2[video0];\(filterComplex)[final_video]\" -map \"[final_video]\":v -map \(audioIndex):a -c:v libx264 -t \(duration) -pix_fmt yuv420p -y \(outputURL.path)"
                            
                        } else {
                            command = "-loop 1 \(inputs) -filter_complex \"[0]scale=1080:trunc(ow/a/2)*2[video0];\(filterComplex)\" -c:v libx264 -t 5 -pix_fmt yuv420p -y \(outputURL.path)"
                        }
                    }


    


    I am not getting exact position of text in generated video as added by user. if anyone knows please help me with this.

    


  • Ffmpeg video of images in loop ?

    4 février 2024, par Daniel

    I am trying to make a video from 2 images repeating in loop :
image1.png to be shown 1.2 seconds.
Then image2.png to be shown for 3 seconds.
Video should be long 180 seconds.
png images are different resolution, image1 is smaller, image2 is 1080*1920, video should use resolution of a image2, and image1 should be shown in its original size, not stretched.

    


    ffmpeg -loop 1 -t 1.2 -i image1.png -loop 1 -t 3 -i image2.png -filter_complex "[0:v]scale=1920:1080:force_original_aspect_ratio=decrease[img1];[1:v][img1]overlay=eof_action=repeat[video]" -map "[video]" -t 180 -r 30 -y output.mp4

    


    Output is 3 seconds long and show only image1 ?

    


  • FFMPEG use audio volume as param for filters

    2 septembre 2016, par user3878395

    Can someone help me with FFMPEG’s filter_complex ? I need to use the volume from an audio channel as param for filters (logo size dependent on audio volume).

    I have this command and I need it to change size of [3:v] (logo.png) by audio volume from [2:a] (test.mp3)

    bin/ffmpeg -loop 1 -f image2 -i img.jpg -i hp.png -ss 20 -t 4 -i test.mp3 -i logo.png -filter_complex "[2:a]showwaves=s=780x140:mode=p2p,format=rgba,colorkey=black[sw];[0:v]scale=1920:-1,crop=iw:1080[bg];[bg][sw]overlay=(main_w/2-overlay_w/2):(main_h/2-overlay_h/2+200),format=yuv420p[ff];[ff][1:v]overlay=(main_w/2-overlay_w/2+30):(main_h/2-overlay_h/2-50),format=yuv420p[ff2];[ff2][3:v]overlay=(main_w/2-overlay_w/2+30):(main_h/2-overlay_h/2-50),format=yuv420p" -shortest -y -c:a aac -vcodec libx264 -strict -experimental -b:a 192k video.mp4