Recherche avancée

Médias (29)

Mot : - Tags -/Musique

Autres articles (106)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

  • Menus personnalisés

    14 novembre 2010, par

    MediaSPIP utilise le plugin Menus pour gérer plusieurs menus configurables pour la navigation.
    Cela permet de laisser aux administrateurs de canaux la possibilité de configurer finement ces menus.
    Menus créés à l’initialisation du site
    Par défaut trois menus sont créés automatiquement à l’initialisation du site : Le menu principal ; Identifiant : barrenav ; Ce menu s’insère en général en haut de la page après le bloc d’entête, son identifiant le rend compatible avec les squelettes basés sur Zpip ; (...)

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

Sur d’autres sites (6033)

  • FFMpeg Error initializing filter 'drawtext' on Android project

    14 janvier 2019, par user3884677

    I try to draw a text on a video using FFMpeg but I have the error :

    ffmpeg version n3.0.1 Copyright (c) 2000-2016 the FFmpeg developers
         built with gcc 4.8 (GCC)
         configuration: --target-os=linux --cross-prefix=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-fontconfig --enable-pthreads --disable-debug --disable-ffserver --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-ffprobe --enable-gpl --enable-yasm --disable-doc --disable-shared --enable-static --pkg-config=/home/vagrant/SourceCode/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/vagrant/SourceCode/ffmpeg-android/build/armeabi-v7a --extra-cflags='-I/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all' --extra-ldflags='-L/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags=
         libavutil      55. 17.103 / 55. 17.103
         libavcodec     57. 24.102 / 57. 24.102
         libavformat    57. 25.100 / 57. 25.100
         libavdevice    57.  0.101 / 57.  0.101
         libavfilter     6. 31.100 /  6. 31.100
         libswscale      4.  0.100 /  4.  0.100
         libswresample   2.  0.101 /  2.  0.101
         libpostproc    54.  0.100 / 54.  0.100
       Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/mediapicker/videos/eb89fc80-ebcc-4848-a95c-6983b2c5b09d.mp4':
         Metadata:
           major_brand     : 3gp4
           minor_version   : 0
           compatible_brands: isom3gp4
           creation_time   : 2018-10-03 15:46:13
           com.android.version: 6.0
         Duration: 00:00:04.78, start: 0.000000, bitrate: 6167 kb/s
           Stream #0:0(eng): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p, 1280x720, 6122 kb/s, SAR 1:1 DAR 16:9, 19.95 fps, 19.92 tbr, 90k tbn, 180k tbc (default)
           Metadata:
             rotate          : 90
             creation_time   : 2018-10-03 15:46:13
             handler_name    : VideoHandle
           Side data:
             displaymatrix: rotation of -90.00 degrees
           Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 127 kb/s (default)
           Metadata:
             creation_time   : 2018-10-03 15:46:13
             handler_name    : SoundHandle
       Fontconfig error: Cannot load default config file
       [Parsed_drawtext_0 @ 0xb561e040] impossible to init fontconfig
       [AVFilterGraph @ 0xb5609140] Error initializing filter 'drawtext' with args '"fontfile=/usr/share/fonts/TTF/Vera.ttf: text=Test Heading"'
       Error opening filters!

    This is my code :

    private GLSurfaceView mGLView;
       private Button chooseVideo;
       private Button valideButton;
       private String SelectedVideo;
       private VideoView videoView;

       @Override
       protected void onCreate(Bundle savedInstanceState) {

           super.onCreate(savedInstanceState);
           setContentView(R.layout.activity_main);

           chooseVideo= findViewById(R.id.choose_video);
           chooseVideo.setOnClickListener(new View.OnClickListener() {
               public void onClick(View v) {

                   new VideoPicker.Builder(MainActivity.this)
                           .mode(VideoPicker.Mode.GALLERY)
                           .directory(VideoPicker.Directory.DEFAULT)
                           .extension(VideoPicker.Extension.MP4)
                           .enableDebuggingMode(true)
                           .build();
               }
           });
           videoView = (VideoView) findViewById(R.id.videoView);
           final FFmpeg ffmpeg = FFmpeg.getInstance(MainActivity.this);
           try {
               ffmpeg.loadBinary(new LoadBinaryResponseHandler() {
                   @Override
                   public void onStart() {
                   }

                   @Override
                   public void onFailure() {
                   }

                   @Override
                   public void onSuccess() {
                   }

                   @Override
                   public void onFinish() {
                   }
               });
           } catch (FFmpegNotSupportedException e) {
           }
           valideButton= findViewById(R.id.valide);
           valideButton.setOnClickListener(new View.OnClickListener() {
               public void onClick(View v) {
                   try {
                       String[] cmd = {"-y" , "-i", SelectedVideo,
                               "-vf", "drawtext=\"fontfile=/usr/share/fonts/TTF/Vera.ttf: text=\'Test Heading\'\"",
                               "-acodec",
                               "copy",                       Environment.getExternalStorageDirectory()+"/"+Environment.DIRECTORY_MOVIES+"/output.mp4"};

                       ffmpeg.execute(cmd, new ExecuteBinaryResponseHandler() {

                           @Override
                           public void onStart() {
                           }

                           @Override
                           public void onProgress(String message) {
                           }

                           @Override
                           public void onFailure(String message) {
                               Log.i("ffmpegFailure",message);
                           }

                           @Override
                           public void onSuccess(String message) {
                               Log.i("ffmpegExecute",message);
                               videoView.setVideoPath(Environment.getExternalStorageDirectory()+"/"+Environment.DIRECTORY_MOVIES+"/output.mp4");
                               videoView.requestFocus();
                               videoView.start();
                           }
                           @Override
                           public void onFinish() {
                           }
                       });
                   } catch (FFmpegCommandAlreadyRunningException e) {
                       // Handle if FFmpeg is already running
                   }
               }
           });
    }

    My problem is that I can not use the option ’drawtext’. When I don’t use the option ’drawtext’ it’s work. I do not know which syntax I should use.
    I tried a lot of possibilities without success.
    I use this library : http://writingminds.github.io/ffmpeg-android-java/

    Can you help me ?

  • Opencv is working for my project on my laptop but stop working on raspberry pi

    10 mars 2021, par Clovis Tiwange

    Good morning all ! I despair (This is my first post).
