Recherche avancée

Médias (91)

Autres articles (95)

  • Contribute to a better visual interface

    13 avril 2011

    MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
    Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.

  • Configuration spécifique pour PHP5

    4 février 2011, par

    PHP5 est obligatoire, vous pouvez l’installer en suivant ce tutoriel spécifique.
    Il est recommandé dans un premier temps de désactiver le safe_mode, cependant, s’il est correctement configuré et que les binaires nécessaires sont accessibles, MediaSPIP devrait fonctionner correctement avec le safe_mode activé.
    Modules spécifiques
    Il est nécessaire d’installer certains modules PHP spécifiques, via le gestionnaire de paquet de votre distribution ou manuellement : php5-mysql pour la connectivité avec la (...)

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

Sur d’autres sites (6204)

  • Why storage access functions not working on android 10 API-29 ? error=13, Permission denied ?

    8 janvier 2021, par Rpatel
    


    This example code is to create video from images and music.
Code running on till API level 28 but when I just upgrade to
Build version 29 then it starts crashing. I tried the most solution
but could not find the proper reason and solution.
    
Please let me know...

    


    


    2

    


    021-01-08 19:48:16.045 18413-19578/com.example.photovideomaker E/audio: io&#xA;    java.io.IOException: Cannot run program "/data/user/0/com.example.photovideomaker/files/ffmpeg": error=13, Permission denied&#xA;        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1050)&#xA;        at java.lang.Runtime.exec(Runtime.java:698)&#xA;        at java.lang.Runtime.exec(Runtime.java:563)&#xA;        at com.example.photovideomaker.service.CreateVideoService.joinAudio(CreateVideoService.java:252)&#xA;        at com.example.photovideomaker.service.CreateVideoService.createVideo(CreateVideoService.java:89)&#xA;        at com.example.photovideomaker.service.CreateVideoService.onHandleIntent(CreateVideoService.java:83)&#xA;        at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:78)&#xA;        at android.os.Handler.dispatchMessage(Handler.java:107)&#xA;        at android.os.Looper.loop(Looper.java:214)&#xA;        at android.os.HandlerThread.run(HandlerThread.java:67)&#xA;     Caused by: java.io.IOException: error=13, Permission denied&#xA;        at java.lang.UNIXProcess.forkAndExec(Native Method)&#xA;        at java.lang.UNIXProcess.<init>(UNIXProcess.java:133)&#xA;        at java.lang.ProcessImpl.start(ProcessImpl.java:141)&#xA;        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)&#xA;        at java.lang.Runtime.exec(Runtime.java:698)&#xA0;&#xA;        at java.lang.Runtime.exec(Runtime.java:563)&#xA0;&#xA;        at com.example.photovideomaker.service.CreateVideoService.joinAudio(CreateVideoService.java:252)&#xA0;&#xA;        at com.example.photovideomaker.service.CreateVideoService.createVideo(CreateVideoService.java:89)&#xA0;&#xA;        at com.example.photovideomaker.service.CreateVideoService.onHandleIntent(CreateVideoService.java:83)&#xA0;&#xA;        at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:78)&#xA0;&#xA;        at android.os.Handler.dispatchMessage(Handler.java:107)&#xA0;&#xA;        at android.os.Looper.loop(Looper.java:214)&#xA0;&#xA;        at android.os.HandlerThread.run(HandlerThread.java:67)&#xA0;&#xA;</init>

    &#xA;

    &#xA;

    This function throwing the error "On Process.runtime"

    &#xA;

    &#xA;

    private void createVideo() {&#xA;        long startTime = System.currentTimeMillis();&#xA;        toatalSecond = (application.getSecond() * ((float) application.getSelectedImages().size())) - DEFAULT_FONT_SCALE;&#xA;        joinAudio();&#xA;        while (true) {&#xA;            if (ImageCreatorService.isImageComplate) {&#xA;                Log.e("image creation ", " complte");&#xA;&#xA;                break;&#xA;            }else {&#xA;                Log.e("image creation ", "not complte");&#xA;            }&#xA;        }&#xA;        Log.e("createVideo", "video create start");&#xA;        new File(FileUtils.TEMP_DIRECTORY, "video.txt").delete();&#xA;        for (int i = 0; i &lt; application.videoImages.size(); i&#x2B;&#x2B;) {&#xA;            appendVideoLog(String.format("file &#x27;%s&#x27;", application.videoImages.get(i)));&#xA;        }&#xA;&#xA;        File r0=new File(FileUtils.TEMP_DIRECTORY, "video.txt");&#xA;        String videoPath = new File(FileUtils.APP_DIRECTORY, getVideoName()).getAbsolutePath();&#xA;        String[] inputCode = application.getMusicData() != null ? new String[]{&#xA;                FileUtils.getFFmpeg(this), "-r",&#xA;                String.valueOf(BitmapDescriptorFactory.HUE_ORANGE / application.getSecond()),&#xA;                "-f", "concat", "-safe", "0", "-i", r0.getAbsolutePath(), "-i",&#xA;                audioFile.getAbsolutePath(), "-strict", "experimental", "-r", "30",&#xA;                "-t", String.valueOf(toatalSecond), "-c:v", "libx264", "-preset",&#xA;                "ultrafast", "-pix_fmt", "yuv420p", "-ac", "2", videoPath}&#xA;        : new String[]{FileUtils.getFFmpeg(this),&#xA;                "-r", String.valueOf(BitmapDescriptorFactory.HUE_ORANGE / application.getSecond()),&#xA;                "-f", "concat", "-i", r0.getAbsolutePath(), "-r", "30", "-c:v", "libx264", "-preset", "ultrafast", "-pix_fmt", "yuv420p", videoPath};&#xA;&#xA;        System.gc();&#xA;        Process process = null;&#xA;        try {&#xA;            process = Runtime.getRuntime().exec(inputCode);&#xA;            while (!Util.isProcessCompleted(process)) {&#xA;                BufferedReader reader = new BufferedReader(new InputStreamReader(process.getErrorStream()));&#xA;                while (true) {&#xA;                    String line = reader.readLine();&#xA;                    if (line != null) {&#xA;                        Log.e("process", line);&#xA;                        appendLog(line);&#xA;                        final int incr = durationToprogtess(line);&#xA;                        new Handler(Looper.getMainLooper()).post(new Runnable() {&#xA;                            public void run() {&#xA;                                if (receiver != null) {&#xA;                                    receiver.onVideoProgressUpdate(incr);&#xA;                                }&#xA;                            }&#xA;                        });&#xA;                        mBuilder.setProgress(100, ((int) ((75.0f * ((float) incr)) / 100.0f)) &#x2B; 25, false);&#xA;                        mNotifyManager.notify(1001, mBuilder.build());&#xA;                    }else {&#xA;                        break;&#xA;                    }&#xA;                }&#xA;            }&#xA;        } catch (IOException e) {&#xA;            e.printStackTrace();&#xA;        } finally {&#xA;            Util.destroyProcess(process);&#xA;        }&#xA;        mBuilder.setContentText("Video created :" &#x2B; FileUtils.getDuration(System.currentTimeMillis() - startTime)).setProgress(0, 0, false);&#xA;        mNotifyManager.notify(1001, mBuilder.build());&#xA;        try {&#xA;            long fileSize = new File(videoPath).length();&#xA;            String artist = getResources().getString(R.string.artist_name);&#xA;            ContentValues values = new ContentValues();&#xA;            values.put("_data", videoPath);&#xA;            values.put("_size", Long.valueOf(fileSize));&#xA;            values.put("mime_type", "video/mp4");&#xA;            values.put("artist", artist);&#xA;            values.put("duration", Float.valueOf(toatalSecond * 1000.0f));&#xA;            getContentResolver().insert(Media.getContentUriForPath(videoPath), values);&#xA;        } catch (Exception e2) {&#xA;            e2.printStackTrace();&#xA;        }&#xA;        try {&#xA;            sendBroadcast(new Intent("android.intent.action.MEDIA_SCANNER_SCAN_FILE", Uri.fromFile(new File(videoPath))));&#xA;        } catch (Exception e3) {&#xA;            e3.printStackTrace();&#xA;        }&#xA;&#xA;        buildNotification(videoPath);&#xA;        final String str = videoPath;&#xA;        new Handler(Looper.getMainLooper()).post(new Runnable() {&#xA;            public void run() {&#xA;                if (receiver != null) {&#xA;                    receiver.onVideoProgressUpdate(100);&#xA;                    receiver.onProgressFinish(str);&#xA;                }&#xA;            }&#xA;        });&#xA;        FileUtils.deleteTempDir();&#xA;       stopSelf();&#xA;    }&#xA;

    &#xA;

    I have tried checking the directory in storage and check mkdir is working or not but this function purely works for creating video from a collection of images, themes, and audio. as per android

    &#xA;

  • Extract music metadata (music title, album title, artist name...) using react-player

    6 juin 2022, par Pierogi

    I'm building a simple web app that plays music streams.
    &#xA;The constitution of the web app is

    &#xA;

    audio.m4a -> ffmpeg -> nginx + rtmp module -> frontend browser

    &#xA;

    In the frontend browser, use react-player.
    &#xA;The audio data is published as HLS audio data.

    &#xA;

    So, I want to extract the metadata(music title, album title, artist name ...) from the data and display it in the browser. However, I could not find the way to that.
    &#xA;Anyone who knows this ?

    &#xA;

  • Problem in access "libavcodec/avcodec.h" in CPP [duplicate]

    14 septembre 2021, par Sujay

    Note : Not full working code but part of the code.&#xA;Problem is when trying to compile it shows the below output.&#xA;FFMPEG have installed.&#xA;No flag in VS code but error occurred on compile time.&#xA;Thanks in Advance.

    &#xA;

    #include<bits></bits>stdc&#x2B;&#x2B;.h>&#xA;#include<opencv2></opencv2>opencv.hpp>&#xA;&#xA;extern "C" {&#xA;    #include "libavcodec/avcodec.h"&#xA;    #include "libavformat/avformat.h"&#xA;    #include "libavutil/mathematics.h"&#xA;    #include "libavutil/pixfmt.h"&#xA;    #include "libswscale/swscale.h"&#xA;}&#xA;&#xA;using namespace std;&#xA;using namespace cv;&#xA;&#xA;int main(){&#xA;&#xA;&#xA;&#xA;    AVPacket avpkt; int err, frame_decoded = 0;&#xA;    AVCodec *codec = avcodec_find_decoder ( AV_CODEC_ID_H264 );&#xA;    AVCodecContext *codecCtx = avcodec_alloc_context3 ( codec );&#xA;    avcodec_open2 ( codecCtx, codec, NULL );&#xA;    // Set avpkt data and size here&#xA;    // err = avcodec_decode_video2 ( codecCtx, avframe, &amp;frame_decoded, &amp;avpkt );&#xA;    return EXIT_SUCCESS;&#xA;}&#xA;&#xA;

    &#xA;

    Output :

    &#xA;

    h264.cpp:(.text&#x2B;0x15): undefined reference to `avcodec_find_decoder&#x27;&#xA;h264.cpp:(.text&#x2B;0x25): undefined reference to `avcodec_alloc_context3&#x27;&#xA;h264.cpp:(.text&#x2B;0x41): undefined reference to `avcodec_open2&#x27;&#xA;collect2: error: ld returned 1 exit status &#xA;

    &#xA;