One Second


#!/usr/bin/perl
#
# liste.txt == listing de tous les mp3s
use strict;
use warnings;
my $depart=0;
my $duree=0;
sub mashup {
$depart=int(rand(200));
$duree=int(rand(50))+1;
chomp $_[0];
`ffmpeg -y -i $_[0] -ss $depart -t 00:00:00.$duree temp.wav`;
`sox temp.wav output.wav temp-$depart.wav`;
`mv temp-$depart.wav output.wav`;
}
open (IN, "liste.txt");
my $count = ();
my @lines = <IN>;
for my $c (1 .. 300) {
&mashup($lines[int rand @lines]);
}
close IN;
`rm -rf temp.wav`;
*********************
Exemple MP3