
Recherche avancée
Autres articles (100)
-
Mise à jour de la version 0.1 vers 0.2
24 juin 2013, parExplications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...) -
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 ;
-
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 ) (...)
Sur d’autres sites (8870)
-
configure : Mention the dash demuxer in the libxml2 help text.
14 mai 2018, par Carl Eugen Hoyos -
ffmpeg dash/hls wrong timestamp when using mp4, -ss, and -copyts
6 décembre 2019, par user2114284I have noticed some inconsistencies with the output timestamp when using ffmpeg with the dash/hls muxers with mp4, -ss, and -coptyts and I am wondering if it is a bug or if I am just misunderstanding something about how ffmpeg is supposed to work.
Here I seek 15 seconds in the input and use the copyts argument to copy the input timestamp :
However, when checking the output with ffprobe, it shows the timestamps starting at 30 seconds, double what I would expect :
ffmpeg -ss 15 -i big_buck_bunny_720p_10mb.mkv -to 30 -copyts -acodec aac -vcodec libx264 -f hls -hls_time 2 -hls_init_time 2 -hls_list_size 0 -hls_segment_type fmp4 out.m3u8
cat init.mp4 out0.m4s | ffprobe -show_frames -pretty -
[FRAME]
media_type=video
stream_index=0
key_frame=1
pkt_pts=384000
pkt_pts_time=0:00:30.000000
pkt_dts=384000
pkt_dts_time=0:00:30.000000
best_effort_timestamp=384000
best_effort_timestamp_time=0:00:30.000000
...If I switch the hls_segment_type to mpegts, the timestamp shows around 15 seconds which I would expect :
ffmpeg -ss 15 -i big_buck_bunny_720p_10mb.mkv -to 30 -copyts -acodec aac -vcodec libx264 -f hls -hls_time 2 -hls_init_time 2 -hls_list_size 0 -hls_segment_type mpegts out.m3u8
ffprobe -i out0.ts -show_frames -pretty
[FRAME]
media_type=audio
stream_index=1
key_frame=1
pkt_pts=1474080
pkt_pts_time=0:00:16.378667
pkt_dts=1474080
pkt_dts_time=0:00:16.378667
best_effort_timestamp=1474080
best_effort_timestamp_time=0:00:16.378667
...I also see the timestamp being doubled when using -ss, -copyts, and mp4 with the dash muxer. Similarly, the dash muxer seems to output the correct timestamps when switched to webm.
I have seen the same results with several different input files. Am I misunderstanding something about how ffmpeg works, or is this a bug somewhere in the mp4 segmenting ?
-
MP4 to DASH using ffmpeg linux too slow
16 mai 2022, par daroxCurrently, I'm working at a project that contains 2000 video mp4 files, and I need convert all of them in mpeg dash files.



I have this script :



MYDIR=$(dirname $(readlink -f ${BASH_SOURCE[0]}))
SAVEDIR=$(pwd)

# Check programs
if [ -z "$(which ffmpeg)" ]; then
 echo "Error: ffmpeg is not installed"
 exit 1
fi

if [ -z "$(which MP4Box)" ]; then
 echo "Error: MP4Box is not installed"
 exit 1
fi

cd "$MYDIR"

TARGET_FILES=$(find ./ -maxdepth 1 -type f \( -name "*.mov" -or -name "*.mp4" \))
for f in $TARGET_FILES
do
 fe=$(basename "$f") # fullname of the file
 f="${fe%.*}" # name without extension

 if [ ! -d "${f}" ]; then #if directory does not exist, convert
 echo "Converting \"$f\" to multi-bitrate video in MPEG-DASH"

 mkdir "${f}"

 ffmpeg -y -i "${fe}" -c:a aac -b:a 192k -vn "${f}_audio.m4a"


 ffmpeg -y -i "${fe}" -preset slow -tune film -vsync passthrough -write_tmcd 0 -an -c:v libx264 -x264opts 'keyint=25:min-keyint=25:no-scenecut' -crf 23 -maxrate 800k -bufsize 2000k -pix_fmt yuv420p -vf "scale=-2:720" -f mp4 "${f}_800.mp4"
 # static file for ios and old browsers and mobile safari
 ffmpeg -y -i "${fe}" -preset slow -tune film -movflags +faststart -vsync passthrough -write_tmcd 0 -c:a aac -b:a 160k -c:v libx264 -crf 23 -maxrate 1400 -bufsize 3000k -pix_fmt yuv420p -f mp4 "${f}/${f}.mp4"


 rm -f ffmpeg*log*
 # if audio stream does not exist, ignore it
 if [ -e "${f}_audio.m4a" ]; then
 MP4Box -dash-strict 2000 -rap -frag-rap -bs-switching no -profile "dashavc264:live" "${f}_5000.mp4" "${f}_3000.mp4" "${f}_1500.mp4" "${f}_800.mp4" "${f}_400.mp4" "${f}_audio.m4a" -out "${f}/${f}.mpd"
 rm "${f}_5000.mp4" "${f}_3000.mp4" "${f}_1500.mp4" "${f}_800.mp4" "${f}_400.mp4" "${f}_audio.m4a"
 else
 MP4Box -dash-strict 2000 -rap -frag-rap -bs-switching no -profile "dashavc264:live" "${f}_5000.mp4" "${f}_3000.mp4" "${f}_1500.mp4" "${f}_800.mp4" "${f}_400.mp4" -out "${f}/${f}.mpd"
 rm "${f}_5000.mp4" "${f}_3000.mp4" "${f}_1500.mp4" "${f}_800.mp4" "${f}_400.mp4" 
 fi
 # create a jpg for poster. Use imagemagick or just save the frame directly from ffmpeg is you don't have cjpeg installed.
 ffmpeg -i "${fe}" -ss 00:00:00 -vframes 1 -qscale:v 10 -n -f image2 - | cjpeg -progressive -quality 75 -outfile "${f}"/"${f}".jpg

 fi

done

cd "$SAVEDIR"




This is working fine, but, taking a long time to convert only single file, I have intel 7 and a simple mp4 file take 30 min to be converted. How can I accelerate this process ? Must I change something in this script ?



Thank you.