
Recherche avancée
Médias (1)
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
Autres articles (89)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...) -
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
Sur d’autres sites (13814)
-
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.


-
avcodec/hevc_sei : replace en dash character with a hyphen
6 décembre 2020, par James Almer