F
F
FilmRestoration20192020-10-21 10:04:24
Python
FilmRestoration2019, 2020-10-21 10:04:24

Change the code to insert a link not to one file, but to the entire folder at once (50 video files)?

Hello! Is it possible to change the code 5f8fdbe5b4899134050869.png
https://colab.research.google.com/github/jantic/De...
code
source_url = '' #@param {type:"string"}
render_factor = 20 #@param {type: "slider ", min: 5, max: 40}
watermarked = False #@param {type:"boolean"}
to insert a link not to one file, but to the entire folder at once (50 video files in drive.google)
and so that when rendering is completed, they copied to hard drive?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
PavelMos, 2020-10-21
@PavelMos

The function works with one url. This means that you need to call this function 50 times in turn with the necessary URLs listed in the list, for example, through the for loop

url_list=(....) #список урлов ("www.youtube.com/watch?v=111...", "www.youtube.com/watch?v=222...")
counter=1 #счётчик для имени файла
for source_url in url_list: 
   if source_url is not None and source_url !='':
        video_path = colorizer.colorize_from_url(source_url, 'video'+str(counter)+'.mp4', render_factor, 
             watermarked=watermarked)
        show_video_in_notebook(video_path)
        counter+=1
    else:
        print('Provide a video url and try again.')

Everything should be saved, according to the description, in /DeOldify/video/result/
I don’t know what video.mp4 is, if this is the name of the file under which it will be saved to this directory, it needs to be changed so that several are not saved under one name. For example, add a number by counter.

F
FilmRestoration2019, 2020-10-21
@FilmRestoration2019

Thank you! youtube severely distorts the video, so it has to be from google drive. But click 50 times to get the link/url. And if there are 1000 scenes/video files...
video.mp4 is the rendered url. A playing video appears, and in the lower right corner there is a download button. By clicking on which, the video is downloaded to the default Google Chrome folder.
With that said, the question is: How to properly ask the DeOldify developers a question, otherwise my terminology is not so good?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question