laubonghaudoi commited on
Commit
8fcf91d
·
1 Parent(s): 2a836fa

加入鹿鼎記音頻

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. convert_to_opus.sh +42 -0
  2. cut.py +1 -1
  3. opus/lukdinggei/001/001_001.opus +3 -0
  4. opus/lukdinggei/001/001_002.opus +3 -0
  5. opus/lukdinggei/001/001_003.opus +3 -0
  6. opus/lukdinggei/001/001_004.opus +3 -0
  7. opus/lukdinggei/001/001_005.opus +3 -0
  8. opus/lukdinggei/001/001_006.opus +3 -0
  9. opus/lukdinggei/001/001_007.opus +3 -0
  10. opus/lukdinggei/001/001_008.opus +3 -0
  11. opus/lukdinggei/001/001_009.opus +3 -0
  12. opus/lukdinggei/001/001_010.opus +3 -0
  13. opus/lukdinggei/001/001_011.opus +3 -0
  14. opus/lukdinggei/001/001_012.opus +3 -0
  15. opus/lukdinggei/001/001_013.opus +3 -0
  16. opus/lukdinggei/001/001_014.opus +3 -0
  17. opus/lukdinggei/001/001_015.opus +3 -0
  18. opus/lukdinggei/001/001_016.opus +3 -0
  19. opus/lukdinggei/001/001_017.opus +3 -0
  20. opus/lukdinggei/001/001_018.opus +3 -0
  21. opus/lukdinggei/001/001_019.opus +3 -0
  22. opus/lukdinggei/001/001_020.opus +3 -0
  23. opus/lukdinggei/001/001_021.opus +3 -0
  24. opus/lukdinggei/001/001_022.opus +3 -0
  25. opus/lukdinggei/001/001_023.opus +3 -0
  26. opus/lukdinggei/001/001_024.opus +3 -0
  27. opus/lukdinggei/001/001_025.opus +3 -0
  28. opus/lukdinggei/001/001_026.opus +3 -0
  29. opus/lukdinggei/001/001_027.opus +3 -0
  30. opus/lukdinggei/001/001_028.opus +3 -0
  31. opus/lukdinggei/001/001_029.opus +3 -0
  32. opus/lukdinggei/001/001_030.opus +3 -0
  33. opus/lukdinggei/001/001_031.opus +3 -0
  34. opus/lukdinggei/001/001_032.opus +3 -0
  35. opus/lukdinggei/001/001_033.opus +3 -0
  36. opus/lukdinggei/001/001_034.opus +3 -0
  37. opus/lukdinggei/001/001_035.opus +3 -0
  38. opus/lukdinggei/001/001_036.opus +3 -0
  39. opus/lukdinggei/001/001_037.opus +3 -0
  40. opus/lukdinggei/001/001_038.opus +3 -0
  41. opus/lukdinggei/001/001_039.opus +3 -0
  42. opus/lukdinggei/001/001_040.opus +3 -0
  43. opus/lukdinggei/001/001_041.opus +3 -0
  44. opus/lukdinggei/001/001_042.opus +3 -0
  45. opus/lukdinggei/001/001_043.opus +3 -0
  46. opus/lukdinggei/001/001_044.opus +3 -0
  47. opus/lukdinggei/001/001_045.opus +3 -0
  48. opus/lukdinggei/001/001_046.opus +3 -0
  49. opus/lukdinggei/001/001_047.opus +3 -0
  50. opus/lukdinggei/001/001_048.opus +3 -0
convert_to_opus.sh ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ # This script converts all MP3 or M4A files in a specified source directory to the Opus format,
4
+ # leveraging parallel processing to speed up the conversion.
5
+ # Example usage:
6
+ # convert_to_opus.sh source/trimmed_mp3 source/trimmed_opus 8
7
+
8
+ # Set the source and destination directories from the command-line arguments.
9
+ # If no arguments are provided, use default values.
10
+ SOURCE_DIR=${1:-source/mp3}
11
+ DEST_DIR=${2:-opus_converted}
12
+ NUM_JOBS=${3:-$(nproc 2>/dev/null || sysctl -n hw.ncpu)}
13
+
14
+ # Create the output directory. The -p flag ensures that the command doesn't fail if the directory already exists.
15
+ mkdir -p "$DEST_DIR"
16
+
17
+ export DEST_DIR
18
+
19
+ # Define the conversion function to be run in parallel.
20
+ convert_to_opus() {
21
+ f="$1"
22
+ # Get the base name of the file (e.g., "001.mp3")
23
+ filename=$(basename -- "$f")
24
+ # Get the file name without the extension (e.g., "001")
25
+ filename_noext="${filename%.*}"
26
+
27
+ # Use ffmpeg to convert the file to Opus format.
28
+ # The output is redirected to /dev/null to prevent ffmpeg from flooding the console.
29
+ echo "Converting $f to $DEST_DIR/${filename_noext}.opus"
30
+ ffmpeg -i "$f" -fflags +genpts -c:a libopus -ar 48000 -vbr on -map_metadata -1 -y "$DEST_DIR/${filename_noext}.opus" >/dev/null 2>&1
31
+ }
32
+
33
+ export -f convert_to_opus
34
+
35
+ # Find all .mp3 and .m4a files in the source directory and process them in parallel using a while loop.
36
+ find "$SOURCE_DIR" -type f \( -name "*.mp3" -o -name "*.m4a" \) -print0 | while IFS= read -r -d $'\0' file; do
37
+ ((i=i%NUM_JOBS)); ((i++==0)) && wait
38
+ convert_to_opus "$file" &
39
+ done
40
+ wait
41
+
42
+ echo "All files have been converted to Opus format and are located in the $DEST_DIR directory."
cut.py CHANGED
@@ -83,7 +83,7 @@ if __name__ == "__main__":
83
  # If append to existing metadata file
