
Recherche avancée
Médias (1)
-
Collections - Formulaire de création rapide
19 février 2013, par
Mis à jour : Février 2013
Langue : français
Type : Image
Autres articles (66)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs
12 avril 2011, parLa manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.
Sur d’autres sites (12705)
-
How to change resolution without compromising video quality using ffmpeg ?
20 mars 2024, par blake bankerI'm trying to develop a simple video transcoding system.
When you upload a video,
After extracting the video and audio separately,
I want to encode them at 360, 720, and 1080p resolutions respectively and then merge them to create three final mp4 files.
At this time, I have two questions.


- 

-
Is there a big difference between encoding the video and audio separately in the original video file and encoding the original video file as is ? In a related book, it is said that a system is created by separating video and audio, and I am curious as to why.


-
I want to change the resolution without compromising the original image quality. At this time, the resolution of the uploaded file can be known at the time of upload. As a test, I created files according to each resolution, and found that the image quality was damaged. If I want to change only the resolution while keeping the original image quality, I would like to know how to adjust each ffmpeg option. We plan to change it to 360, 720, and 1080p.








-
-
How can I add chapters to a mp4 file using bash script and ffmpeg
17 septembre 2023, par Rick TI'm trying to add chapters to an mp4 file using bash and ffmpeg. The chapters are located in a file called
chapters.txt
. When the bash script is run which is calledadd_chapters.sh
it reads thechapters.txt
file and creates a file calledchapters.ffmetadata
. The issue is that theSTART
andEND
times in the filechapters.ffmetadata
aren't being created correctly. How can I fix this ?

- 

-
I have a file called
chapters.txt
that has the chapters in it.

00:00:00=Intro
00:02:12=What are selections
00:03:19=Booleans



-
The bash file I run is
add_chapters.sh


The code in it is :


#!/bin/bash

input_file="chapters.txt"
output_file="chapters.ffmetadata"

# Create the FFmetadata chapter file
echo ";FFMETADATA1" > "$output_file"

previous_seconds=0

while IFS="=" read -r timestamp chapter_name; do
 # Convert start time to seconds
 seconds=$(date -u -d "1970-01-01 $timestamp" +"%s")

 # Calculate the end time (previous chapter's start time)
 end_seconds=$previous_seconds

 # Update previous_seconds for the next iteration
 previous_seconds=$seconds

 echo "[CHAPTER]" >> "$output_file"
 echo "TIMEBASE=1/1000" >> "$output_file"
 echo "START=${end_seconds}000" >> "$output_file"
 echo "END=${seconds}000" >> "$output_file"
 echo "title=$chapter_name" >> "$output_file"
done < "$input_file"

echo "Chapter file '$output_file' created successfully."

# Run FFmpeg to add chapters to the video
ffmpeg -i input_video.mp4 -i chapters.ffmetadata -map_metadata 1 -c:v copy -c:a copy -y output_video.mp4



-
It creates a file called
chapters.ffmetadata


;FFMETADATA1
[CHAPTER]
TIMEBASE=1/1000
START=0000
END=0000
title=Intro
[CHAPTER]
TIMEBASE=1/1000
START=0000
END=132000
title=What are selections
[CHAPTER]
TIMEBASE=1/1000
START=132000
END=199000
title=Booleans
[CHAPTER]
TIMEBASE=1/1000
START=199000
END=0000
title=



The
START
andEND
times aren't being calculated correctly. How can I fix this ?










UPDATE #1


I'm almost there thanks to @Freeman code / answer.


The issues in the generated

chapters.ffmetadata
file are just.

- 

-
The first
START=
andEND=
are0000


-
The Intro Chapter doesn't show up (most likely caused by the first
START=
andEND=
being0000
)

-
The Chapters seem to be shifted down by one timecode line (most likely caused by the first
START=
andEND=
being0000
)

;FFMETADATA1
[CHAPTER]
TIMEBASE=1/1000
START=0000
END=0000
title=Intro
[CHAPTER]
TIMEBASE=1/1000
START=0000
END=132000
title=What are selections ?
[CHAPTER]
TIMEBASE=1/1000
START=132000
END=199000
title=Booleans
[CHAPTER]
TIMEBASE=1/1000
START=199000
END=0000
title=
[CHAPTER]
TIMEBASE=1/1000
START=0000
END=4459000
title=











UPDATE #2


Strange ; I tried the changes @Freeman suggested but an error comes up now.


Chapter end time 0 before start 199000
chapters.ffmetadata : Cannot allocate memory


;FFMETADATA1
[CHAPTER]
TIMEBASE=1/1000
START=0000
END=0000
title=Intro
[CHAPTER]
TIMEBASE=1/1000
START=0000
END=132000
title=What are selections?
[CHAPTER]
TIMEBASE=1/1000
START=132000
END=199000
title=Booleans
[CHAPTER]
TIMEBASE=1/1000
START=199000
END=0000
title=
[CHAPTER]
TIMEBASE=1/1000
START=0000
END=4459000
title=




UPDATE #3 using his awk changes


;FFMETADATA1
[CHAPTER]
TIMEBASE=1/1000
START=0000
END=0000
title=Intro
[CHAPTER]
TIMEBASE=1/1000
START=0000
END=132000
title=What are selections?
[CHAPTER]
TIMEBASE=1/1000
START=132000
END=199000
title=Booleans
[CHAPTER]
TIMEBASE=1/1000
START=199000
END=0000
title=



-
-
avutil/bfin : remove dead code
4 juillet 2023, par Zhao Zhili