
Recherche avancée
Autres articles (72)
-
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 (...) -
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 (...) -
Emballe médias : à quoi cela sert ?
4 février 2011, parCe 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" ;
Sur d’autres sites (5282)
-
No such file or directory : 'ffmpeg' in Django/Docker
6 avril 2024, par tthheemmaanniiI run my Django code in Docker. I run transcription software that requires ffmpeg to function. However I've been getting the error
[Errno 2] No such file or directory: 'ffmpeg'
whenever I try to run my code.

Here's my views.py :


def initiate_transcription(request, session_id):
 ...
 with open(file_path, 'rb') as f:
 path_string = f.name
 transcript = transcribe_file(path_string,audio_language, output_file_type)

 ...



Here's my Dockerfile :


# Pull base image
FROM python:3.11.4-slim-bullseye

# Set environment variables
ENV PIP_NO_CACHE_DIR off
ENV PIP_DISABLE_PIP_VERSION_CHECK 1
ENV PYTHONUNBUFFERED 1
ENV PYTHONDONTWRITEBYTECODE 1
ENV COLUMNS 80

#install Debian and other dependencies that are required to run python apps(eg. git, python-magic).
RUN apt-get update \
 && apt-get install -y --force-yes \
 nano python3-pip gettext chrpath libssl-dev libxft-dev \
 libfreetype6 libfreetype6-dev libfontconfig1 libfontconfig1-dev\
 && rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y git
RUN apt-get update && apt-get install -y libmagic-dev
RUN apt-get -y update && apt-get -y upgrade && apt-get install -y --no-install-recommends ffmpeg


# Set working directory for Docker image
WORKDIR /code/

RUN apt-get update \
 && apt-get -y install libpq-dev gcc

# Install dependencies
COPY requirements.txt .
RUN pip install -r requirements.txt

# Copy project
COPY . .



I've searched online for possible solutions but have not been able to find anything similar to my problem


-
ffmpeg : Apply a time-based expr to control intensity of lowpass, highpass, aphaser, or aecho [closed]
17 mai 2024, par Wes ModesI am procedurally constructing complexFilters for ffmpeg via fluent-ffmpeg. My fluent-ffmpeg complex filters look like :


{
 "filter": "volume",
 "options": {
 "volume": "min(1, max(0, ((cos(PI * t * 1 / 13) * 1 + cos(PI * t * 1 / 7) * 0.5 + cos(PI * t * 1 / 3) * 0.25) +
-0.5 ) * 0.75 * -1 + 0.5))",
 "eval": "frame"
 },
 "inputs": "track_1_output",
 "outputs": "track_1_adjusted"
},



Note that I am using an expression to determine the volume dynamically.


Here I'm testing on the command line, to understand the mysteries of lightly-documented ffmpeg filters. I'm fading in and out two sources, intertwined in the output. Now I want to apply lowpass, highpass, aphaser, and/or aecho to the transitions using a time-based expr.


I've already succeeded using the volume filter to fade the sources in and out (Note that the sine has reversed polarity for the second volume filter) :


# working fade in/out
ffmpeg -i knox.mp3 -i static.mp3 -filter_complex \
"[0:a] \
 volume = 'min(1, max(0, 0.5 + 0.5 * cos(PI * t / 5)))': eval=frame \
 [a0]; \
[1:a] \
 volume = 'min(1, max(0, 0.5 - 0.5 * cos(PI * t / 5)))': eval=frame \
 [a1]; \
[a0][a1]
 amix = inputs=2: duration=shortest" \
-c:a libmp3lame -q:a 2 output.mp3



ffmpeg -filters
says that lowpass has time-based support :

T.. = Timeline support
 TSC lowpass A->A Apply a low-pass filter with 3dB point frequency.



How can I similarly apply these other filters to source1 using a time-bassed expr ? I was unsuccessful in figuring out lowpass and highpass :


# applying a lowpass filter
ffmpeg -i knox.mp3 -i static.mp3 -filter_complex \
"[0:a] \
 volume = 'min(1, max(0, 0.5 + 0.5 * cos(PI * t / 5)))': eval=frame, \
 lowpass=f=3000: mix='0.5 + 0.5 * cos(PI * t / 5)' \
 [a0]; \
[1:a] \
 volume = 'min(1, max(0, 0.5 - 0.5 * cos(PI * t / 5)))': eval=frame \
 [a1]; \
[a0][a1]
 amix = inputs=2: duration=shortest" \
-c:a libmp3lame -q:a 2 output.mp3



