Epoch start time for Orcasound recording from MaST Center Aquarium: 1699169418 Equivalent date-time: GMT: Sunday, November 5, 2023 7:30:18 AM Your time zone: Sunday, November 5, 2023 12:30:18 AM GMT-07:00 DST MP3 file retrieved by Scott Veirs for Amy Carey on 11/8/23 via AWS S3 bucket HLS segments transcoded to MP4 and then MP3 format via the appended ts2mp3.sh script. The resulting output.mp3 file was renamed to 231105-MC-J.mp3 manually. # ts2mp3.sh expects two arguments: #1 node name (one string with underscores, e.g. bush_point (NOTE: no leading rpi_ !) #2 UNIX timestamp of desired S3 folder within the nodes hls folder #3 Start time in hours after the UNIX timestamp #4 Stop time in hours after the UNIX timestamp # Add some logic to skip data that isn't between the desired start and stop times # i.e. within aws sync call or in the for loop (delete some .ts segments; rename others) echo "You provided $# arguments: $1, $2, $3, and $4" aws s3 sync s3://streaming-orcasound-net/rpi_$1/hls/$2/ . for file in live*; do mv "$file" "${file#live}"; done; for i in *.ts ; do mv $i `printf '%04d' ${i%.ts}`.ts done printf "file '%s'\n" ./*.ts > mylist.txt ffmpeg -f concat -safe 0 -i mylist.txt -c copy all.ts ffmpeg -i all.ts -c:v libx264 -c:a copy -bsf:a aac_adtstoasc output.mp4 ffmpeg -i output.mp4 output.mp3 rm *.ts output.mp4 mylist.txt