84
  metadata_file = os.path.join("opus", SUBSET, "metadata.csv") # Define metadata file path here
85
 
86
- for episode in range(20, 21):
87
  # If creating new csv
88
  # metadata_file = f"{episode}.csv"
89
  episode_str = f'{episode:03d}' # Format episode as 3-digit string
 
83
  # If append to existing metadata file
84
  metadata_file = os.path.join("opus", SUBSET, "metadata.csv") # Define metadata file path here
85
 
86
+ for episode in range(1, 232):
87
  # If creating new csv
88
  # metadata_file = f"{episode}.csv"
89
  episode_str = f'{episode:03d}' # Format episode as 3-digit string
opus/lukdinggei/001/001_001.opus ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5a331e092af106ff46a9a2d8585f1b95bd93ac5a2d9c51b88709d62025fec368
3
+ size 98262
opus/lukdinggei/001/001_002.opus ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6744761598a17af8acb3b478db356093f37c890d8e2c61e20cf0bc3f870a0b65
3
+ size 98359
opus/lukdinggei/001/001_003.opus ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9a13d65b226750d0180c5afd9bdf56eedd93b18bed9e8badb120726727bf01d0
3
+ size 61651
opus/lukdinggei/001/001_004.opus ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:535028b5cc2d95346e4706dfb84703ca2043486156b6f66e49e997e99e9adbef
3
+ size 36122
opus/lukdinggei/001/001_005.opus ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fd0af46f7ad8e55b924d062fae14b56818eb3c8edab0faa0f254ad825da2a30f
3
+ size 25522
opus/lukdinggei/001/001_006.opus ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cc6a5bfb7ce8da14920ca3ae0103b37b319647aab51e675f95e1e40d44311e1e
3
+ size 40211
opus/lukdinggei/001/001_007.opus ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1c8764e9030e56185104aed56a85fc6a6f36022f0bbc3829e172c3f723b5aa83
3
+ size 41047
opus/lukdinggei/001/001_008.opus ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a81c6524bf6b51258d111f5a1f0e66e4b57c515d2d60bb963fae742fabaccd2e
3
+ size 35621
opus/lukdinggei/001/001_009.opus ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7b26c79a49fd714ac0ca55571e006d523f61ffc809a605c79558e8ce3bd2ae31
3
+ size 71503
opus/lukdinggei/001/001_010.opus ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e46d64ae29535724a4a5d7c0cc9b9584a834ed9a0dc98d1fda796b884b83d6c8
3
+ size 20983
opus/lukdinggei/001/001_011.opus ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3bcbb66a45a966fc08b5c4f86bd99c3ec4ca4596aff2cba5437b4ff94e2771e4
3
+ size 82829
opus/lukdinggei/001/001_012.opus ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:882f8be3087724d24c44794362075b67f020a5de44482e527d2a3dc92def7ebd
3
+ size 60148
opus/lukdinggei/001/001_013.opus ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c9f5ffaf4c31a92c822d56882d5dd0577808c9d66983d72b716c34a44151f8b2
3
+ size 33667
opus/lukdinggei/001/001_014.opus ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a1cf2a4a23b14567f8019bc9cc4c8c74165d858223746f84445008e7e3ba9233
3
+ size 35863
opus/lukdinggei/001/001_015.opus ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:edb3a34020fd98ba05af77786c167e1eb7912321e521fa1c67c56ec176551e8b
3
+ size 27616
opus/lukdinggei/001/001_016.opus ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dd30ad209aaf5381bf9c0eed4a0d94d503f2ab28fa8d6b4adaa42fa127c2b5ad
3
+ size 114271
opus/lukdinggei/001/001_017.opus ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6b1683702fccb6abfcc4e1873a6f94a9dd9168d05f197a1c9ff5aef5ac3641ab
3
+ size 58845
opus/lukdinggei/001/001_018.opus ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:aad9c24a822fc97be4f71239c494cdefb0fbbf570b8cedf50432633241169f76
3
+ size 62463
opus/lukdinggei/001/001_019.opus ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f96549af58a033bf5216c92a23e271e0fed8d4987ed5e374ead88d3fe4c833bb
3
+ size 28229
opus/lukdinggei/001/001_020.opus ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:01d2e36ae207cf37322fa855a3a6eb7428397c0a5149ae2ea9c085511c1ee347
3
+ size 80641
opus/lukdinggei/001/001_021.opus ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:55f9bfdacc9054f72862441478e408935a31f192ebd5edaa301d19b37d2c4f56
3
+ size 79578
opus/lukdinggei/001/001_022.opus ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:72b5188aadf91cf3cdec3c5a34cf4e150f5e3b762e0706ae12fed19f73724233
3
+ size 33951
opus/lukdinggei/001/001_023.opus ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:10149ba1e974ff39504645e8455ec617e41ef86cadde7e695cf5156acf47d280
3
+ size 42370
opus/lukdinggei/001/001_024.opus ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:323ff08f3da2220f996e8fae4ae887fcb5ebb7ea9072529ee4566a92ec43d6cf
3
+ size 20909
opus/lukdinggei/001/001_025.opus ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4b292b8a99c2b7ab3cd2ea337b85da43d023f3a412fe8e69527b35c903ef49a3
3
+ size 47513
opus/lukdinggei/001/001_026.opus ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:27b8d06bf69c56e08c45c8bf0ce65d922003fee1b7288ded4f8240f8f223c374
3
+ size 21584
opus/lukdinggei/001/001_027.opus ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e97a13ce6abac668832cff5f00b3d66132e3cd8dd82e49b6c9621e4be4314f27
3
+ size 22226
opus/lukdinggei/001/001_028.opus ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0c3a0f226408e9939217fb02bf868355c371b038c14c3793ecc71ac533549fd2
3
+ size 48145
opus/lukdinggei/001/001_029.opus ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f819a65325eefe2d0f28b975f984e0586f3182d6e9aa578834349db94dc8cc75
3
+ size 55351
opus/lukdinggei/001/001_030.opus ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e71cef80b0a3072c015ce5220ac0ec7f01d078f051dca82f690012d6974a9f1e
3
+ size 36986
opus/lukdinggei/001/001_031.opus ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fe6116f6baf88eda5072536aeb0bfb0dca52db6ac83b0d4c362cd95fb0e16e07
3
+ size 33287
opus/lukdinggei/001/001_032.opus ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fb2d2dcb1b3cd73aceab3a04c214ad5af515314be98c82343df26e40a9232cae
3
+ size 29617
opus/lukdinggei/001/001_033.opus ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a354c19240cc7b67a91d839cc99b60a767ac2045f8c7c514985aaf9cf95e29ce
3
+ size 35837
opus/lukdinggei/001/001_034.opus ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1b27143ecdd19f67f3862e0633edb1c20b79b728303175d0daab28149ef76608
3
+ size 49007
opus/lukdinggei/001/001_035.opus ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:226cf145365a5b1b0365438c49d9551e2072c9dbe4837344448e2a795f607a95
3
+ size 31302
opus/lukdinggei/001/001_036.opus ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c558650bd8ee3e667374fe87fcc136c1dc010a178326727a49d243eced408232
3
+ size 42957
opus/lukdinggei/001/001_037.opus ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d1857e9f20ab2a9a055d35c748e87d46b1ffd278e97ec7d74af2aeb2a7ecb570
3
+ size 44418
opus/lukdinggei/001/001_038.opus ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:39cee55071e32ca84cfb276ff85d3977ea9c13af2a402082e08690e4abf1b178
3
+ size 46887
opus/lukdinggei/001/001_039.opus ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:041ff6caf762276b47034d4a9cede90dc148144e41089b8dead23b029caca2b7
3
+ size 55424
opus/lukdinggei/001/001_040.opus ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8c94b3addfdd1237e8c91561d5323958c7bccade7ea74f17c4a079750e2f5633
3
+ size 26081
opus/lukdinggei/001/001_041.opus ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5c055410f94f51122b9566a201296eb7ff13fc492921c25475240084e09ffa2c
3
+ size 45828
opus/lukdinggei/001/001_042.opus ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0f501b2373a75bbf0f91eb22accf93b9db888221ef4b204ebb72da869737f7b3
3
+ size 22808
opus/lukdinggei/001/001_043.opus ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:acb0735f8bf3826db2e161b2669de45a186efa0a649f4baf72d3a8c083d4478d
3
+ size 27983
opus/lukdinggei/001/001_044.opus ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d1968e84a46f9d4491bba2b324a4657cffd1c0944f008d1211b08f1dcfe08c44
3
+ size 73470
opus/lukdinggei/001/001_045.opus ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1b33803906bc72f6a3110aa9d9d9857c2d29793bc9e174a7cc6b8e3b9dd36c88
3
+ size 22397
opus/lukdinggei/001/001_046.opus ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e798f7f2fb06a5c1e830bce5d3e5f6dfaf7811c4a7cd3ad9b5ca4babcf70cefe
3
+ size 25671
opus/lukdinggei/001/001_047.opus ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fb3f6f444f9d63ec50707369e2ffc1d309772b4ad38aed5c3b6dcb10e9580c90
3
+ size 51247
opus/lukdinggei/001/001_048.opus ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:479486d67fee82ad4e999c6b384b17ed0662fe463f018978d54420880efe22f5
3
+ size 81311