Recherche avancée

Médias (1)

Mot : - Tags -/musée

Autres articles (65)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

Sur d’autres sites (9108)

  • Having issues making an app with py2app ffmpeg and ffprobe

    23 septembre 2024, par Nuno Mesquita

    I have made an app in OSX Python, that uses FFMEG and ffprobe.

    


    It runs fine in my VS Code.

    


    I want to make a self sustained app, that others can use, without needed to install anything themselves. So, I manually included the static libraries in the bin folder of my main app, and am able to run the app using the libraries inside my bin folder.

    


    I have lost many hours trying to figure this out, and am always getting the same error.

    


    My best shot was being able to open the app inside app/contents/resources and running via Python, but still have the issue saying that ffprobe is not available.

    


    I´m losing my mind...

    


    Should I try a completely different approach ?

    


    For now, I just want my OSX friends to be able to use the app, then I will want it to run on Windows too, but baby steps.

    


    I am not quite sure what to include in setup.py, so I would love to include everything that is in my app folder, to avoid all sorts of errors in missing .pngs and stuff.

    


    I also made sure that libraries are executable (they are about 80MB each (ffmpeg and ffprobe))

    


    Can anyone help =D ???

    


    I described above, tested different ways, checked stuff like redirecting the libraries to the folders of the app :

    


    For the last try my setup.py was :

    


    from setuptools import setup

APP = ['mpc.py']
DATA_FILES = [
    ('bin', ['./bin/ffmpeg', './bin/ffprobe']),
    ('theme/dark', ['./theme/dark/*.png']),
    ('theme/light', ['./theme/light/*.png']),
    ('theme', ['./theme/dark.tcl', './theme/light.tcl']),
    '.',  # Add current directory to ensure everything is included
]

OPTIONS = {
    'argv_emulation': False,
    'packages': ['pydub', 'pygame', 'requests', 'freesound'],
    'includes': ['pydub', 'pygame', 'requests', 'freesound'],
    'resources': ['./bin/ffmpeg', './bin/ffprobe', './theme/dark/*.png', './theme/light/*.png',     './theme/dark.tcl', './theme/light.tcl'],
}

setup(
    app=APP,
    data_files=DATA_FILES,
    options={'py2app': OPTIONS},
    setup_requires=['py2app'],
)


    


    And I also had this in the beginning of my Python script :

    


    # Set ffmpeg and ffprobe paths relative to the app's Resources/bin directory
app_dir = os.path.dirname(os.path.abspath(__file__)) 

