
Recherche avancée
Médias (1)
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
Autres articles (111)
-
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 (12268)
-
error building ffmpeg on mac high sierra 10.13 "workspace/bin/ffmpeg' : No such file or directory"
14 mars 2023, par MartinHello I am trying to create a shell script
buildffmpeg.sh
which when ran, will download and build ffmpeg, so you can automate the process of making a custom ffmpeg build where the end result is an ffmpeg and ffprobe executable.

If you run the below script on mac or linux, it's worked perfectly, but when I test on my older macos 10.13 version, I first got an error about my ffmpeg snapshot url being too old :

FFMPEG_URL="https://git.ffmpeg.org/gitweb/ffmpeg.git/snapshot/74c4c539538e36d8df02de2484b045010d292f2c.tar.gz"

so I updated the var so it 'should' link to ffmpeg 6.0 (the most recent version, but im not sure if my link is correct)
FFMPEG_URL="https://git.ffmpeg.org/gitweb/ffmpeg.git/snapshot/adb4688bfb0652b2ffa5bc29e53761e27e1a3b3e.tar.gz"


When I run my below script on my mac terminal with the command
$ ./buildffmpeg.sh
it prints out '11' and then fails with an error :

...
INSTALL libavutil/ffversion.h
INSTALL libavutil/libavutil.pc
~11~
/Library/Developer/CommandLineTools/usr/bin/objdump: '/Users/apple/Documents/projects/buildffmpeghighsierra/workspace/bin/ffmpeg': No such file or directory



With the error being
workspace/bin/ffmpeg': No such file or directory


Is there something wrong with how my script builds ffmpeg ?


#!/bin/bash

set -e

CWD=$(pwd)
PACKAGES="$CWD/packages"
WORKSPACE="$CWD/workspace"
ADDITIONAL_CONFIGURE_OPTIONS=""


mkdir -p "$PACKAGES"
mkdir -p "$WORKSPACE"
echo '~0~'
FFMPEG_TAG="$1"
FFMPEG_URL="https://git.ffmpeg.org/gitweb/ffmpeg.git/snapshot/adb4688bfb0652b2ffa5bc29e53761e27e1a3b3e.tar.gz"
echo '~1~'
FFMPEG_ARCHIVE="$PACKAGES/ffmpeg.tar.gz"
echo '~2~'
if [ ! -f "$FFMPEG_ARCHIVE" ]; then
 echo "Downloading tag ${FFMPEG_TAG}..."
 echo "~2.1~ FFMPEG_ARCHIVE=$FFMPEG_ARCHIVE"
 echo "~2.2~ FFMPEG_URL=$FFMPEG_URL"
 curl -L -k -o "$FFMPEG_ARCHIVE" "$FFMPEG_URL"
fi
echo '~3~'
EXTRACTED_DIR="$PACKAGES/extracted"
echo '~4~'
mkdir -p "$EXTRACTED_DIR"
echo '~5~'
echo "Extracting..."
tar -xf "$FFMPEG_ARCHIVE" --strip-components=1 -C "$EXTRACTED_DIR"
echo '~6~'
cd "$EXTRACTED_DIR"
echo '~7~'
echo "Building..."
echo '~8~'
# Min electron supported version
MACOS_MIN="10.10"
echo '~9~'
./configure $ADDITIONAL_CONFIGURE_OPTIONS \
 --pkgconfigdir="$WORKSPACE/lib/pkgconfig" \
 --pkg-config-flags="--static" \
 --extra-cflags="-I$WORKSPACE/include -mmacosx-version-min=${MACOS_MIN}" \
 --extra-ldflags="-L$WORKSPACE/lib -mmacosx-version-min=${MACOS_MIN}" \
 --extra-libs="-lpthread -lm" \
 --enable-static \
 --disable-securetransport \
 --disable-debug \
 --disable-shared \
 --disable-ffplay \
 --disable-lzma \
 --disable-doc \
 --enable-version3 \
 --enable-pthreads \
 --enable-runtime-cpudetect \
 --enable-avfilter \
 --enable-filters \
 --disable-libxcb \
 --enable-gpl \
 --disable-libass \
 --enable-libmp3lame \
 --enable-libx264 
echo '~10~'
make -j 4
echo '~11~'
make install
echo '~11~'
otool -L "$WORKSPACE/bin/ffmpeg"
echo '~12~'
otool -L "$WORKSPACE/bin/ffprobe"
echo '~13~'
echo "Building done. The binaries can be found here: $WORKSPACE/bin/ffmpeg $WORKSPACE/bin/ffprobe"
echo '~14~'
mkdir ffmpeg-mac/ 
echo '~15~'
cp -r "$WORKSPACE/bin/" "$CWD/ffmpeg-mac/"
echo '~16~'
rm -rf "$PACKAGES"
echo '~17~'
rm -rf "$WORKSPACE"
echo '~18~'
exit 0



