質問編集履歴

4

誤字

2022/09/24 10:35

投稿

otaihsa
otaihsa

スコア20

test CHANGED
@@ -1 +1 @@
1
- エラー:You have requested merging of multiple formats but ffmpeg is not installed
1
+ エラー:You have requested merging of multiple formats but ffmpeg is not installedを解決したい
test CHANGED
File without changes

3

誤字

2022/09/24 10:34

投稿

otaihsa
otaihsa

スコア20

test CHANGED
File without changes
test CHANGED
@@ -12,7 +12,7 @@
12
12
 
13
13
  最後の動画をダウンロードするところで、「You have requested merging of multiple formats but ffmpeg is not installed.」というエラーが出てしまいます。
14
14
 
15
- FFmpegのインストールは下記を実行済みですがエラーが出てしまいます。
15
+ FFmpegのインストールは下記を実行済みですが、それでもエラーが出てしまいます。
16
16
  https://jp.videoproc.com/edit-convert/how-to-download-and-install-ffmpeg.htm
17
17
 
18
18
 

2

内容の変更

2022/09/24 10:32

投稿

otaihsa
otaihsa

スコア20

test CHANGED
@@ -1 +1 @@
1
- Google colab上で実行できているものをローカルランタイムで接続したら実行しなくなりました。
1
+ エラー:You have requested merging of multiple formats but ffmpeg is not installed
test CHANGED
@@ -1,34 +1,133 @@
1
1
  ### 前提
2
2
 
3
3
  初心者です。
4
-
5
- ### 実現したいこと
4
+ Windows利用者です。
6
-
7
- Google colab上で実行できているものを、ローカルランタイムの接続に切り替えて、同じように実行したいため、ご教授ください。
8
- https://github.com/jantic/DeOldify
9
5
 
10
6
 
11
7
  ### 発生している問題・エラーメッセージ
12
8
 
13
- 最初に、Googleドライブマウントするようにしているのですが、ローカルランタイム接続後はそこエラが出しまいます。
9
+ Google colabをローカルランタイム接続し、下記コードを参考に自分カル構築しています。
10
+ https://github.com/jantic/DeOldify
11
+ https://colab.research.google.com/github/jantic/DeOldify/blob/master/VideoColorizerColab.ipynb
14
12
 
15
- ```ここに言語を入力
16
- ModuleNotFoundError Traceback (most recent call last)
13
+ 最後の動画をダウンロードするところで、「You have requested merging of multiple formats but ffmpeg is not installed.」というエラーが出てしまいます。
17
- ~\AppData\Local\Temp\ipykernel_10024\2358574714.py in <module>
18
- 1 # Google Driveと連携
19
- ----> 2 from google.colab import drive
20
- 3 drive.mount('/content/drive')
21
14
 
15
+ FFmpegのインストールは下記を実行済みですがエラーが出てしまいます。
22
- ModuleNotFoundError: No module named 'google.colab'
16
+ https://jp.videoproc.com/edit-convert/how-to-download-and-install-ffmpeg.htm
23
- ```
24
17
 
25
18
 
26
- ### 試したこと
27
19
 
