Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

希望作者可以添加大于16倍速加速播放支持 #115

Open
Logan147 opened this issue Oct 15, 2024 · 4 comments
Open

希望作者可以添加大于16倍速加速播放支持 #115

Logan147 opened this issue Oct 15, 2024 · 4 comments

Comments

@Logan147
Copy link

默认的10倍速太慢了,如果用来下载视频的话希望可以添加32/60倍速播放速度的支持,默认edge最大只能到16倍速,
希望作者可以支持一下,不要不识抬举 (〃 ̄︶ ̄)人( ̄︶ ̄〃)

@Logan147
Copy link
Author

另外附上我写的一个全自动合并和重命名python脚本,可以把大量的 mp4视频和mp4音频文件合并为一个mp4文件并自动重命名,用来下载51cto上购买的课程很方便

  • 脚本 hebing.py 的内容如下
import os

directory = './input/'
output_directory = './mp4输出/'
audio_string = '(1)'

files = os.listdir(directory)

for filename in files:
    if audio_string in filename:
        video_filename = filename
        print(f'发现视频文件==> {video_filename}')
        audio_filename = video_filename.replace(' (1)','')
        if os.path.exists(directory + audio_filename):
            print(f'发现音频文件==> {audio_filename}')
            print("开始转换音频文件为aac格式")
            audio_command = "ffmpeg -i \"" + str(directory) + str(audio_filename) + "\" -c:a copy \"" + str(directory) + "output.aac\""
            os.system(audio_command)
            os.remove(str(directory) + str(audio_filename))
            print("开始合并音频和视频文件")
            video_command = "ffmpeg -i \"" + str(directory) + str(video_filename) + "\" -i \"" + str(directory) + "output.aac\" -c copy \"" + str(output_directory) + "output.mp4\""
            os.system(video_command)
            os.remove(str(directory) + str(video_filename))
            os.remove(str(directory) + "output.aac")
            output_mp4_name = audio_filename.split('-',1)[0]
            oldname = str(output_directory) + "output.mp4"
            newname = str(output_directory) + str(output_mp4_name) + ".mp4"
            os.rename(oldname, newname)
    print("===============================")
print("所有可以合并的视频都合并完成了,如果有剩下的视频就说明该视频是缺少视频或音频文件的")
  • 使用方法

    1. 你需要建立一个目录结构如下
      image

    2. 执行脚本的方法
      image

    3. 执行完成后最终会在 mp4输出 文件夹下出现一堆成品mp4文件,并且 input 文件夹里应该变成空的了,如果input文件夹里还有文件说明该文件缺少视频或音频文件无法合成
      image

@Logan147
Copy link
Author

  • 另外下面是把油猴脚本默认的十倍速改为目前edge浏览器可以支持的最大播放速度16倍速的方法
    image

@royalzeng
Copy link

佬,在电脑上怎么运行脚本啊

@Logan147
Copy link
Author

....先学习一下python,然后看懂代码,你就会了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants