Recherche avancée

Médias (1)

Mot : - Tags -/MediaSPIP 0.2

Autres articles (20)

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

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

  • Selection of projects using MediaSPIP

    2 mai 2011, par

    The examples below are representative elements of MediaSPIP specific uses for specific projects.
    MediaSPIP farm @ Infini
    The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...)

Sur d’autres sites (7206)

  • Pyinstaller Hidden import 'ffmpeg-python' not found

    13 août 2024, par petunia rose

    Trying to convert Python scripts to exe with PyInstaller.

    


    In my code, I use ffmpeg-python :

    


    import ffmpeg
....
def ffmpeg_save_clip(self,output_video: str, clip_start: str, clip_end: str): 
  (ffmpeg 
   .input(self.file.get_videopath(), ) 
   .output(output_video, vcodec='copy', ss=clip_start, to=clip_end, acodec='copy') 
   .global_args('-y') 
   .run())


    


    So Ii call PyInstaller from terminal with related flag :

    


    pyinstaller --windowed --hidden-import "ffmpeg-python" --noconsole --icon=app.ico --name "app" main.py 


    


    I checked also :

    


    pip install ffmpeg-python 
Requirement already satisfied: ffmpeg-python in c:\python38\lib\site-packages (0.2.0) 
Requirement already satisfied: future in c:\python38\lib\site-packages (from ffmpeg-python) (0.18.3)


    


    But I get from PyInstaller :

    


    Hidden import 'ffmpeg-python' not found


    


    App works in visual-studio, but when I run pyinstaller exe and try to save clip, it freeze without response.

    


    Note : I also :

    


      

    1. try to add ffmpeg.exe into root folder of pyinstaller app.

      


    2. 


    3. try to use .spec file with :

      


      binaries=[('C:\\ffmpeg\\bin\\ffmpeg.exe', 'ffmpeg/),('C:\\ffmpeg\\bin\\ffplay.exe','ffplay/'), ('C:\\ffmpeg\\bin\\ffprobe.exe', 'ffprobe/')],

      


    4. 


    


    Nothing changes

    


    UPDATE
Tank you @happy_code_egg, you explained me such a things.
I tried what you said and I don't have error any more.

    


    But I can't make work ffmpeg anywhere on Pyinstaller exe.
I added a try/except block to isolate problem
(when I launch app on Visualstudio it works, but not when use exe).

    


    block is (very symilar to past def) :

    


    def ffmpeg_save_clip(self,output_video: str, clip_start: str, clip_end: str):
    input = 'C:\Users\x\Desktop\input.mp4'
    output = 'C:\Users\x\Desktop\output.mp4'
    try:
        (ffmpeg
        .input(input)
        .output(output, vcodec='copy', ss=clip_start, to=clip_end, acodec='copy')
        .global_args('-y')
        .run(capture_stdout=True))
    except Exception as e:
        self.logger.error('Video window -> ffmpeg_save_clip -> error ' + str(e))
        self.logger.error('Video window -> ffmpeg_save_clip -> input file: ' + input)
        self.logger.error('Video window -> ffmpeg_save_clip -> output file ' + output)
        raise ValueError(str(e))


    


    Note : (input and output fixed are only as simple path examples)

    


    When I open log I have :

    


    2024-08-09 11:28:50,293 - ERROR - Video window -> ffmpeg_save_clip -> error [WinError 2] File not found error
2024-08-09 11:28:50,293 - ERROR - Video window -> ffmpeg_save_clip -> input file: C:\Users\x\Desktop\input.mp4
2024-08-09 11:28:50,293 - ERROR - Video window -> ffmpeg_save_clip -> output file C:\Users\x\Desktop\ouput.mp4


    


    (I tried with '/' and also '\' to create path)
File paths are correct and, on Visualstudio, they can be processed by ffmpeg (no error), but the exe seems to not find (input or output)

    


    I tried solution described here :
Python ffmpeg won't accept path
(without effects)

    


    I found also these discussions :

    


    github ffmpeg-python issue1

    


    github ffmpeg-python issue2

    


    in both discussions seems to be a problem with ffmpeg + ffmpeg-python libs cohexistence.

    


    I tried (as said) to uninstal both and reinstall ffmpeg-python,
but nothing change.

    


    Note :
I've also three other warning during Pyinstaller :
(I write them only to complete context, but i think they have no repercussions on this problem.)

    


    57283 ERROR: Hidden import 'fiona._shim' not found
57298 WARNING: Hidden import "fiona._shim" not found!
57392 WARNING: Hidden import "importlib_resources.trees" not found!


    


    tried with :

    


    --hidden-import fiona._shim --hidden-import fiona.schema


    


    tried also with :

    


    --add-data="fiona/*;fiona”


    


    but warnings still remains.

    


  • ffmpeg - convert MP4 to Panasonic Lumix playable MJPEG [closed]

    21 août 2024, par Maro Natts

    I'm new to ffmpeg and ffprobe, I started using it to convert videos to show on 3DS and DSi for an art project.

    


    Now I want to show my own videos on a Panasonic LUMIX digicam (DMC-FT2)(JPN), but have had trouble getting the device to play the video.

    


    The digi takes videos in AVCHD Lite and Motion JPEG.

    


    I've tried online converting mp4 to the respective formats + changing file name, but the device only recognises that it's there — refuses to/can't play it.

    


    I also tried using this code to convert to MJPEG :
ffmpeg -i input.mp4 -c:v mjpeg -q:v 2 -an output.mjpeg

    


    But no luck ! Changed the filename to match the others, the camera recognised the file is there, but can't play it.

    


    So I used this code to get the information of a MJPEG video taken on the digi :
/opt/ffmpeg/ffprobe file.mp4 -show_streams  -select_streams v  -print_format json

    


    and got the following, is it possible to convert my own video (mp4) to these settings ? So that it can play on the device ? If so how ?

    


    Thanks !

    


      Metadata:
    major_brand     : qt  
    minor_version   : 537331972
    compatible_brands: qt  pana
    creation_time   : 2024-08-21T21:54:59.000000Z
  Duration: 00:00:06.00, start: 0.000000, bitrate: 12287 kb/s
  Stream #0:0[0x1](eng): Video: mjpeg (Baseline) (jpeg / 0x6765706A), yuvj420p(pc, bt470bg/unknown/unknown), 640x480, 11083 kb/s, 30 fps, 30 tbr, 30 tbn (default)
      Metadata:
        creation_time   : 2024-08-21T21:54:59.000000Z
        vendor_id       : pana
        encoder         : Photo - JPEG
  Stream #0:1[0x2](eng): Audio: pcm_s16be (twos / 0x736F7774), 16000 Hz, 1 channels, s16, 256 kb/s (default)
      Metadata:
        creation_time   : 2024-08-21T21:54:59.000000Z
        vendor_id       : pana
    "streams": [
        {
            "index": 0,
            "codec_name": "mjpeg",
            "codec_long_name": "Motion JPEG",
            "profile": "Baseline",
            "codec_type": "video",
            "codec_tag_string": "jpeg",
            "codec_tag": "0x6765706a",
            "width": 640,
            "height": 480,
            "coded_width": 640,
            "coded_height": 480,
            "closed_captions": 0,
            "film_grain": 0,
            "has_b_frames": 0,
            "pix_fmt": "yuvj420p",
            "level": -99,
            "color_range": "pc",
            "color_space": "bt470bg",
            "chroma_location": "center",
            "refs": 1,
            "id": "0x1",
            "r_frame_rate": "30/1",
            "avg_frame_rate": "30/1",
            "time_base": "1/30",
            "start_pts": 0,
            "start_time": "0.000000",
            "duration_ts": 180,
            "duration": "6.000000",
            "bit_rate": "11083093",
            "bits_per_raw_sample": "8",
            "nb_frames": "180",
            "disposition": {
                "default": 1,
                "dub": 0,
                "original": 0,
                "comment": 0,
                "lyrics": 0,
                "karaoke": 0,
                "forced": 0,
                "hearing_impaired": 0,
                "visual_impaired": 0,
                "clean_effects": 0,
                "attached_pic": 0,
                "timed_thumbnails": 0,
                "non_diegetic": 0,
                "captions": 0,
                "descriptions": 0,
                "metadata": 0,
                "dependent": 0,
                "still_image": 0
            },
            "tags": {
                "creation_time": "2024-08-21T21:54:59.000000Z",
                "language": "eng",
                "vendor_id": "pana",
                "encoder": "Photo - JPEG"
            }
        }
    ]
}



    


  • Facing issues with adding text over a video as watermark using ffmpeg in Laravel

    18 septembre 2024, par Kelash

    I am facing issues with adding text over a video as a watermark using pbmedia/laravel-ffmpeg.

    


    Where am I going wrong ?

    


    Code :

    


    $format = new X264();
$format->setAudioCodec('aac');
$format->setVideoCodec('libx264');
$format->setKiloBitrate(0);

$localPath = '/' . $this->video->id . '.mp4';

$ffmpeg = FFMpeg::fromDisk("public")
          ->open($localPath)
          ->addFilter(function ($filters) {
            $filters->custom("drawtext=fontfile=S:/Freelancer/version58trials/version58trials/public/webfonts/arial.TTF:text='Stack Overflow':fontcolor=white:fontsize=24");
          })
          ->export()
          ->toDisk('public')
          ->inFormat($format)
          ->save("watermark_video_added.mp4");


    


    And this is error I am getting :

    


    [2024-08-25 08:53:25] local.INFO: ffprobe running command C:\ffmpeg\bin\ffprobe.exe -help -loglevel quiet  
[2024-08-25 08:53:25] local.INFO: ffprobe executed command successfully  
[2024-08-25 08:53:25] local.INFO: ffprobe running command C:\ffmpeg\bin\ffprobe.exe "S:/Freelancer/version58trials/version58trials/storage/app/public/143.mp4" -show_streams -print_format json  
[2024-08-25 08:53:25] local.INFO: ffprobe executed command successfully  
[2024-08-25 08:53:25] local.INFO: ffmpeg running command C:\ffmpeg\bin\ffmpeg.exe -y -ss 00:00:01.00 -i "S:/Freelancer/version58trials/version58trials/storage/app/public/143.mp4" -vframes 1 -f image2 "S:/Freelancer/version58trials/version58trials/storage/app/public/RzBnC8ZESC40iRSfOuED66cb37513ccd11724594001-poster.jpg"  
[2024-08-25 08:53:26] local.INFO: ffmpeg executed command successfully  
[2024-08-25 08:53:26] local.INFO: ffmpeg running command C:\ffmpeg\bin\ffmpeg.exe -y -i "S:/Freelancer/version58trials/version58trials/storage/app/public/143.mp4" -threads 12 -vcodec libx264 -acodec aac -refs 6 -coder 1 -sc_threshold 40 -flags +loop -me_range 16 -subq 7 -i_qfactor 0.71 -qcomp 0.6 -qdiff 4 -trellis 1 -b:a 128k -vf "[in]drawtext=fontfile=S:/Freelancer/version58trials/version58trials/public/webfonts/arial.TTF:text='Stack Overflow':fontcolor=white:fontsize=24[out]" "S:/Freelancer/version58trials/version58trials/storage/app/public/watermark_video_added.mp4"  
[2024-08-25 08:53:26] local.INFO: ffprobe running command C:\ffmpeg\bin\ffprobe.exe "S:/Freelancer/version58trials/version58trials/storage/app/public/143.mp4" -show_format -print_format json  
[2024-08-25 08:53:26] local.INFO: ffprobe executed command successfully  
[2024-08-25 08:53:26] local.ERROR: ffmpeg failed to execute command C:\ffmpeg\bin\ffmpeg.exe -y -i "S:/Freelancer/version58trials/version58trials/storage/app/public/143.mp4" -threads 12 -vcodec libx264 -acodec aac -refs 6 -coder 1 -sc_threshold 40 -flags +loop -me_range 16 -subq 7 -i_qfactor 0.71 -qcomp 0.6 -qdiff 4 -trellis 1 -b:a 128k -vf "[in]drawtext=fontfile=S:/Freelancer/version58trials/version58trials/public/webfonts/arial.TTF:text='Stack Overflow':fontcolor=white:fontsize=24[out]" "S:/Freelancer/version58trials/version58trials/storage/app/public/watermark_video_added.mp4": ffmpeg version 2024-08-21-git-9d15fe77e3-full_build-www.gyan.dev Copyright (c) 2000-2024 the FFmpeg developers
  built with gcc 13.2.0 (Rev5, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libopenjpeg --enable-libquirc --enable-libuavs3d --enable-libxevd --enable-libzvbi --enable-libqrencode --enable-librav1e --enable-libsvtav1 --enable-libvvenc --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxeve --enable-libxvid --enable-libaom --enable-libjxl --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-dxva2 --enable-d3d11va --enable-d3d12va --enable-ffnvcodec --enable-libvpl --enable-nvdec --enable-nvenc --enable-vaapi --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
  libavutil      59. 34.100 / 59. 34.100
  libavcodec     61. 11.100 / 61. 11.100
  libavformat    61.  5.101 / 61.  5.101
  libavdevice    61.  2.100 / 61.  2.100
  libavfilter    10.  2.102 / 10.  2.102
  libswscale      8.  2.100 /  8.  2.100
  libswresample   5.  2.100 /  5.  2.100
  libpostproc    58.  2.100 / 58.  2.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'S:/Freelancer/version58trials/version58trials/storage/app/public/143.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp41isom
    creation_time   : 2024-08-25T10:28:56.000000Z
  Duration: 00:00:05.65, start: 0.000000, bitrate: 6491 kb/s
  Stream #0:0[0x1](und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(progressive), 1906x960 [SAR 1:1 DAR 953:480], 6317 kb/s, 30 fps, 30 tbr, 30k tbn (default)
      Metadata:
        creation_time   : 2024-08-25T10:28:56.000000Z
        handler_name    : VideoHandler
        vendor_id       : [0][0][0][0]
        encoder         : AVC Coding
  Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 192 kb/s (default)
      Metadata:
        creation_time   : 2024-08-25T10:28:56.000000Z
        handler_name    : SoundHandler
        vendor_id       : [0][0][0][0]
[AVFilterGraph @ 0000020e99b5f0c0] No option name near '/Freelancer/version58trials/version58trials/public/webfonts/arial.TTF:text=Stack Overflow:fontcolor=white:fontsize=24'
[AVFilterGraph @ 0000020e99b5f0c0] Error parsing a filter description around: [out]
[AVFilterGraph @ 0000020e99b5f0c0] Error parsing filterchain '[in]drawtext=fontfile=S:/Freelancer/version58trials/version58trials/public/webfonts/arial.TTF:text='Stack Overflow':fontcolor=white:fontsize=24[out]' around: [out]
Error opening output file S:/Freelancer/version58trials/version58trials/storage/app/public/watermark_video_added.mp4.
Error opening output files: Invalid argument


    


    What I tried, is manipulating that filter function but I couldn't make it.

    


    For your knowledge,the video paths and font path is correct the only issue is with ffmpeg adding watermark text logic.