forked from HPR/hpr_hub
		
	The magick convert is deprecated
This commit is contained in:
		| @@ -54,20 +54,20 @@ trap 'cleanup_temp $TMP1' SIGHUP SIGINT SIGPIPE SIGTERM EXIT | |||||||
| ffmpeg -v 0 -analyzeduration 900000000000 -probesize 200M -threads 2 -i "$AUDIO" \ | ffmpeg -v 0 -analyzeduration 900000000000 -probesize 200M -threads 2 -i "$AUDIO" \ | ||||||
|     -filter_complex aformat=channel_layouts=mono,showwavespic=colors=white:s=3200x800 \ |     -filter_complex aformat=channel_layouts=mono,showwavespic=colors=white:s=3200x800 \ | ||||||
|     -frames:v 1 -f apng - 2>/dev/null | \ |     -frames:v 1 -f apng - 2>/dev/null | \ | ||||||
|     magick convert - -background black -alpha remove -alpha off "$TMP1" 2>/dev/null | cat > /dev/null 2>&1 |     magick - -background black -alpha remove -alpha off "$TMP1" 2>/dev/null | cat > /dev/null 2>&1 | ||||||
|  |  | ||||||
| # | # | ||||||
| # Not clear what's being done to the image here, but it produces a useful end | # Not clear what's being done to the image here, but it produces a useful end | ||||||
| # result, or seems to! | # result, or seems to! | ||||||
| # | # | ||||||
| magick convert -background black "$TMP1" -gravity center -background black -transparent white - | \ | magick -background black "$TMP1" -gravity center -background black -transparent white - | \ | ||||||
|     magick convert - -gravity South -background white -splice 0x5 -background black -splice 0x5 - | \ |     magick - -gravity South -background white -splice 0x5 -background black -splice 0x5 - | \ | ||||||
|     magick convert - -trim - | \ |     magick - -trim - | \ | ||||||
|     magick convert - -gravity South -chop 0x5 - | \ |     magick - -gravity South -chop 0x5 - | \ | ||||||
|     magick convert - -gravity North -background white -splice 0x5 -background black -splice 0x5 - | \ |     magick - -gravity North -background white -splice 0x5 -background black -splice 0x5 - | \ | ||||||
|     magick convert - -trim - | \ |     magick - -trim - | \ | ||||||
|     magick convert - -gravity North -chop 0x5 - | \ |     magick - -gravity North -chop 0x5 - | \ | ||||||
|     magick convert - -resize '800x200!' "$IMAGE" |     magick - -resize '800x200!' "$IMAGE" | ||||||
|  |  | ||||||
| # | # | ||||||
| # The original renamed the temporary file to be the target image file, but | # The original renamed the temporary file to be the target image file, but | ||||||
|   | |||||||
							
								
								
									
										17
									
								
								bin/duration.bash
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										17
									
								
								bin/duration.bash
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,17 @@ | |||||||
|  | #!/bin/bash | ||||||
|  | # Copyright Ken Fallon - Released into the public domain. http://creativecommons.org/publicdomain/  | ||||||
|  | find ${HOME}/processing/ -type f | egrep -v '/sponsor-anhonesthost.com-hpr15.flac|/outro.flac|/intro.flac|/sponsor-archive.org.flac' | while read mediafile | ||||||
|  | do  | ||||||
|  |   duration=$( mediainfo --full --Output=XML "${mediafile}" | xmlstarlet sel -T -t -m "_:MediaInfo/_:media/_:track[@type='Audio']/_:Duration[1]" -v "." -n - | awk -F '.' '{print $1}' ) | ||||||
|  |   if [ "${duration}" != "" ] | ||||||
|  |   then | ||||||
|  |     echo "${mediafile}: ${duration}" | ||||||
|  |     continue | ||||||
|  |   fi | ||||||
|  |   duration=$( /bin/date -ud "1970-01-01 $( ffprobe -i "${mediafile}" 2>&1| awk -F ': |, ' '/Duration:/ { print $2 }' )" +%s ) | ||||||
|  |   if [ "${duration}" != 0 ] | ||||||
|  |   then | ||||||
|  |     echo "${mediafile}: ${duration}" | ||||||
|  |     continue | ||||||
|  |   fi | ||||||
|  | done | ||||||
		Reference in New Issue
	
	Block a user