
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (37)
-
Contribute to documentation
13 avril 2011Documentation is vital to the development of improved technical capabilities.
MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
To contribute, register to the project users’ mailing (...) -
Selection of projects using MediaSPIP
2 mai 2011, parThe examples below are representative elements of MediaSPIP specific uses for specific projects.
MediaSPIP farm @ Infini
The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...) -
Use, discuss, criticize
13 avril 2011, parTalk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
A discussion list is available for all exchanges between users.
Sur d’autres sites (8354)
-
How to shrink/expand a video file length in UNIX
26 mars 2015, par Maria FeenaI need to shrink/expand a video file (mp4, avi) length using command line tools,
say the original file have 1 min length and output file should have length of 1:10 min or 0:50 min. I would like to keep other aspects of the video as it is.
I would like to do same thing on mp3 file too. there are many files so I need to do it all in command line only.
help me please.
-
mov : Fix handling of zero-length metadata values
15 décembre 2014, par Martin Storsjömov : Fix handling of zero-length metadata values
Since 3cec81f4d4, a zero-length metadata value would try to
allocate 2*0 bytes, where av_malloc() returns NULL.Always add one to the allocated length, to allow space for
a null terminator in the zero-length case.Incidentally, this fixes fate-alac on RVCT 4.0, where a compiler
bug seems to mess up the mov muxer to the point that it writes
the wrong sort of metadata. Previously this bug was undetected,
but since 3cec81f4d4 such mov files started returning
AVERROR(ENOMEM) in the mov demuxer.Signed-off-by : Martin Storsjö <martin@martin.st>
-
Script doesnt recognize bars / length right for cutting audio , ffmpeg terminal
14 avril 2024, par totzillarbeatsThis terminal script doesn't recognize bars / length right for cutting audio, maybe somebody knows what's wrong with the calculation ...


Would be happy about any help the cutting already works !


#!/bin/bash

# Function to extract BPM from filename

get_bpm() {
 local filename="$1"
 local bpm=$(echo "$filename" | grep -oE '[0-9]{1,3}' | head -n1)
 echo "$bpm"
}

# Function to cut audio based on BPM
cut_audio() {
 local input_file="$1"
 local bpm="$2"
 local output_file="${input_file%.*}_cut.${input_file##*.}" # Appends "_cut" to original filename

 # Define the number of beats per bar (assuming 4 beats per bar)
 beats_per_bar=4

 # Calculate the duration of each bar in seconds
 bar_duration=$((60 * beats_per_bar / bpm))

 # Define start and end times for each bar range
 start_times=(0 21 33 45 57 69 81 93 105 117 129 141)
 end_times=(20 29 41 53 65 77 89 101 113 125 137 149)

 # Iterate through each bar range
 for ((i = 0; i < ${#start_times[@]}; i++)); do
 start_time=${start_times[$i]}
 end_time=${end_times[$i]}
 echo "Cutting audio file $input_file at $bpm BPM for bar $((i + 1)) ($start_time-$end_time) for $bar_duration seconds..."

 # Cut audio for current bar range using ffmpeg
 ffmpeg -i "$input_file" -ss "$start_time" -to "$end_time" -c copy "$output_file"_"$((i + 1)).${input_file##*.}" -y
 done

 # Check if the output files are empty and delete them if so
 for output_file in "${output_file}"_*; do
 if [ ! -s "$output_file" ]; then
 echo "Output file $output_file is empty. Deleting..."
 rm "$output_file"
 fi
 done

 echo "Audio cut and saved as $output_file"
}


# Main script
if [ "$#" -eq 0 ]; then
 echo "Usage: $0 [audio_file1] [audio_file2] ..."
 exit 1
fi

for file in "$@"; do
 bpm=$(get_bpm "$file")
 if [ -z "$bpm" ]; then
 echo "Error: No BPM found in filename $file"
 else
 cut_audio "$file" "$bpm"
 fi
done



Maybe its only the math calc in the beginning but idk :)


If you need more details just lmk