I am trying to set up a human detection system using the openvino toolkit. I am using an example project provided by openvino at the following openvino multi target tracking. I first tested them on my computer (ubuntu) and it worked. I have now tried to run the project on raspberry pi but it gets stuck at opencv level. I followed the following tutorial Install openvino on rasbian for setting up openvino.
While debugging, I realized that the problem was with cv2.videocapure (link). Apparently there is a problem with the backend ffmepg but also GStreamer.

    


    I run the following command

    


    python3 multi_camera_multi_target_tracking.py     -i http://192.168.137.160:4747/video    --m_detector model/intel/person-detection-retail-0013/FP32/person-detection-retail-0013.xml     --m_reid model/intel/person-reidentification-retail-0031/FP32/person-reidentification-retail-0031.xml     --config config.py -l /opt/intel/openvino/deployment_tools/inference_engine/lib/intel64/libcpu_extension_avx2.so


    


    And i have the following results

    


    INFO: 2021-03-07 21:07:34: Opening file http://192.168.137.160:4747/video
[DEBUG:0] global ../opencv/modules/videoio/src/videoio_registry.cpp (171) VideoBackendRegistry VIDEOIO: Builtin backends(8): FFMPEG(1000); GSTREAMER(990); INTEL_MFX(980); MSMF(970); V4L2(960); CV_IMAGES(950); CV_MJPEG(940); UEYE(930)

[DEBUG:0] global ../opencv/modules/videoio/src/videoio_registry.cpp (195) VideoBackendRegistry VIDEOIO: Available backends(8): FFMPEG(1000); GSTREAMER(990); INTEL_MFX(980); MSMF(970); V4L2(960); CV_IMAGES(950); CV_MJPEG(940); UEYE(930)

[ INFO:0] global ../opencv/modules/videoio/src/videoio_registry.cpp (197) VideoBackendRegistry VIDEOIO: Enabled backends(8, sorted by priority): FFMPEG(1000); GSTREAMER(990); INTEL_MFX(980); MSMF(970); V4L2(960); CV_IMAGES(950); CV_MJPEG(940); UEYE(930)

[ WARN:0] global ../opencv/modules/videoio/src/cap.cpp (108) open VIDEOIO(FFMPEG): trying capture filename='http://192.168.137.160:4747/video' ...