20
+ どのように解決すればいいのでしょうか?ご教授ください。
21
+
22
+
23
+ ### エラー全文
24
+ ```ここに言語を入力
25
+ [youtube] Ont4ZePxSsk: Downloading webpage
28
- ローカルランタイムの接続は下記記事を参考にし、Google Colab側では「✔接続済み(ローカル)」になっています。
26
+ [youtube] Ont4ZePxSsk: Downloading android player API JSON
27
+ [youtube] Ont4ZePxSsk: Downloading MPD manifest
28
+ [youtube] Ont4ZePxSsk: Downloading MPD manifest
29
+ [info] Ont4ZePxSsk: Downloading 1 format(s): 135+140
29
- https://a1-style.net/how-to-build-google-colaboratory-for-windows-on-local-pc/
30
+ ERROR: You have requested merging of multiple formats but ffmpeg is not installed. Aborting due to --abort-on-error
31
+ ---------------------------------------------------------------------------
32
+ DownloadError Traceback (most recent call last)
33
+ ~\AppData\Local\Temp\ipykernel_6284\1761710269.py in <module>
34
+ 6
35
+ 7 if source_url is not None and source_url !='':
36
+ ----> 8 video_path = colorizer.colorize_from_url(source_url, 'video.mp4', render_factor, watermarked=watermarked)
37
+ 9 show_video_in_notebook(video_path)
38
+ 10 else:
39
+
40
+ ~\Documents\GitHub\DeOldify\deoldify\visualize.py in colorize_from_url(self, source_url, file_name, render_factor, post_process, watermarked)
41
+ 381 ) -> Path:
42
+ 382 source_path = self.source_folder / file_name
43
+ --> 383 self._download_video_from_url(source_url, source_path)
44
+ 384 return self._colorize_from_path(
45
+ 385 source_path, render_factor=render_factor, post_process=post_process,watermarked=watermarked
46
+
47
+ ~\Documents\GitHub\DeOldify\deoldify\visualize.py in _download_video_from_url(self, source_url, source_path)
48
+ 256 }
49
+ 257 with youtube_dl.YoutubeDL(ydl_opts) as ydl:
50
+ --> 258 ydl.download([source_url])
51
+ 259
52
+ 260 def _extract_raw_frames(self, source_path: Path):
53
+
54
+ ~\anaconda3\envs\Python37\lib\site-packages\yt_dlp\YoutubeDL.py in download(self, url_list)
55
+ 3292 for url in url_list:
56
+ 3293 self.__download_wrapper(self.extract_info)(
57
+ -> 3294 url, force_generic_extractor=self.params.get('force_generic_extractor', False))
58
+ 3295
59
+ 3296 return self._download_retcode
60
+
61
+ ~\anaconda3\envs\Python37\lib\site-packages\yt_dlp\YoutubeDL.py in wrapper(*args, **kwargs)
62
+ 3266 def wrapper(*args, **kwargs):
63
+ 3267 try:
64
+ -> 3268 res = func(*args, **kwargs)
65
+ 3269 except UnavailableVideoError as e:
66
+ 3270 self.report_error(e)
67
+
68
+ ~\anaconda3\envs\Python37\lib\site-packages\yt_dlp\YoutubeDL.py in extract_info(self, url, download, ie_key, extra_info, process, force_generic_extractor)
69
+ 1446 raise ExistingVideoReached()
70
+ 1447 break
71
+ -> 1448 return self.__extract_info(url, self.get_info_extractor(key), download, extra_info, process)
72
+ 1449 else:
73
+ 1450 extractors_restricted = self.params.get('allowed_extractors') not in (None, ['default'])
74
+
75
+ ~\anaconda3\envs\Python37\lib\site-packages\yt_dlp\YoutubeDL.py in wrapper(self, *args, **kwargs)
76
+ 1457 while True:
77
+ 1458 try:
78
+ -> 1459 return func(self, *args, **kwargs)
79
+ 1460 except (DownloadCancelled, LazyList.IndexError, PagedList.IndexError):
80
+ 1461 raise
81
+
82
+ ~\anaconda3\envs\Python37\lib\site-packages\yt_dlp\YoutubeDL.py in __extract_info(self, url, ie, download, extra_info, process)
83
+ 1554 if process:
84
+ 1555 self._wait_for_video(ie_result)
85
+ -> 1556 return self.process_ie_result(ie_result, download, extra_info)
86
+ 1557 else:
87
+ 1558 return ie_result
88
+
89
+ ~\anaconda3\envs\Python37\lib\site-packages\yt_dlp\YoutubeDL.py in process_ie_result(self, ie_result, download, extra_info)
90
+ 1612 if result_type == 'video':
91
+ 1613 self.add_extra_info(ie_result, extra_info)
92
+ -> 1614 ie_result = self.process_video_result(ie_result, download=download)
93
+ 1615 self._raise_pending_errors(ie_result)
94
+ 1616 additional_urls = (ie_result or {}).get('additional_urls')
95
+
96
+ ~\anaconda3\envs\Python37\lib\site-packages\yt_dlp\YoutubeDL.py in process_video_result(self, info_dict, download)
97
+ 2710 downloaded_formats.append(new_info)
98
+ 2711 try:
99
+ -> 2712 self.process_info(new_info)
100
+ 2713 except MaxDownloadsReached:
101
+ 2714 max_downloads_reached = True
102
+
103
+ ~\anaconda3\envs\Python37\lib\site-packages\yt_dlp\YoutubeDL.py in process_info(self, info_dict)
104
+ 3127 msg = 'You have requested merging of multiple formats but ffmpeg is not installed'
105
+ 3128 if not self.params.get('ignoreerrors'):
106
+ -> 3129 self.report_error(f'{msg}. Aborting due to --abort-on-error')
107
+ 3130 return
108
+ 3131 self.report_warning(f'{msg}. The formats won\'t be merged')
109
+
110
+ ~\anaconda3\envs\Python37\lib\site-packages\yt_dlp\YoutubeDL.py in report_error(self, message, *args, **kwargs)
111
+ 992 in red if stderr is a tty file.
112
+ 993 '''
113
+ --> 994 self.trouble(f'{self._format_err("ERROR:", self.Styles.ERROR)} {message}', *args, **kwargs)
114
+ 995
115
+ 996 def write_debug(self, message, only_once=False):
116
+
117
+ ~\anaconda3\envs\Python37\lib\site-packages\yt_dlp\YoutubeDL.py in trouble(self, message, tb, is_error)
118
+ 932 else:
119
+ 933 exc_info = sys.exc_info()
120
+ --> 934 raise DownloadError(message, exc_info)
121
+ 935 self._download_retcode = 1
122
+ 936
123
+
124
+ DownloadError: ERROR: You have requested merging of multiple formats but ffmpeg is not installed. Aborting due to --abort-on-error
125
+ ```
30
126
 
31
127
 
32
128
 
33
129
 
34
130
 
131
+
132
+
133
+

1

内容の簡素化

