Advertisement
Guest User

Untitled

a guest
Mar 24th, 2023
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. This is how I combined all mp3s and then converted all of them to m4b:
  2.  
  3. ls | grep "mp3" | awk '{printf "file |%s|\n", $0}' | sed -e "s/|/\'/g" > list.txt \
  4. && ffmpeg -f concat -safe 0 -i list.txt -c copy output.mp3 \
  5. && ffmpeg -i output.mp3 output.m4a \
  6. && mv output.m4a output.m4b
  7.  
  8. I found this also to loop through the folder finding mp3s and changing them to m4b:
  9. for file in *.mp3; do name=`echo "$file" | cut -d'.' -f1`; echo "$name"; ffmpeg -i "$file" -b:a 320k "${name}.m4a"; done
  10. for file in *.m4a; do
  11. mv -- "$file" "${file%.m4a}.m4b"
  12. done
  13. But it doesn´t work and gives me this error:
  14. Could not find tag for codec h264 in stream #0, codec not currently supported in container
  15. Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
  16. Error initializing output stream 0:1 --
  17. [aac @ 0x56453e929e80] Qavg: nan
  18. Conversion failed!
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement