Gui*_*ier 9 video download adobe-connect
如何将 Adobe Connect 视频下载到 mp4 或加快收听速度?
想法:
以某种方式入侵我的计算机,以便通过使 CPU 中的时间过得更快或此 Chrome Flash Player 应用程序的某些内容来使视频播放速度更快。我认为这至少对于视频来说是可能的,对于声音,我希望这不会改变它的音调。我的操作系统是基于 Debian 的 Linux 版本。
屏幕记录整个过程,但这仍然会很乏味,因为它需要我有一台专用计算机来运行,我不能同时做其他事情。
使用现有的/output/filename.zip?download=ziphack下载视频,即将其附加到 URL。但这会导致一个 zip 文件包含 17 个(或更多)粗糙的文件.flv和.xml包含分离的音频和视频的文件。我搜索了一种将这些转换回常规视频的工具,但没有找到任何有用的东西。我发现那些烦人的、刺耳的文件和那些已经下载到浏览器缓存中用于播放的文件是一样的。
要求每位教授解锁 mp4 下载,例如启用使用/output/filename.mp4?download=mp4withdownload=mp4而不是苛刻的 zip 文件的可能性。但我担心这会要求他们允许任何人在他们的管理设置中公开访问他们的视频,所以我不确定这是否适合他们。
假设 Adobe Connect ID 是 p6vwxp2d0c2f,即 URL 是https://my.adobeconnect.com/p6vwxp2d0c2f。正如您在问题中提到的,您可以/output/p6vwxp2d0c2f.zip?download=zip在 URL 的末尾添加以下载一些包含一堆音频和视频文件以及一些 .xml 文件的 zip 存档。例如,https : //my.adobeconnect.com/p6vwxp2d0c2e/output/p6vwxp2d0c2e.zip ? download =zip可以包含:
Directory of C:\Users\[...]\p6vwxp2d0c2f
02/09/2019 11:27 AM <DIR> .
02/09/2019 11:27 AM <DIR> ..
02/09/2019 11:00 AM 52,239,473 cameraVoip_1_11.flv
02/09/2019 11:00 AM 1,364,573 cameraVoip_1_11.xml
02/09/2019 11:00 AM 7,176,904 cameraVoip_1_15.flv
02/09/2019 11:00 AM 188,012 cameraVoip_1_15.xml
02/09/2019 11:00 AM 6,004 cameraVoip_1_3.flv
02/09/2019 11:00 AM 1,698 cameraVoip_1_3.xml
02/09/2019 11:00 AM 62,603,505 cameraVoip_1_7.flv
02/09/2019 11:00 AM 1,625,383 cameraVoip_1_7.xml
02/09/2019 11:00 AM 2,249 ftcontent1.flv
02/09/2019 11:00 AM 8,219 ftcontent1.xml
02/09/2019 11:00 AM 25,685 ftcontent13.flv
02/09/2019 11:00 AM 85,464 ftcontent13.xml
02/09/2019 11:00 AM 199,781 ftcontent5.flv
02/09/2019 11:00 AM 657,091 ftcontent5.xml
02/09/2019 11:00 AM 182,297 ftcontent9.flv
02/09/2019 11:00 AM 601,758 ftcontent9.xml
02/09/2019 11:00 AM 1,354 fttitle0.flv
02/09/2019 11:00 AM 3,272 fttitle0.xml
02/09/2019 11:00 AM 1,354 fttitle12.flv
02/09/2019 11:00 AM 3,298 fttitle12.xml
02/09/2019 11:00 AM 1,354 fttitle4.flv
02/09/2019 11:00 AM 3,290 fttitle4.xml
02/09/2019 11:00 AM 1,354 fttitle8.flv
02/09/2019 11:00 AM 3,298 fttitle8.xml
02/09/2019 11:00 AM 1,815,158 indexstream.flv
02/09/2019 11:00 AM 7,703,603 indexstream.xml
02/09/2019 11:00 AM 5,316,597 mainstream.flv
02/09/2019 11:00 AM 21,259,001 mainstream.xml
02/09/2019 11:00 AM 217,448,561 screenshare_2_10.flv
02/09/2019 11:01 AM 1,364,572 screenshare_2_10.xml
02/09/2019 11:01 AM 32,364,457 screenshare_2_14.flv
02/09/2019 11:01 AM 188,011 screenshare_2_14.xml
02/09/2019 11:01 AM 387,981 screenshare_2_2.flv
02/09/2019 11:01 AM 1,698 screenshare_2_2.xml
02/09/2019 11:01 AM 237,470,572 screenshare_2_6.flv
02/09/2019 11:01 AM 1,625,385 screenshare_2_6.xml
02/09/2019 11:01 AM 48 telephony-files.xml
02/09/2019 11:01 AM 691 transcriptstream.flv
02/09/2019 11:01 AM 2,391 transcriptstream.xml
39 File(s) 653,935,396 bytes
2 Dir(s) 1,590,358,016 bytes free
Run Code Online (Sandbox Code Playgroud)
要合并它们,您可以使用ffmpeg(我接受了ffmpegOliver Wang / Yannick Hold-Geoffroy / Aaron Hertzmann 的命令):
ffmpeg -i cameraVoip_1_11.flv -i screenshare_2_10.flv -c copy -map 0:a:0 -map 1:v:0 -shortest output.flv
Run Code Online (Sandbox Code Playgroud)
在哪里:
-map 0:a:0:映射仅用于音频的第一个输入文件。-map 1:v:0:映射仅用于视频的第二个输入文件。-shortest:如果cameraVoip_1_11.flv 和screenshare_2_10.flv 的长度不同,请剪切音频或视频。如果您想保留网络摄像头视频并将其放置在视频屏幕共享的某个角落:
ffmpeg -i cameraVoip_1_11.flv -i screenshare_2_10.flv \
-filter_complex \
"color=s=1072x480:c=black [base]; [0:v] setpts=PTS-STARTPTS, scale=640x480 [upperleft]; [1:v] setpts=PTS-STARTPTS, scale=432x240 [upperright]; [base][upperleft] overlay=shortest=1 [tmp1]; [tmp1][upperright] overlay=shortest=1:x=640" \
-c:v libx264 -c:a mp2 output.mkv
Run Code Online (Sandbox Code Playgroud)
关于将 cameraVoip_ _ .xml映射到正确的 screenshare_ _ .xml,以防有多个:
可以查看cameraVoip_ _ .xml / screenshare_ _ .xml 以获取音频/屏幕共享视频开始的时间戳。这允许将 screenshare_ _ .xml映射到正确的 cameraVoip_ _ .xml。
例如,在https://my.adobeconnect.com/p6vwxp2d0c2f/output/p6vwxp2d0c2f.zip?download=zip 中,来自 cameraVoip_1_11.xml 的第 21 行:
<String><![CDATA[Thu Feb 07 21:11:23 2019]]></String>
Run Code Online (Sandbox Code Playgroud)
否则,另一种方法可能是对cameraVoip_ _ .xml / screenshare_ _ .xml进行排序,然后将第一个cameraVoip_ _ .xml映射到第一个screenshare_ _ .xml,将第二个cameraVoip_ _ .xml映射到第一个screenshare_ _ .xml,等等。我不知道在某些情况下它是否会中断(对于我查看的几个 Adobe Connect 录音似乎没问题,但也许这是因为人们总是共享屏幕)。
我写了一些 python 脚本来自动化这个过程(代码仓库:https : //github.com/Franck-Dernoncourt/adobe-connect-video-downloader):
'''
Requirements:
- python 2.7 or 3
- wget, unzip, and ffmpeg accessible from command line.
Examples:
python connect2vid_v2.py https://my.adobeconnect.com/pqc06mcawjgn/ --output_filename=" Understanding how the Network impacts your service"
Please email Franck Dernoncourt <franck.dernoncourt@gmail.com> if you improve this code.
'''
import shlex
import subprocess
import os
import glob
import argparse
import sys
import re
def run_command(command):
print('running command: {0}'.format(command))
process = subprocess.Popen(shlex.split(command), stdout=subprocess.PIPE)
while True:
output = process.stdout.readline()
print(output.strip())
if output == b'' and process.poll() is not None:
print('Done running the command.')
break
if output:
print(output.strip())
rc = process.poll()
return rc
def create_folder_if_not_exists(directory):
'''
Create the folder if it doesn't exist already.
'''
if not os.path.exists(directory):
os.makedirs(directory)
def extract_connect_id(parser, args):
'''
Function written by Aaron Hertzmann
'''
# ----- extract the connectID or ZIP file -----
if len(args.URLorIDorZIP) < 1:
# print('Error: No Connect recording URL provided.')
parser.print_help()
sys.exit(0)
if args.URLorIDorZIP[0][-4:].lower() == '.zip':
sourceZIP = args.URLorIDorZIP[0]
connectID = os.path.basename(sourceZIP[:-4])
elif len(args.URLorIDorZIP[0]) == 12:
connectID = args.URLorIDorZIP[0]
else:
s = args.URLorIDorZIP[0].split('/')
connectID = None
for i in range(len(s)-1):
if 'adobeconnect.com' in s[i]:
connectID = s[i+1]
break
if connectID == None:
print("Error: couldn't parse URL")
sys.exit(1)
return connectID
def main():
'''
This is the main function
'''
# ================ parse the arguments (part of the parsing code was written by Aaron Hertzmann) ======================
parser = argparse.ArgumentParser(description='Download an Adobe Connect recording and convert to a video file.')
parser.add_argument('URLorIDorZIP', nargs='*', help='URL, code, or ZIP file for the Connect recording')
parser.add_argument('--output_folder',default='output_videos',help='Folder for output files')
parser.add_argument('--output_filename',default='noname', help='output_filename')
args = parser.parse_args()
#main_output_folder = "all_videos"
main_output_folder = args.output_folder
output_filename = args.output_filename
output_filename = re.sub(r'[^\w\s]','', output_filename)
output_filename = output_filename.replace('@', '').strip()
print('output_filename: {0}'.format(output_filename))
connect_id = 'pul1pgdvpr87'
connect_id = 'p6vwxp2d0c2f'
connect_id = extract_connect_id(parser, args)
video_filename = 'hello'
video_filename = output_filename
# ================ Download video ======================
output_folder = connect_id
output_zip_filename = '{0}.zip'.format(connect_id)
create_folder_if_not_exists(output_folder)
create_folder_if_not_exists(main_output_folder)
# Step 1: retrieve audio and video files
connect_zip_url = 'https://my.adobeconnect.com/{0}/output/{0}.zip?download=zip'.format(connect_id)
wget_command = 'wget -nc -O {1} {0}'.format(connect_zip_url, output_zip_filename) # -nc, --no-clobber: skip downloads that would download to existing files.
run_command(wget_command)
unzip_command = 'unzip -n {0} -d {1}'.format(output_zip_filename, output_folder) # -n: Unzip only newer files.
run_command(unzip_command)
# Step 2: create final video output
cameraVoip_filepaths = []
for filepaths in sorted(glob.glob(os.path.join(output_folder, 'cameraVoip_*.flv'))):
cameraVoip_filepaths.append(filepaths)
print('cameraVoip_filepaths: {0}'.format(cameraVoip_filepaths))
screenshare_filepaths = []
for filepaths in sorted(glob.glob(os.path.join(output_folder, 'screenshare_*.flv'))):
screenshare_filepaths.append(filepaths)
part = 0
output_filepaths = []
for cameraVoip_filepath, screenshare_filepath in zip(cameraVoip_filepaths, screenshare_filepaths):
output_filepath = os.path.join(main_output_folder, '{0}_{1:04d}.flv'.format(video_filename, part))
#output_filepath = '{0}_{1:04d}.flv'.format(video_filename, part)
output_filepaths.append(output_filepath)
# ffmpeg command from Oliver Wang / Yannick Hold-Geoffroy / Aaron Hertzmann
conversion_command = 'ffmpeg -i "%s" -i "%s" -c copy -map 0:a:0 -map 1:v:0 -shortest -y "%s"'%(cameraVoip_filepath, screenshare_filepath, output_filepath)
# -y: override output file if exists
run_command(conversion_command)
part += 1
# Concatenate all videos into one single video
# /sf/ask/513326271/
video_list_filename = 'video_list.txt'
video_list_file = open(video_list_filename, 'w')
for output_filepath in output_filepaths:
video_list_file.write("file '{0}'\n".format(output_filepath))
video_list_file.close()
final_output_filepath = '{0}.flv'.format(video_filename)
# ffmpeg command from Oliver Wang / Yannick Hold-Geoffroy / Aaron Hertzmann
conversion_command = 'ffmpeg -safe 0 -y -f concat -i "{1}" -c copy "{0}"'.format(final_output_filepath, video_list_filename)
run_command(conversion_command)
#os.remove(video_list_filename)
if __name__ == "__main__":
main()
#cProfile.run('main()') # if you want to do some profiling
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
13923 次 |
| 最近记录: |