[ INFO:0] global ../opencv/modules/videoio/src/backend_plugin.cpp (359) getPluginCandidates VideoIO pluigin (FFMPEG): glob is 'libopencv_videoio_ffmpeg*.so', 1 location(s)

[ INFO:0] global ../opencv/modules/videoio/src/backend_plugin.cpp (366) getPluginCandidates     - /opt/intel/openvino/opencv/lib: 1

[ INFO:0] global ../opencv/modules/videoio/src/backend_plugin.cpp (370) getPluginCandidates Found 1 plugin(s) for FFMPEG

[ INFO:0] global ../opencv/modules/videoio/src/backend_plugin.cpp (175) libraryLoad load /opt/intel/openvino/opencv/lib/libopencv_videoio_ffmpeg.so => FAILED

[ WARN:0] global ../opencv/modules/videoio/src/cap.cpp (170) open VIDEOIO(FFMPEG): backend is not available (plugin is missing, or can't be loaded due dependencies or it is not compatible)

[ WARN:0] global ../opencv/modules/videoio/src/cap.cpp (108) open VIDEOIO(GSTREAMER): trying capture filename='http://192.168.137.160:4747/video' ...

[ INFO:0] global ../opencv/modules/videoio/src/backend_plugin.cpp (359) getPluginCandidates VideoIO pluigin (GSTREAMER): glob is 'libopencv_videoio_gstreamer*.so', 1 location(s)

[ INFO:0] global ../opencv/modules/videoio/src/backend_plugin.cpp (366) getPluginCandidates     - /opt/intel/openvino/opencv/lib: 1

[ INFO:0] global ../opencv/modules/videoio/src/backend_plugin.cpp (370) getPluginCandidates Found 1 plugin(s) for GSTREAMER

[ INFO:0] global ../opencv/modules/videoio/src/backend_plugin.cpp (175) libraryLoad load /opt/intel/openvino/opencv/lib/libopencv_videoio_gstreamer.so => OK

[ INFO:0] global ../opencv/modules/videoio/src/backend_plugin.cpp (236) PluginBackend Video I/O: loaded plugin 'GStreamer OpenCV Video I/O plugin'

[ INFO:0] global ../opencv/modules/videoio/src/cap_gstreamer.cpp (711) open OpenCV | GStreamer: http://192.168.137.160:4747/video

[ INFO:0] global ../opencv/modules/videoio/src/cap_gstreamer.cpp (744) open OpenCV | GStreamer: mode - URI


    


    The program seems to be stuck there. No exception is thrown.

    


  • pyInstaller : Pack binary executable inside project's executable to run

    18 décembre 2023, par zur

    TLDR ;

    


    I would like to pack the ffmpeg executable inside my own executable. Currently I am getting

    


    FileNotFoundError: [Errno 2] No such file or directory: 'ffmpeg'
Skipping ./testFile202312061352.mp4 due to FileNotFoundError: [Errno 2] No such file or directory: 'ffmpeg'


    


    Details :

    


    I am creating executable file using following command :

    


    pyinstaller cli.py \&#xA;  --onefile \&#xA;  --add-binary /Users/<machineuser>/anaconda3/envs/my_env/bin/ffmpeg:bin&#xA;</machineuser>

    &#xA;

    The code that uses ffmpeg is not authored by me. And I would like to keep that part the same.

    &#xA;

    When I run from command line while conda environment is active I can successfully run it as python (or perhaps anaconda) knows where the binaries are. I have a pretty empty cli.py. That seems to be the entry point and I hope if it is possible I can set the bin directory's path there ...

    &#xA;

    I am able to successfully run the application like following :

    &#xA;

    (my_env) machineUser folder % "dist/cli_mac_001202312051431" ./testFile202312061352.mp4&#xA;

    &#xA;

    I would like to run like following :

    &#xA;

    (base) machineUser folder % "dist/cli_mac_001202312051431" ./testFile202312061352.mp4&#xA;

    &#xA;

    I would like to keep the world out side my executable's tmp folder the same. I would not want to change something that will be "left behind" after the exec is terminated.

    &#xA;

    Question :

    &#xA;

    Can some one please mention how to modify the pyinstaller command or what to change in cli.py to achieve it successfully ?

    &#xA;