Compare commits

..

No commits in common. "main" and "dev/ffmpeg" have entirely different histories.

6 changed files with 107 additions and 137 deletions

1
.gitignore vendored
View file

@ -162,4 +162,3 @@ cython_debug/
*local *local
out/* out/*
.~*

View file

@ -17,33 +17,6 @@ e04c71e16fc6ab1a72872efe33776b1fc892082dc59fdb452714d59bce792337 HPMoR_Part_5.m
1a7ebce777becb6a0c0e8efec1155f8dbf0d179224db71ca78e3d8122a804422 HPMoR_Part_6.mp3 1a7ebce777becb6a0c0e8efec1155f8dbf0d179224db71ca78e3d8122a804422 HPMoR_Part_6.mp3
``` ```
## Installation
Place the root direcotry of this Git Repository next to the `HPMoR_Part_?.mp3` files.
Install the requirements with pip inside the `hpmor_split` directory with
`pip install -r requirements.txt`
You'll need to install ffmpeg.
### Windows
I'd recommend using [chocolatey](https://chocolatey.org/install), there you can easy install [ffmpeg](https://community.chocolatey.org/packages/ffmpeg).
## Run
Then you can run the split.py inside the `hpmor_split` direcorty.
## Download, install and run commands:
```bash
wget https://hpmorpodcast.com/wp-content/uploads/episodes/HPMoR_Part_{1..6}.mp3
git clone https://git.jdmweb2.ch/beat/hpmor_split.git
cd hpmor_split
pip install -r requirements.txt
./split.py
```
## Make Hour long files ## Make Hour long files
Use hmake.sh Use hmake.sh

View file

@ -1,112 +1,112 @@
chap,Part,start,comment chap,Part,start,comment
1,1,00:00:25,A_Day_of_Very_Low_Probability 001,1,00:00:25,A_Day_of_Very_Low_Probability
2,1,00:16:04,Everything_I_Believe_is_False 002,1,00:16:04,Everything_I_Believe_is_False
3,1,00:26:19,Comparing_Reality_To_Its_Alternatives 003,1,00:26:19,Comparing_Reality_To_Its_Alternatives
4,1,00:38:41,The_Efficient_Market_Hypothesis 004,1,00:38:41,The_Efficient_Market_Hypothesis
5,1,00:49:55, 005,1,00:49:55,
6,1,01:11:20, 006,1,01:11:20,
7,1,02:14:23, 007,1,02:14:23,
8,1,03:23:35, 008,1,03:23:35,
9,1,03:58:43, 009,1,03:58:43,
9.5,1,04:13:38,Readers_Kommentar 009.5,1,04:13:38,Readers_Kommentar
10,1,04:14:23, 010,1,04:14:23,
11,1,04:35:17,There is no chapter 11 011,1,04:35:17,There is no chapter 11
12,1,04:35:19, 012,1,04:35:19,
13,1,04:58:09, 013,1,04:58:09,
14,1,05:36:46, 014,1,05:36:46,
15,1,06:04:33, 015,1,06:04:33,
16,1,06:25:35, 016,1,06:25:35,
17,1,07:01:49, 017,1,07:01:49,
18,1,08:19:35, 018,1,08:19:35,
19,1,09:14:09, 019,1,09:14:09,
20,1,10:01:18, 020,1,10:01:18,
21,1,10:37:14, 021,1,10:37:14,
end part 1,1,11:14:08, end part 1,1,11:14:08,
22,2,00:00:25, 022,2,00:00:25,
23,2,00:48:35, 023,2,00:48:35,
24,2,01:27:19, 024,2,01:27:19,
25,2,01:51:54, 025,2,01:51:54,
26,2,02:21:01, 026,2,02:21:01,
27,2,02:53:45, 027,2,02:53:45,
28,2,03:47:34, 028,2,03:47:34,
29,2,04:32:51, 029,2,04:32:51,
30,2,05:06:21, 030,2,05:06:21,
31,2,05:31:26, 031,2,05:31:26,
32,2,05:56:04, 032,2,05:56:04,
33,2,06:04:30, 033,2,06:04:30,
34,2,06:30:49, 034,2,06:30:49,
35,2,07:04:19, 035,2,07:04:19,
36,2,08:00:14, 036,2,08:00:14,
37,2,08:26:26, 037,2,08:26:26,
end part 2,2,08:31:50, end part 2,2,08:31:50,
38,3,00:00:25, 038,3,00:00:25,
39,3,00:18:03, 039,3,00:18:03,
40,3,01:08:53, 040,3,01:08:53,
41,3,01:18:37, 041,3,01:18:37,
42,3,01:33:23, 042,3,01:33:23,
43,3,01:52:27, 043,3,01:52:27,
44,3,02:37:46, 044,3,02:37:46,
45,3,02:46:08, 045,3,02:46:08,
46,3,03:07:57, 046,3,03:07:57,
47,3,03:33:36, 047,3,03:33:36,
48,3,04:48:14, 048,3,04:48:14,
49,3,05:06:56, 049,3,05:06:56,
50,3,05:36:37, 050,3,05:36:37,
51,3,06:02:05.5, 051,3,06:02:06,
52,3,06:22:13, 052,3,06:22:13,
53,3,06:44:58.5, 053,3,06:44:59,
54,3,06:54:02, 054,3,06:54:02,
55,3,07:29:15, 055,3,07:29:15,
56,3,08:10:40, 056,3,08:10:40,
57,3,08:34:33, 057,3,08:34:33,
58,3,09:02:46, 058,3,09:02:46,
59,3,09:31:55.5, 059,3,09:31:56,
60,3,10:00:15, 060,3,10:00:15,
61,3,10:26:46, 061,3,10:26:46,
62,3,11:06:48, 062,3,11:06:48,
63,3,11:40:44, 063,3,11:40:44,
64,,,There is no chapter 64 064,,,There is no chapter 64
end part 3,3,13:15:04, end part 3,3,13:15:04,
65,4,00:00:25, 065,4,00:00:25,
66,4,00:31:29, 066,4,00:31:29,
67,4,00:42:18, 067,4,00:42:18,
68,4,01:05:19, 068,4,01:05:19,
69,4,01:36:47, 069,4,01:36:47,
70,4,01:57:50, 070,4,01:57:50,
71,4,02:31:06, 071,4,02:31:06,
72,4,02:59:44, 072,4,02:59:44,
73,4,03:52:20, 073,4,03:52:20,
74,4,04:24:54, 074,4,04:24:54,
75,4,05:27:44, 075,4,05:27:44,
76,4,06:03:40, 076,4,06:03:40,
77,4,06:21:29, 077,4,06:21:29,
78,4,07:31:41, 078,4,07:31:41,
79,4,09:12:39, 079,4,09:12:39,
80,4,10:04:12, 080,4,10:04:12,
81,4,10:42:50, 081,4,10:42:50,
82,4,11:17:38, 082,4,11:17:38,
83,4,11:44:34, 083,4,11:44:34,
84,4,11:48:30, 084,4,11:48:30,
85,4,12:58:15, 085,4,12:58:15,
end part 4,4,13:39:46, end part 4,4,13:39:46,
86,5,00:00:25, 086,5,00:00:25,
87,5,02:15:34, 087,5,02:15:34,
88,5,02:53:35, 088,5,02:53:35,
89,5,03:31:17, 089,5,03:31:17,
90,5,03:49:17, 090,5,03:49:17,
91,5,04:24:07, 091,5,04:24:07,
92,5,04:53:19, 092,5,04:53:19,
93,5,05:07:49, 093,5,05:07:49,
94,5,05:31:08, 094,5,05:31:08,
95,5,05:56:20.5, 095,5,05:56:21,
96,5,06:25:44, 096,5,06:25:44,
97,5,06:49:29, 097,5,06:49:29,
98,5,07:32:20, 098,5,07:32:20,
99,5,07:52:36, 099,5,07:52:36,
end part 5,5,07:52:50, end part 5,5,07:52:50,
100,6,00:00:26, 100,6,00:00:25,
101,6,00:40:06, 101,6,00:40:01,
102,6,00:59:46, 102,6,00:59:58,
103,6,01:35:27, 103,6,01:35:27,
104,6,01:54:22, 104,6,01:54:22,
105,6,02:58:15, 105,6,02:58:15,

1 chap Part start comment
2 1 001 1 00:00:25 A_Day_of_Very_Low_Probability
3 2 002 1 00:16:04 Everything_I_Believe_is_False
4 3 003 1 00:26:19 Comparing_Reality_To_Its_Alternatives
5 4 004 1 00:38:41 The_Efficient_Market_Hypothesis
6 5 005 1 00:49:55
7 6 006 1 01:11:20
8 7 007 1 02:14:23
9 8 008 1 03:23:35
10 9 009 1 03:58:43
11 9.5 009.5 1 04:13:38 Readers_Kommentar
12 10 010 1 04:14:23
13 11 011 1 04:35:17 There is no chapter 11
14 12 012 1 04:35:19
15 13 013 1 04:58:09
16 14 014 1 05:36:46
17 15 015 1 06:04:33
18 16 016 1 06:25:35
19 17 017 1 07:01:49
20 18 018 1 08:19:35
21 19 019 1 09:14:09
22 20 020 1 10:01:18
23 21 021 1 10:37:14
24 end part 1 1 11:14:08
25 22 022 2 00:00:25
26 23 023 2 00:48:35
27 24 024 2 01:27:19
28 25 025 2 01:51:54
29 26 026 2 02:21:01
30 27 027 2 02:53:45
31 28 028 2 03:47:34
32 29 029 2 04:32:51
33 30 030 2 05:06:21
34 31 031 2 05:31:26
35 32 032 2 05:56:04
36 33 033 2 06:04:30
37 34 034 2 06:30:49
38 35 035 2 07:04:19
39 36 036 2 08:00:14
40 37 037 2 08:26:26
41 end part 2 2 08:31:50
42 38 038 3 00:00:25
43 39 039 3 00:18:03
44 40 040 3 01:08:53
45 41 041 3 01:18:37
46 42 042 3 01:33:23
47 43 043 3 01:52:27
48 44 044 3 02:37:46
49 45 045 3 02:46:08
50 46 046 3 03:07:57
51 47 047 3 03:33:36
52 48 048 3 04:48:14
53 49 049 3 05:06:56
54 50 050 3 05:36:37
55 51 051 3 06:02:05.5 06:02:06
56 52 052 3 06:22:13
57 53 053 3 06:44:58.5 06:44:59
58 54 054 3 06:54:02
59 55 055 3 07:29:15
60 56 056 3 08:10:40
61 57 057 3 08:34:33
62 58 058 3 09:02:46
63 59 059 3 09:31:55.5 09:31:56
64 60 060 3 10:00:15
65 61 061 3 10:26:46
66 62 062 3 11:06:48
67 63 063 3 11:40:44
68 64 064 There is no chapter 64
69 end part 3 3 13:15:04
70 65 065 4 00:00:25
71 66 066 4 00:31:29
72 67 067 4 00:42:18
73 68 068 4 01:05:19
74 69 069 4 01:36:47
75 70 070 4 01:57:50
76 71 071 4 02:31:06
77 72 072 4 02:59:44
78 73 073 4 03:52:20
79 74 074 4 04:24:54
80 75 075 4 05:27:44
81 76 076 4 06:03:40
82 77 077 4 06:21:29
83 78 078 4 07:31:41
84 79 079 4 09:12:39
85 80 080 4 10:04:12
86 81 081 4 10:42:50
87 82 082 4 11:17:38
88 83 083 4 11:44:34
89 84 084 4 11:48:30
90 85 085 4 12:58:15
91 end part 4 4 13:39:46
92 86 086 5 00:00:25
93 87 087 5 02:15:34
94 88 088 5 02:53:35
95 89 089 5 03:31:17
96 90 090 5 03:49:17
97 91 091 5 04:24:07
98 92 092 5 04:53:19
99 93 093 5 05:07:49
100 94 094 5 05:31:08
101 95 095 5 05:56:20.5 05:56:21
102 96 096 5 06:25:44
103 97 097 5 06:49:29
104 98 098 5 07:32:20
105 99 099 5 07:52:36
106 end part 5 5 07:52:50
107 100 6 00:00:26 00:00:25
108 101 6 00:40:06 00:40:01
109 102 6 00:59:46 00:59:58
110 103 6 01:35:27
111 104 6 01:54:22
112 105 6 02:58:15

Binary file not shown.

0
split.py Executable file → Normal file
View file

View file

@ -11,12 +11,11 @@ import asyncio
async def main(part, cid, time: dict, end, title, filenamemuster, fileformat): async def main(part, cid, time: dict, end, title, filenamemuster, fileformat):
utitle = title['t_'] utitle = title['t_']
title = title['t'] title = title['t']
filename = f'out/{cid:03}_{utitle}.{fileformat}' filename = f'out/{cid}_{utitle}.{fileformat}'
ffmpeg = ( ffmpeg = (
FFmpeg() FFmpeg()
.option('y') .option("y")
.option('hide_banner')
) )
if end is not None: if end is not None:
ffmpeg.input( ffmpeg.input(
@ -50,8 +49,7 @@ async def main(part, cid, time: dict, end, title, filenamemuster, fileformat):
@ffmpeg.on("stderr") @ffmpeg.on("stderr")
def on_stderr(line): def on_stderr(line):
pass print("stderr:", line)
# print("stderr:", line)
@ffmpeg.on("progress") @ffmpeg.on("progress")
def on_progress(progress): def on_progress(progress):