Recherche avancée

Médias (91)

Autres articles (111)

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

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

  • XMP PHP

    13 mai 2011, par

    Dixit Wikipedia, XMP signifie :
    Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
    Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
    XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)

Sur d’autres sites (7796)

  • FFServer streaming H.264 from Logitech C920

    23 octobre 2014, par Ricardo Frederico Leote Mota

    I’m having some trouble trying to implement a web live stream from my Logitech C920 webcam w/ H.264 encoding using ffmpeg/ffserver.

    Here is the configuration file I’m using for the ffserver :

    # Port on which the server is listening. You must select a different
    # port from your standard HTTP web server if it is running on the same
    # computer.
    Port 8090

    # Address on which the server is bound. Only useful if you have
    # several network interfaces.
    BindAddress 0.0.0.0

    # Number of simultaneous HTTP connections that can be handled. It has
    # to be defined *before* the MaxClients parameter, since it defines the
    # MaxClients maximum limit.
    MaxHTTPConnections 2000

    # Number of simultaneous requests that can be handled. Since FFServer
    # is very fast, it is more likely that you will want to leave this high
    # and use MaxBandwidth, below.
    MaxClients 1000

    # This the maximum amount of kbit/sec that you are prepared to
    # consume when streaming to clients.
    MaxBandwidth 1000

    # Access log file (uses standard Apache log file format)
    # '-' is the standard output.
    CustomLog -

    ##################################################################
    # Definition of the live feeds. Each live feed contains one video
    # and/or audio sequence coming from an ffmpeg encoder or another
    # ffserver. This sequence may be encoded simultaneously with several
    # codecs at several resolutions.

    <feed>

    # You must use 'ffmpeg' to send a live feed to ffserver. In this
    # example, you can type:
    #

    File /tmp/feed.ffm
    FileMaxSize 100M

    # You could specify
    # ReadOnlyFile /saved/specialvideo.ffm
    # This marks the file as readonly and it will not be deleted or updated.

    # Only allow connections from localhost to the feed.
    ACL allow 127.0.0.1

    </feed>


    ##################################################################
    # Now you can define each stream which will be generated from the
    # original audio and video stream. Each format has a filename (here
    # 'test1.mpg'). FFServer will send this stream when answering a
    # request containing this filename.

    <stream>

    Feed feed.ffm
    Format mp4

    # Audio settings
    NoAudio

    # Video Settings
    #VideoSize 1280x720                      # Video resolution
    #VideoFrameRate 30                      # Video FPS
    #AVOptionVideo flags +global_header          # Parameters passed to encoder
    #AVOptionVideo cpu-used 0
    #AVOptionVideo qmin 10
    #AVOptionVideo qmax 42
    #AVOptionVideo quality good
    PreRoll 0
    StartSendOnKey
    #VideoBitRate 400                      # Video bitrate

    </stream>

    # Server status

    <stream>
    Format status

    # Only allow local people to get the status
    ACL allow localhost
    ACL allow 192.168.0.0 192.168.255.255

    </stream>


    # Redirect index.html to the appropriate site

    And here is the command I’m issuing through the command line and the respective output :

    ffmpeg -s 1280x720 -f video4linux2 -r 30 -vcodec h264 -re -i /dev/video0 -copyinkf -codec copy h**p://localhost:8090/feed.ffm
    ffmpeg version N-67036-g04a4fb8 Copyright (c) 2000-2014 the FFmpeg developers
     built on Oct 20 2014 17:39:50 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
     configuration: --enable-gpl --enable-libx264
     libavutil      54. 10.100 / 54. 10.100
     libavcodec     56.  8.102 / 56.  8.102
     libavformat    56.  9.101 / 56.  9.101
     libavdevice    56.  1.100 / 56.  1.100
     libavfilter     5.  2.100 /  5.  2.100
     libswscale      3.  1.101 /  3.  1.101
     libswresample   1.  1.100 /  1.  1.100
     libpostproc    53.  3.100 / 53.  3.100
    Input #0, video4linux2,v4l2, from '/dev/video0':
     Duration: N/A, start: 12614.859199, bitrate: N/A
       Stream #0:0: Video: h264 (Constrained Baseline), yuvj420p(pc), 1280x720 [SAR 1:1 DAR 16:9], -5 kb/s, 30 fps, 30 tbr, 1000k tbn, 60 tbc
    Output #0, ffm, to 'h**p://localhost:8090/feed.ffm':
     Metadata:
       creation_time   : now
       encoder         : Lavf56.9.101
       Stream #0:0: Video: h264, yuvj420p, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, -5 kb/s, 30 fps, 1000k tbn, 30 tbc
    Stream mapping:
     Stream #0:0 -> #0:0 (copy)
    Press [q] to stop, [?] for help
    [ffm @ 0x28c7ea0] Non-monotonous DTS in output stream 0:0; previous: 0, current: -166263; changing to 1. This may result in incorrect timestamps in the output file.
    [ffm @ 0x28c7ea0] Non-monotonous DTS in output stream 0:0; previous: 1, current: -134365; changing to 2. This may result in incorrect timestamps in the output file.
    [ffm @ 0x28c7ea0] Non-monotonous DTS in output stream 0:0; previous: 2, current: -102381; changing to 3. This may result in incorrect timestamps in the output file.
    [ffm @ 0x28c7ea0] Non-monotonous DTS in output stream 0:0; previous: 3, current: -66434; changing to 4. This may result in incorrect timestamps in the output file.
    [ffm @ 0x28c7ea0] Non-monotonous DTS in output stream 0:0; previous: 4, current: -34548; changing to 5. This may result in incorrect timestamps in the output file.
    [ffm @ 0x28c7ea0] Non-monotonous DTS in output stream 0:0; previous: 5, current: -2645; changing to 6. This may result in incorrect timestamps in the output file.
    [ffm @ 0x28c7ea0] Non-monotonous DTS in output stream 0:0; previous: 232857, current: 138514; changing to 232858. This may result in incorrect timestamps in the output file.
    [ffm @ 0x28c7ea0] Non-monotonous DTS in output stream 0:0; previous: 232858, current: 167942; changing to 232859. This may result in incorrect timestamps in the output file.
    [ffm @ 0x28c7ea0] Non-monotonous DTS in output stream 0:0; previous: 232859, current: 197415; changing to 232860. This may result in incorrect timestamps in the output file.
    [ffm @ 0x28c7ea0] Non-monotonous DTS in output stream 0:0; previous: 232860, current: 227037; changing to 232861. This may result in incorrect timestamps in the output file.
    [ffm @ 0x28c7ea0] Non-monotonous DTS in output stream 0:0; previous: 997959, current: 938599; changing to 997960. This may result in incorrect timestamps in the output file.
    [ffm @ 0x28c7ea0] Non-monotonous DTS in output stream 0:0; previous: 997960, current: 995052; changing to 997961. This may result in incorrect timestamps in the output file.
    [ffm @ 0x28c7ea0] Non-monotonous DTS in output stream 0:0; previous: 1240745, current: 1232841; changing to 1240746. This may result in incorrect timestamps in the output file.
    [ffm @ 0x28c7ea0] Non-monotonous DTS in output stream 0:0; previous: 1293561, current: 1282157; changing to 1293562. This may result in incorrect timestamps in the output file.
    frame=   69 fps= 34 q=-1.0 Lsize=     912kB time=00:00:02.01 bitrate=3702.1kbits/s

    When I try to play the stream with VLC for example - vlc h**p ://localhost:8090/stream.mp4 - i get the following error :

    [00007f5234003948] core stream error : cannot pre fill buffer

    And I can’t watch the stream on the web browser side also.

    Could someone give me an hint on this ?

    Many thanks and your help is much appreciated ! ;)

  • Incorrect Codec Parameters, Could not write header for output file : FFMPEG - Android

    26 septembre 2016, par Salmaan

    Why do I get Incorrect Codec Parameters....???
    I am creating video using Android MediaRecorder, use FFMPEG over it to trim it.
    I am just trying to trim the video using FFMPEG.

    String[] ffmpegCommand = {
                       "/data/data/uk.org.humanfocus.hfi/ffmpeg",
                        "-ss",
                        "00:00:00",
                        "-i",
                        path,  // string variable, path of file
                        "-t",
                        "00:00:05", // duration of video
                        "-c",
                        "copy",
                        destination + "/trimmmmm.mp4" }; // string

    This is log I get..
    It is from starting of FFMPEG processing until it ends.

    10-24 18:02:06.039: V/ss(22093): ***Starting FFMPEG***
    10-24 18:02:06.144: V/asd(22093): ***ffmpeg version N-63700-gbf0e5ac Copyright (c) 2000-2014 the FFmpeg developers***
    10-24 18:02:06.144: V/asd(22093): ***  built on Jun  3 2014 13:27:45 with gcc 4.8 (GCC)***
    10-24 18:02:06.144: V/asd(22093): ***  configuration: --prefix=/Users/aliasa/Downloads/android-ndk-r9/sources/ffmpeg/android/arm --enable-shared --disable-static --disable-doc --disable-ffplay --disable-ffprobe --disable-ffserver --disable-avdevice --disable-doc --disable-symver --cross-prefix=/Users/aliasa/Downloads/android-ndk-r9/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/bin/arm-linux-androideabi- --target-os=linux --arch=arm --enable-cross-compile --sysroot=/Users/aliasa/Downloads/android-ndk-r9/platforms/android-9/arch-arm/ --extra-cflags='-Os -fpic -marm' --extra-ldflags=***
    10-24 18:02:06.149: V/asd(22093): ***  libavutil      52. 89.100 / 52. 89.100***
    10-24 18:02:06.149: V/asd(22093): ***  libavcodec     55. 66.100 / 55. 66.100***
    10-24 18:02:06.149: V/asd(22093): ***  libavformat    55. 42.100 / 55. 42.100***
    10-24 18:02:06.149: V/asd(22093): ***  libavfilter     4.  5.100 /  4.  5.100***
    10-24 18:02:06.149: V/asd(22093): ***  libswscale      2.  6.100 /  2.  6.100***
    10-24 18:02:06.149: V/asd(22093): ***  libswresample   0. 19.100 /  0. 19.100***
    10-24 18:02:06.289: V/asd(22093): ***Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/copymade.mp4':***
    10-24 18:02:06.289: V/asd(22093): ***  Metadata:***
    10-24 18:02:06.289: V/asd(22093): ***    major_brand     : isom***
    10-24 18:02:06.289: V/asd(22093): ***    minor_version   : 0***
    10-24 18:02:06.289: V/asd(22093): ***    compatible_brands: isom3gp4***
    10-24 18:02:06.289: V/asd(22093): ***    creation_time   : 2014-10-24 12:25:55***
    10-24 18:02:06.294: V/asd(22093): ***  Duration: 00:00:11.65, start: 0.000000, bitrate: 3147 kb/s***
    10-24 18:02:06.294: V/asd(22093): ***    Stream #0:0(eng): Video: h263 (s263 / 0x33363273), yuv420p, 720x480 [SAR 12:11 DAR 18:11], 3276 kb/s, 16.61 fps, 16.67 tbr, 90k tbn, 29.97 tbc (default)***
    10-24 18:02:06.294: V/asd(22093): ***    Metadata:***
    10-24 18:02:06.294: V/asd(22093): ***      creation_time   : 2014-10-24 12:25:55***
    10-24 18:02:06.294: V/asd(22093): ***      handler_name    : VideoHandle***
    10-24 18:02:06.294: V/asd(22093): ***    Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 8000 Hz, mono, fltp, 12 kb/s (default)***
    10-24 18:02:06.294: V/asd(22093): ***    Metadata:***
    10-24 18:02:06.294: V/asd(22093): ***      creation_time   : 2014-10-24 12:25:55***
    10-24 18:02:06.294: V/asd(22093): ***      handler_name    : SoundHandle***
    10-24 18:02:06.294: V/asd(22093): ***[mp4 @ 0x50ce0] Could not find tag for codec h263 in stream #0, codec not currently supported in container***
    10-24 18:02:06.294: V/asd(22093): ***Output #0, mp4, to '/storage/emulated/0/trimmmmm.mp4':***
    10-24 18:02:06.294: V/asd(22093): ***  Metadata:***
    10-24 18:02:06.294: V/asd(22093): ***    major_brand     : isom***
    10-24 18:02:06.294: V/asd(22093): ***    minor_version   : 0***
    10-24 18:02:06.294: V/asd(22093): ***    compatible_brands: isom3gp4***
    10-24 18:02:06.294: V/asd(22093): ***    encoder         : Lavf55.42.100***
    10-24 18:02:06.294: V/asd(22093): ***    Stream #0:0(eng): Video: h263 (s263 / 0x33363273), yuv420p, 720x480 [SAR 12:11 DAR 18:11], q=2-31, 3276 kb/s, 16.61 fps, 90k tbn, 90k tbc (default)***
    10-24 18:02:06.294: V/asd(22093): ***    Metadata:***
    10-24 18:02:06.294: V/asd(22093): ***      creation_time   : 2014-10-24 12:25:55***
    10-24 18:02:06.294: V/asd(22093): ***      handler_name    : VideoHandle***
    10-24 18:02:06.294: V/asd(22093): ***    Stream #0:1(eng): Audio: aac ([64][0][0][0] / 0x0040), 8000 Hz, mono, 12 kb/s (default)***
    10-24 18:02:06.294: V/asd(22093): ***    Metadata:***
    10-24 18:02:06.294: V/asd(22093): ***      creation_time   : 2014-10-24 12:25:55***
    10-24 18:02:06.299: V/asd(22093): ***      handler_name    : SoundHandle***
    10-24 18:02:06.299: V/asd(22093): ***Stream mapping:***
    10-24 18:02:06.299: V/asd(22093): ***  Stream #0:0 -> #0:0 (copy)***
    10-24 18:02:06.299: V/asd(22093): ***  Stream #0:1 -> #0:1 (copy)***
    10-24 18:02:06.299: V/asd(22093): ***Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument***
    10-24 18:02:06.299: V/asdas(22093): ***Ending FFMPEG***

    I am badly stuck here from 2 3 days, please help me out.

  • How to make your plugin multilingual – Introducing the Piwik Platform

    29 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 Generating test data – Introducing the Piwik Platform). This time you’ll learn how to equip your plugin with translations. Users of your plugin will be very thankful that they can use and translate the plugin in their language !

    Getting started

    In this post, we assume that you have already set up your development environment and created a plugin. If not, visit the Piwik Developer Zone where you’ll find the tutorial Setting up Piwik and other Guides that help you to develop a plugin.

    Managing translations

    Piwik is available in over 50 languages and comes with many translations. The core itself provides some basic translations for words like “Visitor” and “Help”. They are stored in the directory /lang. In addition, each plugin can provide its own translations for wordings that are used in this plugin. They are located in /plugins/*/lang. In those directories you’ll find one JSON file for each language. Each language file consists in turn of tokens that belong to a group.

    {
       "MyPlugin":{
           "BlogPost": "Blog post",
           "MyToken": "My translation",
           "InteractionRate": "Interaction Rate"
       }
    }

    A group usually represents the name of a plugin, in this case “MyPlugin”. Within this group, all the tokens are listed on the left side and the related translations on the right side.

    Building a translation key

    As you will later see to actually translate a word or a sentence you’ll need to know the corresponding translation key. This key is built by combining a group and a token separated by an underscore. You can for instance use the key MyPlugin_BlogPost to get a translation of “Blog post”. Defining a new key is as easy as adding a new entry to the “MyPlugin” group.

    Providing default translations

    If a translation cannot be found then the English translation will be used as a default. Therefore, you should always provide a default translation in English for all keys in the file en.json (ie, /plugins/MyPlugin/lang/en.json).

    Adding translations for other languages

    This is as easy as creating new files in the lang subdirectory of your plugin. The filename consists of a 2 letter ISO 639-1 language code completed by the extension .json. This means German translations go into a file named de.json, French ones into a file named fr.json. To see a list of languages you can use have a look at the /lang directory.

    Reusing translations

    As mentioned Piwik comes with quite a lot of translations. You can and should reuse them but you are supposed to be aware that a translation key might be removed or renamed in the future. It is also possible that a translation key was added in a recent version and therefore is not available in older versions of Piwik. We do not currently announce any of such changes. Still, 99% of the translation keys do not change and it is therefore usually a good idea to reuse existing translations. Especially when you or your company would otherwise not be able to provide them. To find any existing translation keys go to Settings => Translation search in your Piwik installation. The menu item will only appear if the development mode is enabled.

    Translations in PHP

    Use the Piwik::translate() function to translate any text in PHP. Simply pass any existing translation key and you will get the translated text in the language of the current user in return. The English translation will be returned in case none for the current language exists.

    $translatedText = Piwik::translate('MyPlugin_BlogPost');

    Translations in Twig Templates

    To translate text in Twig templates, use the translate filter.

    {{ 'MyPlugin_BlogPost'|translate }}

    Contributing translations to Piwik

    Did you know you can contribute translations to Piwik ? In case you want to improve an existing translation, translate a missing one or add a new language go to Piwik Translations and sign up for an account. You won’t need any knowledge in development to do this.

    Advanced features

    Of course there are more useful things you can do with translations. For instance you can use placeholders like %s in your translations and you can use translations in JavaScript as well. In case you want to know more about those topics check out our Internationalization guide. Currently, this guide only covers translations but we will cover more topics like formatting numbers and handling currencies in the future.

    Congratulations, you have learnt how to make your plugin multilingual !

    If you have any feedback regarding our APIs or our guides in the Developer Zone feel free to send it to us.