Recherche avancée

Médias (0)

Mot : - Tags -/organisation

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (46)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • Soumettre améliorations et plugins supplémentaires

    10 avril 2011

    Si vous avez développé une nouvelle extension permettant d’ajouter une ou plusieurs fonctionnalités utiles à MediaSPIP, faites le nous savoir et son intégration dans la distribution officielle sera envisagée.
    Vous pouvez utiliser la liste de discussion de développement afin de le faire savoir ou demander de l’aide quant à la réalisation de ce plugin. MediaSPIP étant basé sur SPIP, il est également possible d’utiliser le liste de discussion SPIP-zone de SPIP pour (...)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

Sur d’autres sites (9001)

  • FFmpeg doesn't work on android 10, goes strait to onFailure(String message) with empty message

    18 janvier 2020, par nolanic

    I’m using FFmpeg in one of my projects for video compression. On Android 10 (Google Pixel 3a), it goes straight to onFailure(String message) with empty message for any command sent for execution.

    so I have (api ’com.writingminds:FFmpegAndroid:0.3.2’) specified in my app gradle file,

    permission (android.permission.WRITE_EXTERNAL_STORAGE) in the manifest is specified

    So I do :

    InitializationCallback initializationCallback = new InitializationCallback();
       try {
           FFmpeg.getInstance(context).loadBinary(initializationCallback);
       } catch (FFmpegNotSupportedException e) {
           initializationCallback.onFailure();
           initializationCallback.onFinish();
       }

    Initializes just fine, no problems here.

    Later :

    void getData(File inputFile) {
    //inputFile points to: /storage/emulated/0/Android/data/{package_name}/files/temp_files/temp_1.mp4
           String[] cmd = ("-i " + inputFile.getAbsolutePath()).split(" ");
           try {
               FFmpeg.getInstance(App.instance).execute(cmd, this);
           } catch (FFmpegCommandAlreadyRunningException e) {
               throw new Error(e);
           }
       }

       @Override
       public void onStart() {
            //This method is called
       }

       @Override
       public void onSuccess(String message) {
            //This method is NOT called
            extractAvailableData(message);
       }

       @Override
       public void onProgress(String message) {
           //This method is NOT called
           extractAvailableData(message);
       }

       @Override
       public void onFailure(String message) {
           //This method is called and the message is empty
           extractAvailableData(message);
       }

       @Override
       public void onFinish() {
           //This method is called
       }

    If I do something like :

    String command = "-i ***/file1.mp4 -map 0:v -map 0:a -preset ultrafast -s:v 750:350 ***/file2.mp4";
    //file2.mp4 is a non existent file at this point
    // (***) --> is just a replacement for the full path of the file, just to keep things shorter here.

    String[] cmd = command.split(" ");
           try {
               FFmpeg.getInstance(App.instance).execute(cmd, this);
           } catch (FFmpegCommandAlreadyRunningException e) {
               throw new Error(e);
           }

    gives the same result, no video conversion, just a call to onFailure("Nothing")

    Even if I do :

    String[] cmd = {"-version"};
           try {
               FFmpeg.getInstance(App.instance).execute(cmd, this);
           } catch (FFmpegCommandAlreadyRunningException e) {
               throw new Error(e);
           }

    I get nothing, no output at all.

    I encountered this issue only on Android 10 so far, it works fine on other devices.

  • ffmpeg not reading string correctly in Swift MacOS app

    21 octobre 2019, par NCrusher

    I’m so close to having a working app that does a simple audio conversion calling ffmpeg but I’m stuck on what appears to be the silliest error.

    in the Console, ffmpeg prints the following error when I try to run the conversion :

    "Unrecognized option ’c copy’. Error splitting the argument list :
    Option not found"

    Which is strange because that’s not the argument I’m giving it. My method for producing the string it’s getting its argument from is as follows :

    func conversionSelection() {
       if inputFileUrl != nil {
           let conversionChoice = conversionOptionsPopup.indexOfSelectedItem
           switch conversionChoice {
               case 1 :
                   outputExtension = ".mp3"
                   ffmpegFilters = "-c:a libmp3lame -ac 1 -ar 22050 -q:a 9"
               case 2 :
                   outputExtension = ".mp3"
                   ffmpegFilters = "-c:a libmp3lame -ac 2 -ar 44100 -q:a 5"
               case 3 :
                   outputExtension = ".mp3"
                   ffmpegFilters = "-c:a libmp3lame -ac 1 -ar 22050 -b:a 32k"
               case 4:
                   outputExtension = ".flac"
                   ffmpegFilters = "-c:a flac"
               default :
                   outputExtension = ".m4b"
                   ffmpegFilters = "-c copy"
           }
       }
    }

    Then the code I use to launch ffmpeg is as follows :

    func ffmpegConvert(inputPath: String, filters: String, outputPath: String) {
       guard let launchPath = Bundle.main.path(forResource: "ffmpeg", ofType: "") else { return }
       do {
           let compressTask: Process = Process()
           compressTask.launchPath = launchPath
           compressTask.arguments = [
               "-y",
               "-i", inputPath,
               filters,
               outputPath
           ]
           compressTask.standardInput = FileHandle.nullDevice
           compressTask.launch()
           compressTask.waitUntilExit()

       }
    }

    Which I call when my "Start Conversion" button is clicked :

    @IBAction func startConversionClicked(_ sender: Any) {
       ffmpegConvert(inputPath: inputFilePath, filters: ffmpegFilters, outputPath: outputFilePath)
    }

    (inputFilePath and outputFilePath are strings obviously generated by other methods which appear to be working fine.)

    So it appears the only obstacle to my having a working app here is that for some reason, I’m losing that hyphen at the start of the ffmpegFilters string.

    How is that happening and what do I need to do to fix it ?

    EDIT : Having tried the basic script I’m trying to create in XCode from the Terminal, I realized I’d forgotten to take into account the fact that paths with spaces in them need to have the spaces converted to "\ ". So that may actually be the cause and the error is misleading ? Which is strange because ffmpeg gives me the exact error in Terminal so maybe not ?

    FURTHER EDIT : Upon further experimentation, I discovered it would recognize the hyphen at the beginning of the argument string as long as I used two hyphens—which I should have realized sooner because duh, mathematical operator, just like && and ==.

    But it’s still telling me Unrecognized option '-c copy' which really makes no sense, because "-c copy" is definitely a valid ffmpeg argument.

    I tried converting the file paths with the .addingPercentEncoding option, and it was still giving me the error about the argument rather than saying the file/directory being invalid, so either XCode was already passing a perfectly formatted file path string to ffmpeg, or ffmpeg is too busy complaining about the invalid argument to get around to telling me I have an invalid path.

    AND A STILL FURTHER EDIT : I’m still battering my head against this issue, because I’m convinced it’s going to be something stupid and minor. I’m just throwing things at the wall and seeing what sticks.

    I put a whitespace at the beginning of the arguments string inside my quotes for the filters argument (so it reads " -c copy" instead of "-c copy") and that seemed to make a little headway. It actually read the metadata of my input file before telling me :

    Unable to find a suitable output format for ’ -c copy’
    -c copy : Invalid argument

    Which suggests to me that the issue is that the method for stringing together all the strings might not be either putting (or not putting ?) whitespace between the adjacent strings where appropriate ?

    Because of course a whitespace needs to go between the inputFilePath string and the ffmpegFilters string. A whitespace also needs to go between the ffmpegFilters string and the outputFilePath string, but NOT between the individual components comprising the output string.

    If that’s the issue, it’s actually going to a little tough to troubleshoot at my current level of understanding, because the output path is composed of different components derived from different methods.

    This is the method I use to pull it all together, which yields a string that gets displayed in a text field, and also provides the outputFilePath I use in the ffmpegConvert process.

    func updateOutputText(outputString: String, outputField: NSTextField) {
       if inputFileUrl != nil && outputDirectoryUrl == nil {
           // derive output path and filename from input and tack on a new extension if a different output format is chosen
           let outputFileUrl = inputFileUrl!.deletingPathExtension()
           let outputPath = outputFileUrl.path
           outputFilePath = outputPath + "\(outputExtension)"
       } else if   inputFileUrl != nil && outputDirectoryUrl != nil {
           // derive output directory from outputBrowseButton action, derive filename from input file, and derive output extension from conversion format selection
           let outputFile = inputFileUrl!.deletingPathExtension()
           let outputFilename = outputFile.lastPathComponent
           let outputDirectory = outputDirectoryPath
           outputFilePath = outputDirectory + "/" + outputFilename + "\(outputExtension)"
       }
       outputTextDisplay.stringValue = outputFilePath
    }

    From the error ffmpeg kicked back this time, either there’s NOT a space between the ffmpegFilters string and the outputFilePath string, or there IS an unwanted space between the outputFilename and "\(outputExtension)" components of the outputFilePath string.

    And it’s such a strangely put together string that I’m not sure what to do if that’s the case.

  • avformat/mpjpegdec : fix strict boundary search string

    7 octobre 2019, par Moritz Barsnick
    avformat/mpjpegdec : fix strict boundary search string
    

    According to RFC1341, the multipart boundary indicated by the
    Content-Type header must be prepended by CRLF + "—", and followed
    by CRLF. In the case of strict MIME header boundary handling, the
    "—" was forgotten to add.

    Fixes trac #7921.

    A side effect is that this coincidentally breaks enforcement of
    strict MIME headers against servers running motion < 3.4.1, where
    the boundary announcement in the HTTP headers incorrectly used the
    prefix "—", which exactly matched this bug's behavior.

    Signed-off-by : Moritz Barsnick <barsnick@gmx.net>
    Reviewed-by : Paul B Mahol <onemda@gmail.com>
    Signed-off-by : Michael Niedermayer <michael@niedermayer.cc>

    • [DH] libavformat/mpjpegdec.c