
Recherche avancée
Autres articles (64)
-
Le profil des utilisateurs
12 avril 2011, parChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...) -
Configurer la prise en compte des langues
15 novembre 2010, parAccéder à la configuration et ajouter des langues prises en compte
Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...) -
XMP PHP
13 mai 2011, parDixit Wikipedia, XMP signifie :
Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)
Sur d’autres sites (4950)
-
ffmpeg with frei0r libraries fails on os x 10.14.6
13 novembre 2019, par Bernhard WagnerI’m on Mac OS X 10.14.6 (Mojave), used homebrew to install both ffmpeg and frei0r.
If you check the output below, the option--enable-frei0r
is there.I verified the path to the frei0r libaries and call ffmpeg like this :
FREI0R_PATH=/usr/local/Cellar/frei0r/1.6.1/lib/frei0r-1/ ffmpeg -v debug -i running.mkv -filter:v frei0r=pixeliz0r=0.02:0.02 pixel.mkv
however it fails the exact same way as if I hadn’t passed the env var FREI0R_PATH :
FREI0R_PATH=/usr/local/Cellar/frei0r/1.6.1/lib/frei0r-1/ ffmpeg -y -v debug -i running.mkv -filter:v frei0r=pixeliz0r=0.02:0.02 pixel.mkv
ffmpeg version 4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
built with Apple clang version 11.0.0 (clang-1100.0.33.8)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.2.1_2 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags='-I/Library/Java/JavaVirtualMachines/adoptopenjdk-13.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-13.jdk/Contents/Home/include/darwin -fno-stack-check' --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --disable-libjack --disable-indev=jack
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
libpostproc 55. 5.100 / 55. 5.100
Splitting the commandline.
Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
Reading option '-v' ... matched as option 'v' (set logging level) with argument 'debug'.
Reading option '-i' ... matched as input url with argument 'running.mkv'.
Reading option '-filter:v' ... matched as option 'filter' (set stream filtergraph) with argument 'frei0r=pixeliz0r=0.02:0.02'.
Reading option 'pixel.mkv' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option y (overwrite output files) with argument 1.
Applying option v (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input url running.mkv.
Successfully parsed a group of options.
Opening an input file: running.mkv.
[NULL @ 0x7f894e002000] Opening 'running.mkv' for reading
[file @ 0x7f894ce20f40] Setting default whitelist 'file,crypto'
[matroska,webm @ 0x7f894e002000] Format matroska,webm probed with size=2048 and score=100
st:0 removing common factor 1000000 from timebase
st:1 removing common factor 1000000 from timebase
[matroska,webm @ 0x7f894e002000] Before avformat_find_stream_info() pos: 1021 bytes read:32768 seeks:0 nb_streams:2
[h264 @ 0x7f894e003400] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0x7f894e003400] nal_unit_type: 8(PPS), nal_ref_idc: 3
[h264 @ 0x7f894e003400] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0x7f894e003400] nal_unit_type: 8(PPS), nal_ref_idc: 3
[h264 @ 0x7f894e003400] nal_unit_type: 5(IDR), nal_ref_idc: 1
[h264 @ 0x7f894e003400] Format yuv420p chosen by get_format().
[h264 @ 0x7f894e003400] Reinit context to 1280x720, pix_fmt: yuv420p
[h264 @ 0x7f894e003400] no picture
[matroska,webm @ 0x7f894e002000] All info found
[matroska,webm @ 0x7f894e002000] After avformat_find_stream_info() pos: 26157 bytes read:32768 seeks:0 frames:5
Input #0, matroska,webm, from 'running.mkv':
Metadata:
MINOR_VERSION : 0
COMPATIBLE_BRANDS: iso6avc1mp41
MAJOR_BRAND : dash
ENCODER : Lavf58.29.100
Duration: 00:00:46.22, start: -0.013000, bitrate: 2189 kb/s
Stream #0:0, 3, 1/1000: Video: h264 (Main), 1 reference frame, yuv420p(tv, bt709, progressive, left), 1280x720 [SAR 1:1 DAR 16:9], 0/1, 60 fps, 60 tbr, 1k tbn, 120 tbc (default)
Metadata:
HANDLER_NAME : ISO Media file produced by Google Inc.
DURATION : 00:00:46.216000000
Stream #0:1(eng), 2, 1/1000: Audio: opus, 48000 Hz, stereo, fltp, delay 312 (default)
Metadata:
DURATION : 00:00:46.194000000
Successfully opened the file.
Parsing a group of options: output url pixel.mkv.
Applying option filter:v (set stream filtergraph) with argument frei0r=pixeliz0r=0.02:0.02.
Successfully parsed a group of options.
Opening an output file: pixel.mkv.
[file @ 0x7f894ce22840] Setting default whitelist 'file,crypto'
Successfully opened the file.
detected 4 logical cores
[h264 @ 0x7f894d006a00] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0x7f894d006a00] nal_unit_type: 8(PPS), nal_ref_idc: 3
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (opus (native) -> vorbis (libvorbis))
Press [q] to stop, [?] for help
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
Last message repeated 1 times
[opus @ 0x7f894d020000] skip 312/960 samples
[h264 @ 0x7f894d006a00] nal_unit_type: 5(IDR), nal_ref_idc: 1
[h264 @ 0x7f894d006a00] Format yuv420p chosen by get_format().
[h264 @ 0x7f894d006a00] Reinit context to 1280x720, pix_fmt: yuv420p
[graph_1_in_0_1 @ 0x7f894ce3f740] Setting 'time_base' to value '1/48000'
[graph_1_in_0_1 @ 0x7f894ce3f740] Setting 'sample_rate' to value '48000'
[h264 @ 0x7f894d006a00] no picture
[graph_1_in_0_1 @ 0x7f894ce3f740] Setting 'sample_fmt' to value 'fltp'
[graph_1_in_0_1 @ 0x7f894ce3f740] Setting 'channel_layout' to value '0x3'
[graph_1_in_0_1 @ 0x7f894ce3f740] tb:1/48000 samplefmt:fltp samplerate:48000 chlayout:0x3
[format_out_0_1 @ 0x7f894ce3fdc0] Setting 'sample_fmts' to value 'fltp'
[AVFilterGraph @ 0x7f894cc07180] query_formats: 4 queried, 9 merged, 0 already done, 0 delayed
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
Last message repeated 2 times
[h264 @ 0x7f894d007000] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x7f894e030800] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x7f894e030e00] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
Last message repeated 1 times
[h264 @ 0x7f894e017c00] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0x7f894d006a00] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
[Parsed_frei0r_0 @ 0x7f894ce4fe40] Setting 'pixeliz0r' to value '0.02'
[Parsed_frei0r_0 @ 0x7f894ce4fe40] Option 'pixeliz0r' not found
[AVFilterGraph @ 0x7f894cc08340] Error initializing filter 'frei0r' with args 'pixeliz0r=0.02:0.02'
Error reinitializing filters!
Failed to inject frame into filter network: Option not found
Error while processing the decoded data for stream #0:0
[AVIOContext @ 0x7f894cc06400] Statistics: 0 seeks, 0 writeouts
[libvorbis @ 0x7f894d800c00] 44 frames left in the queue on closing
[AVIOContext @ 0x7f894ce21080] Statistics: 65536 bytes read, 0 seeks
Conversion failed! -
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("")



-
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