Recherche avancée

Médias (1)

Mot : - Tags -/iphone

Autres articles (25)

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP 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 (...)

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

Sur d’autres sites (7165)

  • How to create a command – Introducing the Piwik Platform

    2 octobre 2014, par Thomas Steur — Development

    This is the next post of our blog series where we introduce the capabilities of the Piwik platform (our previous post was How to publish your plugin or theme on the Piwik Marketplace). This time you’ll learn how to create a new command. For this tutorial you will need to have basic knowledge of PHP.

    What is a command ?

    A command can execute any task on the command line. Piwik provides currently about 50 commands via the Piwik Console. These commands let you start the archiver, change the number of available custom variables, enable the developer mode, clear caches, run tests and more. You could write your own command to sync users or websites with another system for instance.

    Getting started

    In this series of posts, we assume that you have already set up your development environment. If not, visit the Piwik Developer Zone where you’ll find the tutorial Setting up Piwik.

    To summarize the things you have to do to get setup :

    • Install Piwik (for instance via git).
    • Activate the developer mode : ./console development:enable --full.
    • Generate a plugin : ./console generate:plugin --name="MyCommandPlugin". There should now be a folder plugins/MyCommandPlugin.
    • And activate the created plugin under Settings => Plugins.

    Let’s start creating a command

    We start by using the Piwik Console to create a new command. As you can see there is even a command that lets you easily create a new command :

    ./console generate:command

    The command will ask you to enter the name of the plugin the created command should belong to. I will simply use the above chosen plugin name “MyCommandPlugin”. It will ask you for a command name as well. I will use “SyncUsers” in this example. There should now be a file plugins/MyCommandPlugin/Commands/Syncusers.php which contains already an example to get you started easily :

    1. class Syncusers extends ConsoleCommand
    2. {
    3.     protected function configure()
    4.     {
    5.         $this->setName('mycommandplugin:syncusers');
    6.         $this->setDescription('MyCommandPlugin');
    7.         $this->addOption('name', null, InputOption::VALUE_REQUIRED, 'Your name:');
    8.     }
    9.  
    10.     /**
    11.      * Execute command like: ./console mycommandplugin:syncusers --name="The Piwik Team"
    12.      */
    13.     protected function execute(InputInterface $input, OutputInterface $output)
    14.     {
    15.         $name    = $input->getOption('name');
    16.  
    17.         $message = sprintf('Syncusers: %s', $name);
    18.  
    19.         $output->writeln($message);
    20.     }
    21. }

    Télécharger

    Any command that is placed in the “Commands” folder of your plugin will be available on the command line automatically. Therefore, the newly created command can now be executed via ./console mycommandplugin:syncusers --name="The Piwik Team".

    The code template explained

    1. protected function configure()
    2. {
    3.     $this->setName('mycommandplugin:checkdatabase');
    4.     $this->setDescription('MyCommandPlugin');
    5.     $this->addOption('name', null, InputOption::VALUE_REQUIRED, 'Your name:');
    6. }

    Télécharger

    As the name says the method configure lets you configure your command. You can define the name and description of your command as well as all the options and arguments you expect when executing it.

    1. protected function execute(InputInterface $input, OutputInterface $output)
    2. {
    3.     $name    = $input->getOption('name');
    4.     $message = sprintf('Syncusers: %s', $name);
    5.     $output->writeln($message);
    6. }

    Télécharger

    The actual task is defined in the execute method. There you can access any option or argument that was defined on the command line via $input and write anything to the console via $output argument.

    In case anything went wrong during the execution you should throw an exception to make sure the user will get a useful error message. Throwing an exception when an error occurs will make sure the command does exit with a status code different than 0 which can sometimes be important.

    Advanced features

    The Piwik Console is based on the powerful Symfony Console component. For instance you can ask a user for any interactive input, you can use different output color schemes and much more. If you are interested in learning more all those features have a look at the Symfony console website.

    How to test a command

    After you have created a command you are surely wondering how to test it. Ideally, the actual command is quite short as it acts like a controller. It should only receive the input values, execute the task by calling a method of another class and output any useful information. This allows you to easily create a unit or integration test for the classes behind the command. We will cover this topic in one of our future blog posts. Just one hint : You can use another command ./console generate:test to create a test. If you want to know how to test a command have a look at the Testing Commands documentation.

    Publishing your Plugin on the Marketplace

    In case you want to share your commands with other Piwik users you can do this by pushing your plugin to a public GitHub repository and creating a tag. Easy as that. Read more about how to distribute a plugin and best practices when publishing a plugin.

    Isn’t it easy to create a command ? We never even created a file ! If you have any feedback regarding our APIs or our guides in the Developer Zone feel free to send it to us.

  • avcodec : Remove libstagefright

    3 janvier 2016, par Derek Buitenhuis
    avcodec : Remove libstagefright
    

    It serves absolutely no purpose other than to confuse potentional
    Android developers about how to use hardware acceleration properly
    on the the platform. The stagefright "API" is not public, and the
    MediaCodec API is the proper way to do this.

    Furthermore, stagefright support in avcodec needs a series of
    magic incantations and version-specific stuff, such that
    using it actually provides downsides compared just using the actual
    Android frameworks properly, in that it is a lot more work and confusion
    to get it even running. It also leads to a lot of misinformation, like
    these sorts of comments (in [1]) that are absolutely incorrect.

    [1] http://stackoverflow.com/a/29362353/3115956

    Signed-off-by : Derek Buitenhuis <derek.buitenhuis@gmail.com>

    • [DH] Changelog
    • [DH] MAINTAINERS
    • [DH] configure
    • [DH] libavcodec/Makefile
    • [DH] libavcodec/allcodecs.c
    • [DH] libavcodec/libstagefright.cpp
    • [DH] libavcodec/version.h
    • [DH] tools/build_libstagefright
  • Swift Process Fails to Properly Send Metadata Args to FFMPEG

    30 avril 2019, par Ryan Stone

    I’m writing a Swift Process that concatenates a series of audio files using FFMPEG and libfdk_aac. The concatenation works, but when I pass metadata information through the process I get a Unrecognized option 'metadata artist="ff"' ... Option not found error.

    When debugging, if I use a breakpoint and print using e print(args.joined(separator: " ")) I’m able to take the exact output and paste it in the console, FFMPEG runs and doesn’t throw an error.

    I’m assuming there’s an oddity with how Swift process works, but even there I’ve tested and I’m stumped. I created a ruby script that took the args and looped over them and printed them and there is nothing given to the script that is unexpected. (Output below)

    Swift Process

    private func export() {
           guard let ffmpegPath = Bundle.main.path(forResource: "ffmpeg", ofType: "") else { return }


           var task = Process()
           task.launchPath = ffmpegPath

           let args: [String] = [
               "-i",
               #"concat:"\#(fileContents)""#,
               title(),
               artist(),
               narrator(),
               "-c:a",
               "libfdk_aac",
               "-vn",
               #"\#(exportPath)\#(exportFilename)"#
           ].compactMap { $0 }

           task.arguments = args

           var pipe = Pipe()
           setStdErrPipe(pipe: &amp;pipe, task: &amp;task)
           setTerminationNotification(task: task)

           task.launch()
       }

       func title() -> String? {
           guard metadata.titleText != "" else {
               return nil
           }
           return #"-metadata title="\#(metadata.titleText)""#
       }

       func artist() -> String? {
           guard metadata.authorText != "" else { return nil }
           return #"-metadata artist="\#(metadata.authorText)""#
       }

       func narrator() -> String? {
           guard metadata.narratorText != "" else { return nil }
           return #"-metadata album_artist="\#(metadata.narratorText)""#
       }

    Arg tester Output

    -i
    concat:"/Users/sharkmaul/Downloads/Bringing Up BÈbÈ/Bringing Up BÈbÈ-Part01.mp3|/Users/sharkmaul/Downloads/Bringing Up BÈbÈ/Bringing Up BÈbÈ-Part02.mp3"
    -metadata title="title"
    -metadata artist="author"
    -metadata album_artist="narrator"
    -c:a
    libfdk_aac
    -vn
    /Users/sharkmaul/Desktop/068F4F43-89EE-47F6-838D-7AD3E02E7F8A.m4a