diff --git a/podcasts/scripts/make-all-podcasts.pl b/podcasts/scripts/make-all-podcasts.pl index 2af0479..6aaf98c 100755 --- a/podcasts/scripts/make-all-podcasts.pl +++ b/podcasts/scripts/make-all-podcasts.pl @@ -197,6 +197,40 @@ sub process { return 0; } } + + # generate .size + my $command = "du -b $target_name |awk '{print $1}' > $target_name.size"; + if($dryrun) { + print "$command\n"; + } else { + my @ret = `$command`; + if($?) { + print "Error while generation size of $target_name\n"; + if($verbose) { + print Dumper @ret; + print Dumper $data; + } + return 0; + } + } + + # generate duration +# my $command = "ffprobe $target_name -show_entries format=duration -sexagesimal 2> /dev/null |grep duration |sed '1,\$s/duration=//' > $target_name.duration"; + my $command = "mediainfo --Inform='General;%Duration/String3%' $target_name > $target_name.duration"; + if($dryrun) { + print "$command\n"; + } else { + my @ret = `$command`; + if($?) { + print "Error while generation duration of $target_name\n"; + if($verbose) { + print Dumper @ret; + print Dumper $data; + } + return 0; + } + } + } }