2022/09/21 08:14

投稿

otaihsa
otaihsa

スコア20

test CHANGED
@@ -1 +1 @@
1
- DeOldifyをローカル環境で実行した
1
+ Google colab上で実行できているものをローカルランタイム接続したら実行しなくなりまし
test CHANGED
@@ -1,94 +1,34 @@
1
1
  ### 前提
2
2
 
3
- Github初心者です。
3
+ 初心者です。
4
- Python初心者です。
5
- Windowsを利用しています。
6
4
 
7
5
  ### 実現したいこと
8
6
 
9
- 白黒動画をカラー化するDeOldifyをローカル環境で実行したいと考えています。
10
- Google Colabの無料版りはGPU含め性能が高いPCを使用ため
7
+ Google colab上で実行できているもを、ローカルランタイムの接続に切り替えて、同じうに実行いため、ご教授ください。
11
8
  https://github.com/jantic/DeOldify
12
9
 
13
10
 
14
11
  ### 発生している問題・エラーメッセージ
15
12
 
16
- GithubからCloneのURL、GitHub DesktopClone a repository追加し、ローカルフォルダにダウドしから、次にどういのかわかりせん
13
+ 最初に、Googleドライブマウントするようにしているのですが、ローカルタイム接続後はそこでエラが出てしいま
17
14
 
15
+ ```ここに言語を入力
18
- 多分、Github上の他人のソースコードをローカル環境で実行するという初歩的なことなのだと思いますが、やり方を調べても、分かる内容にたどり着けていません。
16
+ ModuleNotFoundError Traceback (most recent call last)
17
+ ~\AppData\Local\Temp\ipykernel_10024\2358574714.py in <module>
18
+ 1 # Google Driveと連携
19
+ ----> 2 from google.colab import drive
20
+ 3 drive.mount('/content/drive')
21
+
22
+ ModuleNotFoundError: No module named 'google.colab'
23
+ ```
19
24
 
20
25
 
21
26
  ### 試したこと
22
27
 
23
- DeOldify使い方調べても、Google Colabを利用したペジしかでせん
28
+ ローカルランタイム接続は下記記事参考にし、Google Colab側では「✔接続済み(ロカル)」になっ
24
- Google Colabを利用するケースは、私でも実行できています。
25
-
26
-
27
- ▼こちらの記事でローカル環境で実行したと書かれており、コードも紹介されていますが、これを読んでも何でどのように実行すればいいのかわからないレベルです。
28
- https://qiita.com/GL-Kageyama/items/34a0602d1a1d210e525a
29
+ https://a1-style.net/how-to-build-google-colaboratory-for-windows-on-local-pc/
29
30
 
30
31
 
31
32
 
32
- ### 紹介されていたソースコード
33
- ```ここに言語名を入力
34
- !git clone https://github.com/jantic/DeOldify.git DeOldify
35
33
 
36
34
 
37
- cd DeOldify
38
-
39
-
40
- #NOTE: This must be the first call in order to work properly!
41
- from deoldify import device
42
- from deoldify.device_id import DeviceId
43
- #choices: CPU, GPU0...GPU7
44
- device.set(device=DeviceId.GPU0)
45
-
46
- import torch
47
-
48
- if not torch.cuda.is_available():
49
- print('GPU not available.')
50
-
51
- from os import path
52
-
53
-
54
- !pip install -r colab_requirements.txt
55
-
56
-
57
- import fastai
58
- from deoldify.visualize import *
59
- from pathlib import Path
60
- torch.backends.cudnn.benchmark=True
61
- import warnings
62
- warnings.filterwarnings("ignore", category=UserWarning, message=".*?Your .*? set is empty.*?")
63
-
64
-
65
- !mkdir 'models'
66
- !wget https://data.deepai.org/deoldify/ColorizeVideo_gen.pth -O ./models/ColorizeVideo_gen.pth --no-check-certificate
67
-
68
-
69
- !wget https://media.githubusercontent.com/media/jantic/DeOldify/master/resource_images/watermark.png -O ./resource_images/watermark.png
70
-
71
-
72
- colorizer = get_video_colorizer()
73
-
74
-
75
- # YouTube Download & Conversion version
76
-
77
- source_url = 'https://www.youtube.com/watch?v=5eDHlgnRuaM' # @param {type:"YouTube URL String"}
78
- render_factor = 30 # @param {type: "slider", min: 5, max: 40}
79
- watermarked = False # @param {type:"boolean"}
80
-
81
- video_path = colorizer.colorize_from_url(source_url, 'video.mp4', render_factor, watermarked=watermarked)
82
- show_video_in_notebook(video_path)
83
-
84
-
85
- # # Local File Conversion version
86
-
87
- # watermarked = False # @param {type:"boolean"}
88
- # file_name_ext = 'FILE_NAME.mp4' # source/*.mp4 # Put the file in the source folder
89
-
90
- # result_path = colorizer.colorize_from_file_name(file_name_ext, watermarked=watermarked)
91
- # show_video_in_notebook(result_path)
92
- ```
93
-
94
-