
Recherche avancée
Autres articles (73)
-
Demande de création d’un canal
12 mars 2010, parEn fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...) -
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
Le profil des utilisateurs
12 avril 2011, parChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)
Sur d’autres sites (6313)
-
FFMPEG store method : Separated fields ?
17 février 2021, par Caloux FldI am using FFMPEG with GPU h264_nvenc codec to upscale MPEG2 interlaced files.
h264_nvenc generate h264 with the store method : Separate fields (in mediaInfo) instead of the store method : Interleaved fields. These files with separate fields seems to be incompatible with tools like GVG Edius. How to change this store method ?


with ffmpeg version N-92103-gebc3d04b8d Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 8.2.1 (GCC) 20180813


Command FFMPEG :


-ss 00:14:45 -hwaccel cuda -c:v mpeg2_cuvid -i "input.mpg" -t 00:00:10 -vf "scale=if(gt(dar\,1.6)\,1920\,1460):1080:flags=lanczos:interl=1" -c:v h264_nvenc -pix_fmt nv12 -flags +ilme+ildct -b:v 16M -maxrate:v 22M -bufsize:v 8M -profile:v high -level:v 4.1 -rc:v vbr -coder:v cabac -f mp4 -y "inputUpscaled_GPU.MP4"



mediainfo testUpscale_GPU.MP4 :


Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.1
Format settings : CABAC / 1 Ref Frames
Format settings, CABAC : Yes
Format settings, Reference frames : 1 frame
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 10 s 0 ms
Bit rate mode : Variable
Bit rate : 17.8 Mb/s
Maximum bit rate : 22.0 Mb/s
Width : 1 460 pixels
Height : 1 080 pixels
Display aspect ratio : 4:3
Frame rate mode : Constant
Frame rate : 25.000 FPS
Original frame rate : 50.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Interlaced
Scan type, store method : Separated fields
Scan order : Top Field First
Bits/(Pixel*Frame) : 0.451
Stream size : 21.2 MiB (99%)
Codec configuration box : avcC



-
script doesnt recognize bars / lenght right for cutting audio , ffmpeg terminal
14 avril 2024, par totzillarbeatsThis Terminal script doesnt recognize bars / lenght right for cutting audio , maybe somebody knows whats 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


-
two pass encoding in ffmpeg
7 août 2015, par RobinI will be encoding different videos uploaded by the user asynchronously in my server. I saw this post, and according to this, this is how to endcode two pass encoding :
ffmpeg -y -i input -c:v libx264 -preset medium -b:v 555k -pass 1 -c:a libfdk_aac -b:a 128k -f mp4 /dev/null && \
ffmpeg -i input -c:v libx264 -preset medium -b:v 555k -pass 2 -c:a libfdk_aac -b:a 128k output.mp4I noticed the -pass 1 and -pass 2 flags. But I tried encoding a video by just giving it a -pass 2 flag without first encoding in -pass 1 flag. Although I had this warning, it executed anyway :
2nd pass has more frames than 1st pass
So, my concern is how will ffmpeg know which one is the first pass so that it can do its pass 2 encoding ? And since many videos will be uploaded simultaneously I can’t keep them all at the /dev/null won’t it will replace one with another. So how can I manage it ?
Your help and guidance will be very much appreciated.
Thank you.
Upadate
ffmpeg cmd :
ffmpeg -i input.mp4 -codec:v libx264 -tune zerolatency -profile:v main -preset medium -b:v 1500k -maxrate 1500k -bufsize 15000k -s hd720 -threads 0 -pass 1 -an -f mp4 /dev/null
ffmpeg -i input.mp4 -codec:v libx264 -tune zerolatency -profile:v main -preset medium -b:v 1000k -maxrate 1000k -bufsize 10000k -s hd720 -threads 0 -pass 2 -codec:a libfdk_aac -movflags +faststart output.mp4