
Recherche avancée
Autres articles (62)
-
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...) -
Support audio et vidéo HTML5
10 avril 2011MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...) -
MediaSPIP Init et Diogène : types de publications de MediaSPIP
11 novembre 2010, parÀ l’installation d’un site MediaSPIP, le plugin MediaSPIP Init réalise certaines opérations dont la principale consiste à créer quatre rubriques principales dans le site et de créer cinq templates de formulaire pour Diogène.
Ces quatre rubriques principales (aussi appelées secteurs) sont : Medias ; Sites ; Editos ; Actualités ;
Pour chacune de ces rubriques est créé un template de formulaire spécifique éponyme. Pour la rubrique "Medias" un second template "catégorie" est créé permettant d’ajouter (...)
Sur d’autres sites (5101)
-
How can I manually extract Metadata from mp4 Videoframes ?
3 décembre 2020, par bennimuellerI have a large GoPro Video about 11:44 min. Each second the GoPro records 30 frames with datetime(UNIX) and gps(lat, long) information. So there are round about 21188 frames in my video.


I need to extract the GPS data to bring every single frame to a map. There's a tool called GoProtelemetryextractor (https://goprotelemetryextractor.com/free/). This gives me a csv file with 19800 lines (1 line for each frame). Obviously there are 1400 rows/frames missing in the csv. If I now multiplex the csv with the mp4 in a GIS software, the frames get assigned to wrong "csv frames". I need to match these 19800 frames correctly to the frames in the video by deleting "None metadata frames" out of the video.
I guess the problem is that the goprotelemetry extractor starts writing the csv with the first metadata it finds. And not starting at the first frame and just write "NO METADATA ROWS".


Basically my question is : How can I extract the metadata from each mp4 Frame "manually" to know where the csv "starts" and match video and csv ?


-
How can I sync the frames of multiple videos from a multi-camera capture system using FFMPEG
9 février 2023, par user9114146I have a multi-camera capture setup with 2 canon cameras. Each of these cameras have a tentacle sync e timecode generator connected to them.


After a video capture with these 2 cameras, the generated timecode (SMPTE format) is stored in the video files metadata.


It looks like this
00:00:53;30


Is there a bash script that uses FFmpeg to trim the start time of the video that started earlier (based on timecode) to match the other and then trim the end time of the video that ended last to match the one that ended first ?


The two trimmed output videos should be synced based on the timecode and have the same duration.


So far, my bash script looks like this :


file1="A001C002_220101EB_CANON.MXF"
file2="A001C002_220101US_CANON.MXF"

# Get the SMPTE timecodes of the two files
timecode1=$(ffmpeg -i "$file1" 2>&1 | sed -n 's/timecode.*: \(.*\)/\1/p')
timecode2=$(ffmpeg -i "$file2" 2>&1 | sed -n 's/timecode.*: \(.*\)/\1/p')

# Convert the SMPTE timecode to start time in seconds
start_time_1=$(echo "$timecode1" | awk -F ':' '{print 3600*$1 + 60*$2 + $3}')
start_time_2=$(echo "$timecode2" | awk -F ':' '{print 3600*$1 + 60*$2 + $3}')

# Trim the start of the video with the earlier start timecode so that both videos have the same start time
if [ "$start_time_1" -lt "$start_time_2" ]; then
 ffmpeg -i "$file1" -ss "$start_time_2" -c:v libx264 -crf 18 -preset veryfast trimmed_file1.mp4
 ffmpeg -i "$file2" -c:v libx264 -crf 18 -preset veryfast trimmed_file2.mp4
else
 ffmpeg -i "$file2" -ss "$start_time_1" -c:v libx264 -crf 18 -preset veryfast trimmed_file2.mp4
 ffmpeg -i "$file1" -c:v libx264 -crf 18 -preset veryfast trimmed_file1.mp4
fi

# Get the duration of both files
duration_1=$(ffmpeg -i trimmed_file1.mp4 2>&1 | grep "Duration" | cut -d ' ' -f 4 | sed s/,//)
duration_2=$(ffmpeg -i trimmed_file2.mp4 2>&1 | grep "Duration" | cut -d ' ' -f 4 | sed s/,//)

# Convert the duration to seconds
duration_1_secs=$(echo $duration_1 | awk -F: '{ print ($1 * 3600) + ($2 * 60) + $3 }')
duration_2_secs=$(echo $duration_2 | awk -F: '{ print ($1 * 3600) + ($2 * 60) + $3 }')

# Trim the end time of the video that ended last to match the one that ended first
if [ "$duration_1_secs" -gt "$duration_2_secs" ]; then
 echo "Trimming end time of file1 to match file2"
 ffmpeg -i trimmed_file1.mp4 -t "$duration_2" -c:v libx264 -c:a aac trimmed_file1.mp4
else
 echo "Trimming end time of file2 to match file1"
 ffmpeg -i trimmed_file2.mp4 -t "$duration_1" -c:v libx264 -c:a aac trimmed_file2.mp4
fi



But this does not make the videos have matching frames.


Thanks !


-
dashenc : Write segment timelines properly if the timeline has gaps
28 novembre 2014, par Martin Storsjödashenc : Write segment timelines properly if the timeline has gaps
Write a new start time if the duration of the previous segment
didn’t match the start of the next one. Check that segments
actually are continuous before writing a repeat count.This makes sure timestamps deduced from the timeline actually
match the real start timestamp as written in filenames (if
using a template containing $Time$).Signed-off-by : Martin Storsjö <martin@martin.st>