-
Evolution #3967 : Suivre les redirections http/https/proxy
9 juillet 2017, par b bJe rebondis sur le commentaire de fil avec #3973.
-
Start and end time of MoviePy's VideoClip not working
21 mars 2024, par ernesto casco velazquezI'm trying to add captions to a video. The desired outcome is to show each word in the exact moment is being said.


I have a method that gives me the accurate time start and end per each word :


def get_words_per_time(audio_speech_file):
 model = whisper.load_model("base")
 transcribe = model.transcribe(
 audio=audio_speech_file, fp16=False, word_timestamps=True
 )
 segments = transcribe["segments"]
 words = []

 for seg in segments:
 for word in seg["words"]:
 words.append(
 {
 "word": word["word"],
 "start": word["start"],
 "end": word["end"],
 "prob": round(word["probability"], 4),
 }
 )
 return words



Then I have a code that uses MoviePy to create TextClip and assing a given start and end time per pair of words (I know there are redundant statements, srry) :


def generate_captions(
 words,
 font="Komika",
 fontsize=32,
 color="White",
 align="center",
 stroke_width=3,
 stroke_color="black",
):
 text_comp = []
 for i in track(range(0, len(words), 2), description="Creating captions..."):
 word1 = words[i]
 if i + 1 < len(words):
 word2 = words[i + 1]
 text_clip = TextClip(
 f"{word1['word']} {word2['word'] if i + 1 < len(words) else ''}",
 font=font, # Change Font if not found
 fontsize=fontsize,
 color=color,
 align=align,
 method="caption",
 size=(660, None),
 stroke_width=stroke_width,
 stroke_color=stroke_color,
 )
 text_clip = text_clip.set_start(word1["start"])
 text_clip = text_clip.set_end(
 word2["end"] if i + 1 < len(words) else word1["end"]
 )
 text_comp.append(text_clip)
 return text_comp



Finally, I concatenate the words into a single video :


vid_clip = CompositeVideoClip(
 [vid_clip, concatenate_videoclips(text_comp).set_position(("center", 860))]
)



The output is this, but you can clearly see the words are not flowing with the speech. They somehow move faster as if the start/end time did not matter. Here's the video


The words with their respective start/end time, look like this :


[
 {
 'word': 'This',
 'start': 0.0,
 'end': 0.22,
 'prob': 0.805
 },
 {
 'word': 'is',
 'start': 0.22,
 'end': 0.42,
 'prob': 0.9991
 },
 {
 'word': 'a',
 'start': 0.42,
 'end': 0.6,
 'prob': 0.999
 },
 {
 'word': 'test,
 ',
 'start': 0.6,
 'end': 1.04,
 'prob': 0.9939
 },
 {
 'word': 'to',
 'start': 1.18,
 'end': 1.3,
 'prob': 0.9847
 },
 {
 'word': 'show',
 'start': 1.3,
 'end': 1.54,
 'prob': 0.9971
 },
 {
 'word': 'words',
 'start': 1.54,
 'end': 1.9,
 'prob': 0.995
 },
 {
 'word': 'does',
 'start': 1.9,
 'end': 2.16,
 'prob': 0.997
 },
 {
 'word': 'not',
 'start': 2.16,
 'end': 2.4,
 'prob': 0.9978
 },
 {
 'word': 'appear.',
 'start': 2.4,
 'end': 2.82,
 'prob': 0.9984
 },
 {
 'word': 'At',
 'start': 3.46,
 'end': 3.6,
 'prob': 0.9793
 },
 {
 'word': 'their',
 'start': 3.6,
 'end': 3.8,
 'prob': 0.9984
 },
 {
 'word': 'proper',
 'start': 3.8,
 'end': 4.22,
 'prob': 0.9976
 },
 {
 'word': 'time.',
 'start': 4.22,
 'end': 4.72,
 'prob': 0.999
 },
 {
 'word': 'Thanks',
 'start': 5.04,
 'end': 5.4,
 'prob': 0.9662
 },
 {
 'word': 'for,
 ',
 'start': 5.4,
 'end': 5.66,
 'prob': 0.9941
 },
 {
 'word': 'watching.',
 'start': 5.94,
 'end': 6.36,
 'prob': 0.7701
 }
]



What could be causing this ?