Recherche avancée

Médias (0)

Mot : - Tags -/content

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (77)

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

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

Sur d’autres sites (10600)

  • KeyError : 'video_fps' with moviepy ffmpeg

    11 août 2020, par Ethan Shoe

    I am writing a Python script to convert a video (.MP4) into an audio file (.MP3) on a Django server. To achieve this, I am using the Moviepy library but when I run the script, I get the following error :

    



    Internal Server Error: /test/
Traceback (most recent call last):
  File "C:\Users\etsho\AppData\Local\Programs\Python\Python38\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
    response = get_response(request)
  File "C:\Users\etsho\AppData\Local\Programs\Python\Python38\lib\site-packages\django\core\handlers\base.py", line 126, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "C:\Users\etsho\AppData\Local\Programs\Python\Python38\lib\site-packages\django\core\handlers\base.py", line 124, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "C:\Users\etsho\AppData\Local\Programs\Python\Python38\lib\site-packages\django\views\decorators\csrf.py", line 54, in wrapped_view
    return view_func(*args, **kwargs)
  File "C:\shoe\musicsite\main\views.py", line 29, in test
    video = VideoFileClip(os.path.join(basePath + ".mp4"))
  File "C:\Users\etsho\AppData\Local\Programs\Python\Python38\lib\site-packages\moviepy\video\io\VideoFileClip.py", line 88, in __init__
    self.reader = FFMPEG_VideoReader(filename, pix_fmt=pix_fmt,
  File "C:\Users\etsho\AppData\Local\Programs\Python\Python38\lib\site-packages\moviepy\video\io\ffmpeg_reader.py", line 34, in __init__
    self.fps = infos['video_fps']
KeyError: 'video_fps'
[15/Nov/2019 23:49:43] "POST /test/ HTTP/1.1" 500 80909


    



    There's practically no information about this error or how to solve it that I could find, so any help or insight would be much appreciated.

    



    Here is my Python script (views.py) :

    



    import pyodbc, json, pytube
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
from rest_framework import parsers
import os
from moviepy.editor import *

@csrf_exempt
def test(request):
if request.method == 'POST':
    filePath = 'C:\\Users\\etsho\\Music\\'

    #retrieve url from app
    body_unicode = request.body.decode('utf-8')
    body = json.loads(body_unicode)
    videoURL = body['url']

    print("before download")

    #download youtube video
    youtube = pytube.YouTube(videoURL)
    videoTitle = youtube.title
    video = youtube.streams.filter(only_audio=True).first()
    freshDownload = video.download(filePath)

    print("after download")

    basePath, extension = os.path.splitext(freshDownload)
    video = VideoFileClip(os.path.join(basePath + ".mp4"))
    video.audio.write_audiofile(os.path.join(basePath + ".mp3"))

    print("video converted")



return HttpResponse("")


    


  • Whatsapp FFMPEG thumbnail is not showing

    7 avril 2020, par Youssof H.

    I want to run a command that will add an image as a thumbnail to a video. The video will be shared by WhatsApp with a thumbnail showing up.

    



    The problem is that after running the following command thumbnails don't show up in Whatsapp though it shows on Windows 10.

    



    ffmpeg -i path/to/Video.mp4 -i path/to/Video.png -map 0 -map 1 -c copy -c:v:1 png -disposition:v:1 attached_pic -strict -2 path/to/out.mp4


    



    And another problem is that the video with a thumbnail doesn't play on Android, iPhone, Windows, nor on Linux.

    



    Log :

    



    ffmpeg version 4.1.4-1+rpt1~deb10u1 2000-2019 the FFmpeg developers
  built with gcc 8 (Debian)
  configuration: --prefix=/usr --extra-version='1+rpt1~deb10u1' --toolchain=hardened --libdir=/usr/lib/arm-linux-gnueabihf --incdir=/usr/include/arm-linux-gnueabihf --arch=arm --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-omx-rpi --enable-mmal --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100
[libaom-av1 @ 0x5b7130] v1.0.0
Input #0, matroska,webm, from 'Video.mp4':
  Metadata:
    COMPATIBLE_BRANDS: iso6av01mp41
    MAJOR_BRAND     : dash
    MINOR_VERSION   : 0
    ENCODER         : Lavf58.20.100
  Duration: 00:03:30.70, start: -0.007000, bitrate: 213 kb/s
    Stream #0:0: Video: av1 (Main), yuv420p(tv, bt709), 256x144, 23.98 fps, 23.98 tbr, 1k tbn, 1k tbc (default)
    Metadata:
      HANDLER_NAME    : ISO Media file produced by Google Inc.
      DURATION        : 00:03:30.627000000
    Stream #0:1(eng): Audio: opus, 48000 Hz, stereo, fltp (default)
    Metadata:
      DURATION        : 00:03:30.701000000
Input #1, image2, from 'Video.png':
  Duration: 00:00:00.04, start: 0.000000, bitrate: 23403 kb/s
    Stream #1:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 1280x720 [SAR 1:1 DAR 16:9], 25 tbr, 25 tbn, 25 tbc
[mp4 @ 0x625260] track 2: codec frame size is not set
Output #0, mp4, to 'out.mp4':
  Metadata:
    COMPATIBLE_BRANDS: iso6av01mp41
    MAJOR_BRAND     : dash
    MINOR_VERSION   : 0
    encoder         : Lavf58.20.100
    Stream #0:0: Video: mjpeg (mp4v / 0x7634706D), yuvj420p(pc, bt470bg/unknown/unknown), 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 25 tbr, 12800 tbn, 25 tbc
    Stream #0:1: Video: av1 (Main) (av01 / 0x31307661), yuv420p(tv, bt709), 256x144, q=2-31, 23.98 fps, 23.98 tbr, 16k tbn, 1k tbc (default)
    Metadata:
      HANDLER_NAME    : ISO Media file produced by Google Inc.
      DURATION        : 00:03:30.627000000
    Stream #0:2(eng): Audio: opus (Opus / 0x7375704F), 48000 Hz, stereo, fltp (default)
    Metadata:
      DURATION        : 00:03:30.701000000
Stream mapping:
  Stream #1:0 -> #0:0 (copy)
  Stream #0:0 -> #0:1 (copy)
  Stream #0:1 -> #0:2 (copy)
Press [q] to stop, [?] for help
frame=    1 fps=0.0 q=-1.0 q=-1.0 size=    3840kB time=00:02:47.56 bitrate= 187.frame=    1 fps=0.0 q=-1.0 Lq=-1.0 size=    5632kB time=00:03:30.68 bitrate= 219.0kbits/s speed= 324x    
video:2275kB audio:3221kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2.464468%



    



    What am I doing wrong ?

    



    Note : It's okay if it works with python.

    


  • Conditionally rotate portrait video if landscape with FFmeg

    12 novembre 2019, par Jules

    I need to convert only portrait videos to landscape, some video maybe landscape already.

    I need to achieve this with a shell script on a mac.

    I’ve previously managed to rotate a video with ..

    ffmpeg -i "/Users/jm/Library/Mobile Documents/com~apple~QuickTimePlayerX/Documents/output.mp4"
    -strict 1 -metadata:s:v rotate="90" -codec copy "$3"

    $3 is the input file in my shell script

    I’ve found this ...

    ffmpeg -i input.m4v 2>&1 | grep rotate

    From this answer https://stackoverflow.com/a/31683689/450456

    I’m not sure how to combine the two, or have to get and use the height and width in an if statement in a shell script.

    EDIT : Info as requested

    ffmpeg -i final.mp4
    ffmpeg version 3.4.1 Copyright (c) 2000-2017 the FFmpeg developers
     built with Apple LLVM version 9.0.0 (clang-900.0.39.2)
     configuration: --prefix=/usr/local/Cellar/ffmpeg/3.4.1_2 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --disable-jack --enable-gpl --enable-libass --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --enable-openssl --disable-lzma --enable-nonfree
     libavutil      55. 78.100 / 55. 78.100
     libavcodec     57.107.100 / 57.107.100
     libavformat    57. 83.100 / 57. 83.100
     libavdevice    57. 10.100 / 57. 10.100
     libavfilter     6.107.100 /  6.107.100
     libavresample   3.  7.  0 /  3.  7.  0
     libswscale      4.  8.100 /  4.  8.100
     libswresample   2.  9.100 /  2.  9.100
     libpostproc    54.  7.100 / 54.  7.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'final.mp4':
     Metadata:
       major_brand     : qt  
       minor_version   : 0
       compatible_brands: qt  
       creation_time   : 2019-11-12T20:45:27.000000Z
     Duration: 00:00:24.36, start: 0.031667, bitrate: 365 kb/s
       Stream #0:0(und): Video: hevc (Main 10) (hvc1 / 0x31637668), yuv420p10le(tv, smpte170m/unknown/unknown), 1242x2688, 365 kb/s, 1.73 fps, 600 tbr, 600 tbn, 600 tbc (default)
       Metadata:
         creation_time   : 2019-11-12T20:45:27.000000Z
         handler_name    : Core Media Data Handler
         encoder         : HEVC
    At least one output file must be specified