This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from pydub import AudioSegment | |
def concatenate_m4a_by_date(directory, output_file="output.m4a"): | |
""" | |
Concatenates all .m4a files in a directory based on their "Date Modified" attribute. | |
Parameters: | |
- directory (str): Path to the folder containing .m4a files. | |
- output_file (str): Name of the output concatenated .m4a file (default: "output.m4a"). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
""" | |
M4A Date Modifier - Sets the modification date of .m4a files based on embedded metadata. | |
This script updates the "Date Modified" attribute of all .m4a files in a specified directory | |
to match their embedded creation_time metadata tag. Useful for organizing audio recordings | |
chronologically in file managers and media applications. | |
Usage: | |
python modify_m4a_dates.py --directory PATH [--verbose] [--dry-run] |