This shows you the differences between two versions of the page.
Next revision Both sides next revision | |||
podcast_generator [2020/01/03 16:14] neil created |
podcast_generator [2020/01/03 16:26] neil |
||
---|---|---|---|
Line 148: | Line 148: | ||
</code> | </code> | ||
+ | The lengths/duration above are just set to 32 minutes (this will be auto-updated by your client when you start to play the file). You can set these automatically if you have access to the mp3info program (''apt install mp3info'') then replace the duration (''00:32:16'' with ''$duration'') and add this code around line 61, just after the $size variable is set: | ||
+ | <code php> | ||
+ | $duration = gmdate("H:i:s", `mp3info -p "%S" "$file"`); | ||
+ | </code> | ||