Recherche avancée

Médias (91)

Autres articles (59)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

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

  • Concatenating video using FFMPEG wrapper class [duplicate]

    21 décembre 2017, par alan samuel

    I am trying to concatenate video using NReco.VideoConverter wrapper class made for FFMPEG.

    I have three video files with the same frame rate and same frame size.

    Here is what I have done.

           string toconcatfile = @"C:\Users\Alan\Desktop\Black.mp4";
           string output1 = @"C:\Users\Alan\Desktop\output1.mp4";
           string output2 = @"C:\Users\Alan\Desktop\output2.mp4";
           string finaloutput = @"C:\Users\Alan\Desktop\finaloutput.mp4";

    All the three videos have a frame rate of 25 and Video frame size yet it fails when I add in toconcatfile to the final conversion method.

    It works when its just output1 and output2 meaning there must be a different setting in toconcatfile.

    Here is what I have tried.

           FFMpegConverter fFMpeg = new FFMpegConverter();


           //Slices first video
           ConvertSettings settings = new ConvertSettings
           {
               VideoFrameRate = 25,
               VideoFrameSize = FrameSize.hd480,
               MaxDuration = startcut,
               AudioSampleRate = 44100

           };

           //Slices second video
           ConvertSettings settings2 = new ConvertSettings
           {
               VideoFrameRate = 25,
               VideoFrameSize = FrameSize.hd480,
               Seek = endcut,
               AudioSampleRate = 44100

           };
           //Copies framerate and size from the previous video to the concatenation video
           ConvertSettings settings3 = new ConvertSettings
           {
               VideoFrameRate = 25,
               VideoFrameSize = FrameSize.hd480,
               MaxDuration = 4,
               AppendSilentAudioStream = true,
               AudioSampleRate = 44100

           };


     string newblack = @"C:\Users\Alan\Desktop\newblack.mp4";

           //Slice method called
           fFMpeg.ConvertMedia(pathtofile, Format.mp4, output1, Format.mp4, settings);
           fFMpeg.ConvertMedia(pathtofile, Format.mp4, output2, Format.mp4, settings2);
           fFMpeg.ConvertMedia(toconcatfile, Format.mp4, newblack, Format.mp4, settings3);

           String[] inputfiles = new String[2];
           inputfiles[0] = output1;
           inputfiles[1] = newblack;
           //inputfiles[1] = output2;


           ConcatSettings concatSettings = new ConcatSettings
           {
               //CustomOutputArgs = output1+" "+ toconcatfile+ " "+output2+ " -filter_complex \"[0:v:0][0:a:0][1:v:0][1:a:0][2:v:0][2:a:0]concat=n=3:v=1:a=1[outv][outa]\" -map \"[outv]\" - map \"[outa]\""
           };

           fFMpeg.ConcatMedia(inputfiles, finaloutput, Format.mp4, concatSettings);

    Can anyone help ?

    Edit : I get the exception message - "Invalid argument (exit code : 1)",

    Here is the output log of FFMPEG

           FFMPEG LOG ITEM - ffmpeg version 3.2.2 Copyright (c) 2000-2016 the
               FFmpeg developers
    FFMPEG LOG ITEM -   built with gcc 5.4.0 (GCC)
    FFMPEG LOG ITEM -   configuration: --enable-gpl --enable-version3 --enable-

    dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --

    enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
    FFMPEG LOG ITEM -   libavutil      55. 34.100 / 55. 34.100
    FFMPEG LOG ITEM -   libavcodec     57. 64.101 / 57. 64.101
    FFMPEG LOG ITEM -   libavformat    57. 56.100 / 57. 56.100
    FFMPEG LOG ITEM -   libavdevice    57.  1.100 / 57.  1.100
    FFMPEG LOG ITEM -   libavfilter     6. 65.100 /  6. 65.100
    FFMPEG LOG ITEM -   libswscale      4.  2.100 /  4.  2.100
    FFMPEG LOG ITEM -   libswresample   2.  3.100 /  2.  3.100
    FFMPEG LOG ITEM -   libpostproc    54.  1.100 / 54.  1.100
    FFMPEG LOG ITEM - Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\Alan\Desktop\output1.mp4':
    FFMPEG LOG ITEM -   Metadata:
    FFMPEG LOG ITEM -     major_brand     : isom
    FFMPEG LOG ITEM -     minor_version   : 512
    FFMPEG LOG ITEM -     compatible_brands: isomiso2avc1mp41
    FFMPEG LOG ITEM -     encoder         : Lavf57.56.100
    FFMPEG LOG ITEM -   Duration: 00:00:30.02, start: 0.000000, bitrate: 543 kb/s
    FFMPEG LOG ITEM -     Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 852x480 [SAR 3893:2872 DAR 276403:114880], 407 kb/s, SAR 12800:9443 DAR 320:133, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
    FFMPEG LOG ITEM -     Metadata:
    FFMPEG LOG ITEM -       handler_name    : VideoHandler
    FFMPEG LOG ITEM -     Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 129 kb/s (default)
    FFMPEG LOG ITEM -     Metadata:
    FFMPEG LOG ITEM -       handler_name    : SoundHandler
    FFMPEG LOG ITEM - Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\Alan\Desktop\newblack.mp4':
    FFMPEG LOG ITEM -   Metadata:
    FFMPEG LOG ITEM -     major_brand     : isom
    FFMPEG LOG ITEM -     minor_version   : 512
    FFMPEG LOG ITEM -     compatible_brands: isomiso2avc1mp41
    FFMPEG LOG ITEM -     encoder         : Lavf57.56.100
    FFMPEG LOG ITEM -   Duration: 00:00:04.02, start: 0.000000, bitrate: 19 kb/s
    FFMPEG LOG ITEM -     Stream #1:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 852x480 [SAR 160:213 DAR 4:3], 7 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
    FFMPEG LOG ITEM -     Metadata:
    FFMPEG LOG ITEM -       handler_name    : VideoHandler
    FFMPEG LOG ITEM -     Stream #1:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 2 kb/s (default)
    FFMPEG LOG ITEM -     Metadata:
    FFMPEG LOG ITEM -       handler_name    : SoundHandler
    FFMPEG LOG ITEM - Input #2, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\Alan\Desktop\output2.mp4':
    FFMPEG LOG ITEM -   Metadata:
    FFMPEG LOG ITEM -     major_brand     : isom
    FFMPEG LOG ITEM -     minor_version   : 512
    FFMPEG LOG ITEM -     compatible_brands: isomiso2avc1mp41
    FFMPEG LOG ITEM -     encoder         : Lavf57.56.100
    FFMPEG LOG ITEM -   Duration: 00:01:34.22, start: 0.000000, bitrate: 1058 kb/s
    FFMPEG LOG ITEM -     Stream #2:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 852x480 [SAR 3893:2872 DAR 276403:114880], 923 kb/s, SAR 12800:9443 DAR 320:133, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
    FFMPEG LOG ITEM -     Metadata:
    Exception thrown: 'NReco.VideoConverter.FFMpegException' in NReco.VideoConverter.dll
    FFMPEG LOG ITEM -       handler_name    : VideoHandler
    FFMPEG LOG ITEM -     Stream #2:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
    FFMPEG LOG ITEM -     Metadata:
    FFMPEG LOG ITEM -       handler_name    : SoundHandler
    FFMPEG LOG ITEM - [Parsed_concat_0 @ 04ded5e0] Input link in1:v0 parameters (size 852x480, SAR 160:213) do not match the corresponding output link in0:v0 parameters (852x480, SAR 12800:9443)
    FFMPEG LOG ITEM - [Parsed_concat_0 @ 04ded5e0] Failed to configure output pad on Parsed_concat_0
    FFMPEG LOG ITEM - Error configuring complex filters.
    FFMPEG LOG ITEM - Invalid argument
  • 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.

  • convert heif/heic to jpg using gpac

    3 octobre 2017, par OneSolitaryNoob

    I’m trying to convert HEIC to JPG using GPAC/MP4Box. I have been able to get small JPG "tiles" for a single HEIC file but I can’t figure out how to get one large JPG.

    Commands are like :

    % MP4Box -dump-item 1:path=tile1.hevc iphonesample.heic
    % ffmpeg -i tile1.hevc -frames:v 1 -q:v 1 -an tile1.jpg