# Set ffmpeg and ffprobe paths relative to the app's Resources/bin directory
ffmpeg_path = os.path.join(app_dir, 'bin', 'ffmpeg')
ffprobe_path = os.path.join(app_dir, 'bin', 'ffprobe') 
AudioSegment.converter = ffmpeg_path
AudioSegment.ffprobe = ffprobe_path


    


    Don't know what else to try.

    


  • sometimes failed to read frame from rtsp with opencv

    7 novembre 2018, par jon

    I got a strange issue.
    my code is quite simple, just read frame from RTSP and do some processing.

    for (;;)
    {
       cap >> frame;
       if (frame.empty()) {
           break;
       }
       // heavy_processing(frame) //
       imshow("cam",frame);
    }

    the rtsp streaming is a webcam with 1920x1080P, network traffic is arround 4Mb/s

    without "heavy_processing()" function, basically it runs good. CPU is 45% (i7-7700)

    with "heavy_processing()" function, it will read an empty frame after couple seconds then exit. I can see CPU surge to 95%+ before it exit.

    I built opencv(3.4.3) myself with mostly default option.

    so far I suspect the videocap device shutdown when there are too much frames in the buffer, but it doesn’t make sense.shouldn’t it drop the earliest frame ? or is it possible the frame is corrupted inside ’heavy_processing()’ ?

    ffmpeg probably is 2.8.15, ubuntu 16.04

    ldd result :

    linux-vdso.so.1 =>  (0x00007ffeb5f9b000)
    libopencv_dnn.so.3.4 => /usr/local/lib/libopencv_dnn.so.3.4 (0x00007fe5fd796000)
    libprotobuf.so.9 => /usr/lib/x86_64-linux-gnu/libprotobuf.so.9 (0x00007fe5fd454000)
    libcppkafka.so.0.2 => /usr/local/lib/libcppkafka.so.0.2 (0x00007fe5fd18c000)
    libopencv_highgui.so.3.4 => /usr/local/lib/libopencv_highgui.so.3.4 (0x00007fe5fcf74000)
    libopencv_videoio.so.3.4 => /usr/local/lib/libopencv_videoio.so.3.4 (0x00007fe5fcd27000)
    libopencv_imgcodecs.so.3.4 => /usr/local/lib/libopencv_imgcodecs.so.3.4 (0x00007fe5fc664000)
    libopencv_imgproc.so.3.4 => /usr/local/lib/libopencv_imgproc.so.3.4 (0x00007fe5f9d50000)
    libopencv_core.so.3.4 => /usr/local/lib/libopencv_core.so.3.4 (0x00007fe5f8e49000)
    libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fe5f8ac7000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fe5f87bd000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fe5f85a7000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fe5f81dd000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fe5f7fbf000)
    /lib64/ld-linux-x86-64.so.2 (0x0000563d8f116000)
    libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fe5f7da5000)
    librdkafka.so.1 => /usr/local/lib/librdkafka.so.1 (0x00007fe5f7a9d000)
    libgtk-x11-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0 (0x00007fe5f7451000)
    libgdk-x11-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0 (0x00007fe5f719c000)
    libcairo.so.2 => /usr/lib/x86_64-linux-gnu/libcairo.so.2 (0x00007fe5f6e88000)
    libgdk_pixbuf-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0 (0x00007fe5f6c65000)
    libgobject-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007fe5f6a12000)
    libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007fe5f6701000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fe5f64f8000)
    libdc1394.so.22 => /usr/lib/x86_64-linux-gnu/libdc1394.so.22 (0x00007fe5f6282000)
    libavcodec.so.58 => /usr/local/lib/libavcodec.so.58 (0x00007fe5f4d93000)
    libavformat.so.58 => /usr/local/lib/libavformat.so.58 (0x00007fe5f494b000)
    libavutil.so.56 => /usr/local/lib/libavutil.so.56 (0x00007fe5f46d7000)
    libswscale.so.5 => /usr/local/lib/libswscale.so.5 (0x00007fe5f4458000)
    libjpeg.so.8 => /usr/lib/x86_64-linux-gnu/libjpeg.so.8 (0x00007fe5f41fe000)
    libpng12.so.0 => /lib/x86_64-linux-gnu/libpng12.so.0 (0x00007fe5f3fd9000)
    libtiff.so.5 => /usr/lib/x86_64-linux-gnu/libtiff.so.5 (0x00007fe5f3d65000)
    libjasper.so.1 => /usr/lib/x86_64-linux-gnu/libjasper.so.1 (0x00007fe5f3b0f000)
  • correct way to download a mp4 [Audio only] file as a mp3 file via php

    3 février 2018, par Kapil

    I am asking this question because i found it impossible as far my knowledge stands. However i believe here on stackoverflow a lot of genius persons visits so maybe someone can give a good advice / trick.

    My problem is, I am downloading a audio/mp4 file of youtube hosted on googlevideo.com’s server.

    My PHP code for this purpose :
    $mp3path is url of video

    header('Content-Description: File Transfer');
    if(strpos($mp3path, "https://") === false) {
       header('Content-length: ' . size($mp3path)); //size is custom function
    }
       header("Content-Type: audio/MP4A-LATM, audio/MP4A, audio/m4a, audio/mp4, audio/mp4a, audio/mp4-audio, audio/mpeg");
       header('Content-Type: application/force-download');
       header("Accept-Ranges: bytes");
       header('Content-Transfer-Encoding: binary');
       header('Content-disposition: attachment; filename="'.$title.'.mp3"');
       header('Connection: Keep-Alive');
       header('Expires: 0');
       header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
       header('Last-Modified: ' . gmdate('D, d M Y H:i:s', time()) . ' GMT');
       header("Cache-Control: private", false);
       header('Pragma: no-cache');
       readfile($mp3path);
       exit;

    I can download this audio file but few mp3 players are not able to play it when i did some research on by using mp3val [mp3val.sourceforge.net]. I found this file do not contain sample-rate, bit-rate or some other required codecs inside the file.
    Error received from mp3val : Unknown file format

    I know one possible way of doing this which is ffmpeg but i am looking for a less time consuming option of doing this because first ffmpeg download the whole file and then convert it to mp3 and save it on server. It takes a lot of time.

    I am looking for a easiest solution in which, i dont want to save the whole file on my server. I want to call this file from remote server and want to add sample rate, bit-rate in the file and then just somehow with php i want to start download on browser.

    All i mean to say i need a faster solution. I have seen 2 yt to mp3 converter, They are doing the same thing, giving instant download. i dont know how ?

    Please if you think its a stupid question or not possible then dont report to stackoverflow. I am trying to figure it out that’s why i am asking this question here. I hope you’ll understand my curiosity.

    Thanks,