With the resultant error :


[Parsed_lowpass_1 @ 0x7f9a72005c00] [Eval @ 0x7ff7bec423d8] Undefined constant or missing '(' in 't/5)'
[Parsed_lowpass_1 @ 0x7f9a72005c00] Unable to parse option value "0.5 + 0.5 * cos(PI * t / 5)"
Error applying option 'mix' to filter 'lowpass': Invalid argument



What complicated fffmpeg faerie magic is needed to make some of the filters other than volume controlled by a time-based expr ?


-
ffmpeg : Apply a time-based expression to control lowpass, highpass, aphaser, or aecho [closed]
17 mai 2024, par Wes ModesI am constructing complexFilters to procedurally generate audio with ffmpeg via fluent-ffmpeg. The interesting part of my fluent-ffmpeg complex filters look like :


{
 "filter": "volume",
 "options": {
 "volume": "min(1, max(0, ((cos(PI * t * 1 / 13) * 1 + cos(PI * t * 1 / 7) * 0.5 + cos(PI * t * 1 / 3) * 0.25) +
-0.5 ) * 0.75 * -1 + 0.5))",
 "eval": "frame"
 },
 "inputs": "track_1_output",
 "outputs": "track_1_adjusted"
},



Note that I am using an expression to determine the volume dynamically. To simplify my tests, I'm constructing complexFilters on the command line to understand the mysteries of some of the lightly-documented ffmpeg filters. Here's a working CLI test of using the volume filter to fade the sources in and out according to a time-based expresssion :


# working fade in/out
ffmpeg -i knox.mp3 -i static.mp3 -filter_complex \
"[0:a] \
 volume = 'min(1, max(0, 0.5 + 0.5 * cos(PI * t / 5)))': eval=frame \
 [a0]; \
[1:a] \
 volume = 'min(1, max(0, 0.5 - 0.5 * cos(PI * t / 5)))': eval=frame \
 [a1]; \
[a0][a1]
 amix = inputs=2: duration=shortest" \
-c:a libmp3lame -q:a 2 output.mp3



Now I want to apply lowpass, highpass, aphaser, and/or aecho to the transitions using a time-based expression. For instance, looking at lowpasss, according to
ffmpeg -filters
it says that it has time-based support :

T.. = Timeline support
 TSC lowpass A->A Apply a low-pass filter with 3dB point frequency.



How can I similarly apply a time-based expression to lowpass, highpass, aphaser, or aecho ? I thought the
mix
option might be the key, but I couldn't construct a working example and couldn't find any examples.

# applying a lowpass filter
ffmpeg -i knox.mp3 -filter_complex \
"[0:a] \
 lowpass=f=3000:mix='0.5 + 0.5 * cos(PI * t / 5)';" \
-c:a libmp3lame -q:a 2 output.mp3



Or if you prefer the fluent-ffmpeg filter :


const ffmpeg = require('fluent-ffmpeg');

ffmpeg('knox.mp3')
 .complexFilter([
 {
 filter: 'lowpass',
 options: {
 f: 3000,
 mix: '0.5 + 0.5 * cos(PI * t / 5)'
 },
 inputs: '[0:a]',
 }
 ])
 .audioCodec('libmp3lame')
 .audioQuality(2)
 .save('output.mp3')
 .on('end', () => {
 console.log('Processing finished successfully');
 })
 .on('error', (err) => {
 console.error('Error: ' + err.message);
 });



With the resultant error :


[Parsed_lowpass_1 @ 0x7f9a72005c00] [Eval @ 0x7ff7bec423d8] Undefined constant or missing '(' in 't/5)'
[Parsed_lowpass_1 @ 0x7f9a72005c00] Unable to parse option value "0.5 + 0.5 * cos(PI * t / 5)"
Error applying option 'mix' to filter 'lowpass': Invalid argument



What complicated fffmpeg faerie magic is needed to make some of the filters other than volume controlled by a time-based expr ?