
Recherche avancée
Médias (91)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
-
avec chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
sans chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
config chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
SPIP - plugins - embed code - Exemple
2 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
Autres articles (87)
-
Organiser par catégorie
17 mai 2013, parDans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...) -
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...) -
Récupération d’informations sur le site maître à l’installation d’une instance
26 novembre 2010, parUtilité
Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)
Sur d’autres sites (4286)
-
KeyError : 'video_fps' with moviepy ffmpeg
11 août 2020, par Ethan ShoeI 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 JulesI 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