Recherche avancée

Médias (1)

Mot : - Tags -/bug

Autres articles (103)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications 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 (...)

  • Ecrire une actualité

    21 juin 2013, par

    Pré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 ) (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-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 (19713)

  • What does the summary output of the coding with ffmpeg means

    12 novembre 2015, par Jai

    I am working with video comparison using ffmpeg. By Using ffmpeg command I can find the difference between 2 videos. But i want to find the percentage different in 2 videos.
    From the below ffmpeg output how can i found the percentage difference in two videos. Which attribute denote the difference.?

    TaskList: video:530kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.266679%
    TaskList: [libx264 @ 0000000002750b00] frame I:2     Avg QP:23.92  size: 29796
    TaskList: [libx264 @ 0000000002750b00] frame P:97    Avg QP:22.97  size:  4477
    TaskList: [libx264 @ 0000000002750b00] frame B:9     Avg QP:28.16  size:  5338
    TaskList: [libx264 @ 0000000002750b00] consecutive B-frames: 83.3% 16.7%  0.0%  0.0%
    TaskList: [libx264 @ 0000000002750b00] mb I  I16..4: 25.7% 37.8% 36.5%
    TaskList: [libx264 @ 0000000002750b00] mb P  I16..4:  1.9%  4.5%  1.0%  P16..4: 26.7%  8.8%  3.8%  0.0%  0.0%    skip:53.3%
    TaskList: [libx264 @ 0000000002750b00] mb B  I16..4:  0.7%  2.4%  2.7%  B16..8: 19.9%  8.8%  2.6%  direct: 4.7%  skip:58.2%  L0:32.3% L1:53.2% BI:14.4%
    TaskList: [libx264 @ 0000000002750b00] 8x8 transform intra:55.1% inter:69.5%
    TaskList: [libx264 @ 0000000002750b00] coded y,uvDC,uvAC intra: 55.6% 70.0% 24.2% inter: 19.8% 26.7% 2.5%
    TaskList: [libx264 @ 0000000002750b00] i16 v,h,dc,p: 25% 44%  5% 27%
    TaskList: [libx264 @ 0000000002750b00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 24% 26% 17%  5%  5%  6%  5%  6%  6%
    TaskList: [libx264 @ 0000000002750b00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 26% 29% 13%  5%  5%  6%  5%  6%  5%
    TaskList: [libx264 @ 0000000002750b00] i8c dc,h,v,p: 44% 30% 20%  5%
    TaskList: [libx264 @ 0000000002750b00] Weighted P-Frames: Y:6.2% UV:4.1%
    TaskList: [libx264 @ 0000000002750b00] ref P L0: 64.2% 28.5%  5.8%  1.3%  0.1%
    TaskList: [libx264 @ 0000000002750b00] ref B L0: 88.4% 11.6%
    TaskList: [libx264 @ 0000000002750b00] kb/s:1204.25
  • Creating a single video using extracted frames from several video clips without having to write the frames into a folder

    24 décembre 2023, par Athekul

    I have a set of mp4 video clips named : file1.mp4, file2.mp4,..filen.mp4.
I want to write a code for going through the files sequentially and extracting a frame every 10 seconds of the video.
Then I want to combine the frames and make one output video file at 6 fps.

    


    I have the code which does that but it extracts frames and stores them in a subfolder before combining them into a video. I think that is inefficient.
Is there a way whereby I can extract frames from the video clips and output the final video without having to store the frames in a folder ?

    


    This is the code that I have.

    


    #!/bin/bash

# Step 1: Extract frames every 10 seconds
input_folder="/home/aj/Videos/merge"
output_folder="/home/aj/Videos/merge"
subfolder="frames"

# Create subfolder if it doesn't exist
mkdir -p "$output_folder/$subfolder"

# Get the total number of input files
total_files=$(find "$input_folder" -maxdepth 1 -type f -name "*.mp4" | wc -l)
processed_files=0
global_frame_counter=0

# Iterate through mp4 files in the input folder
for file in "$input_folder"/*.mp4; do
  filename=$(basename "$file")
  filename_no_ext="${filename%.mp4}"

  # Extract frames every 10 seconds
  ffmpeg -i "$file" -vf fps=1/10 "$output_folder/$subfolder/output_${global_frame_counter}%02d.png"
  
    # Increment the global frame counter
  ((global_frame_counter ++))

  # Increment the processed files count
  ((processed_files++))

  # Calculate and echo the percentage of files processed
  percentage=$((processed_files * 100 / total_files))
  echo -e "\033[1;32mProcessing: $percentage% complete\033[0m"
done

# Step 2: Combine frames into a single video
cd "$output_folder/$subfolder" || exit

ffmpeg -r 6 -f image2 -s 1920x1080 -i "output_%*.png" -vcodec libx264 -crf 25 -pix_fmt yuv420p "$output_folder/result.mp4"

echo "Frames extracted and video created successfully."



    


  • how to capture continuous Realtime progress stream of output (from ffmpeg)

    6 décembre 2022, par user206904

    I am having trouble showing the progress of ffmpeg through my script. I compile my script to exe with ps2exe and ffmpeg output on standard error instead of outputting on standard out
So I used to pipe 1 option

    


    my script.ps1 now is :

    


    # $nb_of_frames= #some_int
& $ffmpeg_path -progress pipe:1 -i input.mp4 -c:v libx264 -pix_fmt yuv420p -crf 25 -preset fast -an output.mp4


    


    then I compile it with ps2exe. (to reproduce you don't need the compile, just use the above command with pipe:1 directly in cmd or PowerShell you will get the same behavior)

    


    Normally with ffmpeg you get a progress reporting (that is interactive), one line containing the information and it keeps getting updated as 1 single line without spamming the console with 100s of lines, it looks like this.

    


    frame= 7468 fps=115 q=22.0 size=   40704kB time=00:05:10.91 bitrate=1072.5kbits/s speed= 4.8x


    


    But this does not appear in the compiled version of my script, so after digging I added -progress pipe:1 to get the progress to appear on std out

    


    Now I get a continuous output every second that looks like this :

    


    frame=778
fps=310.36
stream_0_0_q=16.0
bitrate= 855.4kbits/s
total_size=3407872
progress=continue
...
frame=1092
fps=311.04
stream_0_0_q=19.0
bitrate= 699.5kbits/s
total_size=3932160
progress=continue 


    


    I would like to print some sort of updatable percentage out of this, I can compute a percentage easily if I can capture that frame number, but in this case, I don't know how to capture a real-time output like this and how to make my progress reporting update 1 single line of percentage in real-time (or some progress bar via symbols) instead of spamming on many lines

    


    (or if there is a way to make the default progress of FFmpeg appear in the compiled version of my script that would work too)

    


    edit : a suggestion based on the below answer

    


    #use the following lines instead of write-progress if using with ps2exe
            #$a=($frame * 100 / $maxFrames)
            #$str = "#"*$a
            #$str2 = "-"*(100-$a)
            #Write-Host -NoNewLine "`r$a% complete | $str $str2|"



    


    Thanks