podcasts: Ajout titre chapitre

This commit is contained in:
Quentin Gibeaux 2019-01-30 10:02:11 +01:00 committed by Quentin Gibeaux
parent 024a216941
commit fa2cadc123
3 changed files with 10 additions and 4 deletions

View File

@ -22,21 +22,25 @@ drwxr-xr-x 5 root root 4096 janv. 16 11:53 lav-outils
"start_timestamp" : "0:03:09.3", "start_timestamp" : "0:03:09.3",
"end_timestamp" : "0:18:45", "end_timestamp" : "0:18:45",
"short_chapter_name" : "chronique-transcriptions" "short_chapter_name" : "chronique-transcriptions"
"chapter_title" : "Chronique transcriptions"
}, },
{ {
"start_timestamp" : "00:18:45.4", "start_timestamp" : "00:18:45.4",
"end_timestamp" : "01:11:01", "end_timestamp" : "01:11:01",
"short_chapter_name" : "dinsic-etalab" "short_chapter_name" : "dinsic-etalab"
"chapter_title" : "Débat DINSIC Etalab"
}, },
{ {
"start_timestamp" : "01:11:01", "start_timestamp" : "01:11:01",
"end_timestamp" : "01:23:38", "end_timestamp" : "01:23:38",
"short_chapter_name" : "logiciel-caisse" "short_chapter_name" : "logiciel-caisse"
"chapter_title" : "Logiciel de caisse"
}, },
{ {
"start_timestamp" : "01:23:38", "start_timestamp" : "01:23:38",
"end_timestamp" : "01:29:58", "end_timestamp" : "01:29:58",
"short_chapter_name" : "annonces" "short_chapter_name" : "annonces"
"chapter_title" : "Annonces"
} }
] ]
} }

View File

@ -6,7 +6,8 @@
{ {
"start_timestamp" : "HH:MM:SS", "start_timestamp" : "HH:MM:SS",
"end_timestamp" : "HH:MM:SS", "end_timestamp" : "HH:MM:SS",
"short_chapter_name" : "" "short_chapter_name" : "",
"chapter_title" : ""
} }
] ]
} }

View File

@ -63,6 +63,7 @@ sub process {
my $start = $chapter->{start_timestamp}; my $start = $chapter->{start_timestamp};
my $end = $chapter->{end_timestamp}; my $end = $chapter->{end_timestamp};
my $short_chapter_name = $chapter->{short_chapter_name}; my $short_chapter_name = $chapter->{short_chapter_name};
my $chapter_title = $chapter->{chapter_title};
# cutting chapter # cutting chapter
my $command = "$ffmpeg_bin -y -i $source_name.ogg -vn -acodec copy -ss \"$start\" -to \"$end\" $source_name-$short_chapter_name.ogg"; my $command = "$ffmpeg_bin -y -i $source_name.ogg -vn -acodec copy -ss \"$start\" -to \"$end\" $source_name-$short_chapter_name.ogg";
@ -82,7 +83,7 @@ sub process {
# putting metadata # putting metadata
my $url = "https://media.april.org/audio/radio-cause-commune/libre-a-vous/emissions/$short_date/$source_name-$short_chapter_name.ogg"; my $url = "https://media.april.org/audio/radio-cause-commune/libre-a-vous/emissions/$short_date/$source_name-$short_chapter_name.ogg";
my $command = "$meta_data_script -s \"$source_name-$short_chapter_name.ogg\" -d \"output.ogg\" -u \"$url\" -t \"$title\" -p \"$ffmpeg_bin\""; my $command = "$meta_data_script -s \"$source_name-$short_chapter_name.ogg\" -d \"output.ogg\" -u \"$url\" -t \"$title - Partie $chapter_title\" -p \"$ffmpeg_bin\"";
if($dryrun) { if($dryrun) {
print "$command\n"; print "$command\n";
} else { } else {