mirror of
				https://github.com/KrumpetPirate/AAXtoMP3.git
				synced 2025-10-31 19:40:42 +01:00 
			
		
		
		
	Way faster chapter splitting
Just a little change in the ffmpeg call, but this massively increases the speed of chapter splitting. (In my first test approximately by a factor of 10.)
This commit is contained in:
		
							
								
								
									
										13
									
								
								AAXtoMP3
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								AAXtoMP3
									
									
									
									
									
								
							| @@ -16,7 +16,7 @@ container=mp3               # Just in case we need to change the container.  Use | ||||
| VALIDATE=0                  # Validate the input aax file(s) only.  No Transcoding of files will occur | ||||
| DEBUG=0                     # Default off, If set extremely verbose output. | ||||
| noclobber=0                 # Default off, clobber only if flag is enabled | ||||
| continue=0                  # Default off, If set Transcoding is skipped and chapter splitting starts at chapter continueAt. | ||||
| continue=0                  # Default off, If set Transcoding is skiped and chapter splitting starts at chapter continueAt. | ||||
| continueAt=1                # Optional chapter to continue splitting the chapters. | ||||
|  | ||||
| # ----- | ||||
| @@ -54,7 +54,7 @@ while true; do | ||||
|     -d | --debug      ) DEBUG=1;                                                        shift ;; | ||||
|                       # Validate ONLY the aax file(s) No transcoding occurs | ||||
|     -V | --validate   ) VALIDATE=1;                                                     shift ;; | ||||
|                       # continue splitting chapters at chapter continueAt | ||||
|                       # continue spliting chapters at chapter continueAt | ||||
|     --continue        ) continueAt="$2"; continue=1;                                    shift 2 ;; | ||||
|                       # Command synopsis. | ||||
|     -h | --help       ) printf "$usage" $0 ;                                            exit ;; | ||||
| @@ -169,10 +169,9 @@ if [[ "x$(type -P ffmpeg)" == "x" ]]; then | ||||
|   echo "ERROR ffmpeg was not found on your env PATH variable" | ||||
|   echo "Without it, this script will break." | ||||
|   echo "INSTALL:" | ||||
|   echo "MacOS:           brew install ffmpeg" | ||||
|   echo "Ubuntu:          sudo apt-get update; sudo apt-get install ffmpeg libav-tools x264 x265 bc" | ||||
|   echo "Ubuntu (20.04):  sudo apt-get update; sudo apt-get install ffmpeg x264 x265 bc" | ||||
|   echo "RHEL:            yum install ffmpeg" | ||||
|   echo "MacOS:   brew install ffmpeg" | ||||
|   echo "Ubuntu:  sudo apt-get update; sudo apt-get install ffmpeg libav-tools x264 x265 bc" | ||||
|   echo "RHEL:    yum install ffmpeg" | ||||
|   exit 1 | ||||
| fi | ||||
|  | ||||
| @@ -446,7 +445,7 @@ do | ||||
|           # Extract chapter by time stamps start and finish of chapter. | ||||
|           # This extracts based on time stamps start and end. | ||||
|           log "Splitting chapter ${chapternum}/${chaptercount} start:${chapter_start%?}(s) end:${chapter_end}(s)" | ||||
|           </dev/null ffmpeg -loglevel quiet -nostats -i "${output_file}" -i "${cover_file}" -ss "${chapter_start%?}" -to "${chapter_end}" -map 0:0 -map 1:0 -acodec "${codec}" ${id3_version_param} \ | ||||
|           </dev/null ffmpeg -loglevel quiet -nostats -ss "${chapter_start%?}" -to "${chapter_end}" -i "${output_file}" -i "${cover_file}" -map 0:0 -map 1:0 -acodec "${codec}" ${id3_version_param} \ | ||||
|           -metadata:s:v title="Album cover" -metadata:s:v comment="Cover (Front)" -metadata track="${chapternum}" -metadata title="${chapter_title}" \ | ||||
|           -metadata:s:a title="${chapter_title}" -metadata:s:a track="${chapternum}" -map_chapters -1 \ | ||||
|           -f ${container} "${chapter_file}" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user