Example #1
0
def _create_and_upload_ru_mono_video(orig_mp4_filename, ts_title_filename,
                                     ts_rest_filename):
    concat_str = _get_concat_args(ts_title_filename, ts_rest_filename)
    ru_mono_titled_mp4_filename = meta.get_work_filename(
        orig_mp4_filename, ' ru_mono titled.mkv')
    cmd = [
        'D:\\video\\GoswamiMj-videos\\ffmpeg-hi8-heaac.exe', '-y', '-i',
        concat_str
    ]
    cmd += ffmpeg.ss_args(orig_mp4_filename)
    cmd += ['-i', meta.get_work_filename(orig_mp4_filename, ' ru_mixdown.wav')]
    cmd += ['-c:v', 'copy']
    cmd += ['-c:a', 'libfdk_aac']
    cmd += ['-ac', '1']  # mono
    cmd += ffmpeg.to_args(orig_mp4_filename)
    cmd += ['-shortest']
    cmd += [ru_mono_titled_mp4_filename]
    os.chdir('D:\\video\GoswamiMj-videos')
    subprocess.run(cmd, check=True)
    os.chdir('C:\\Users\\ashutosh\\Dropbox\\Reference\S\scripts')

    title = meta.get_youtube_title_ru_mono(orig_mp4_filename)
    description = meta.get_youtube_description_ru_mono(orig_mp4_filename)
    youtube_id = my_youtube.upload(ru_mono_titled_mp4_filename,
                                   title=title,
                                   description=description,
                                   lang='ru')
    meta.update_yaml(orig_mp4_filename, 'youtube_id_rus_mono', youtube_id)
Example #2
0
def _create_and_upload_ru_mono_video(orig_mp4_filename):
    ru_mono_m4a_filename = meta.get_work_filename(orig_mp4_filename,
                                                  ' ru_mono.m4a')
    cmd = [
        'D:\\video\\GoswamiMj-videos\\ffmpeg-hi8-heaac.exe', '-y', '-i',
        meta.get_work_filename(orig_mp4_filename,
                               ' ru_mixdown.wav'), '-c:a', 'libfdk_aac', '-ac',
        '1', '-b:a', '128k', '-metadata:s:a:0', 'language=rus'
    ]
    cmd += ffmpeg.meta_args_ru_mono(orig_mp4_filename)
    cmd += [ru_mono_m4a_filename]
    subprocess.run(cmd, check=True)

    ru_mono_video_filename = meta.get_work_filename(orig_mp4_filename,
                                                    ' ru_mono.mkv')
    cmd = [
        'ffmpeg', '-y', '-i', orig_mp4_filename, '-i', ru_mono_m4a_filename,
        '-map', '0:v', '-map', '1:a', '-c', 'copy'
    ]
    cmd += ffmpeg.meta_args_ru_mono(orig_mp4_filename)
    cmd += ffmpeg.ss_args(orig_mp4_filename)
    cmd += ffmpeg.to_args(orig_mp4_filename)
    cmd += [ru_mono_video_filename]
    subprocess.run(cmd, check=True)

    title = meta.get_youtube_title_ru_mono(orig_mp4_filename)
    description = meta.get_youtube_description_ru_mono(orig_mp4_filename)
    youtube_id = my_youtube.upload(ru_mono_video_filename,
                                   title=title,
                                   description=description,
                                   lang='ru')
    meta.update_yaml(orig_mp4_filename, 'youtube_id_rus_mono', youtube_id)
Example #3
0
 def descr_eng_modified(self, *args):
     really_modified = self.descr_eng_widget.edit_modified()
     if not really_modified:
         return
     if not self.descr_eng_active:
         return
     text = self.descr_eng_widget.get('1.0', tk.END).strip() + '\n'
     meta.update_yaml(self.filename.get(), 'descr_eng', text)
     self.descr_eng_widget.edit_modified(False)
Example #4
0
 def run(callback):
     title = meta.get_youtube_title(orig_mp4_filename, lang)
     description = meta.get_youtube_description_orig(orig_mp4_filename, lang)
     youtube_id = my_youtube.upload(
         cut_video_filename,
         title=title,
         description=description,
         lang=lang,
         update=callback)
     meta.update_yaml(orig_mp4_filename, 'youtube_id_orig', youtube_id)
Example #5
0
 def cut_var_changed_callback(self):
     meta.update_yaml(self.filename.get(), 'cut', self.cut_entry.get())
Example #6
0
 def skip_var_changed_callback(self):
     meta.update_yaml(self.filename.get(), 'skip', self.skip_entry.get())
Example #7
0
 def title_eng_changed_callback(self):
     meta.update_yaml(self.filename.get(), 'title_eng', self.title_eng.get())
Example #8
0
 def title_rus_changed_callback(self):
     meta.update_yaml(self.filename.get(), 'title_rus', self.title_rus.get())
Example #9
0
 def lang_changed_callback(self):
     new_lang = self.lang.get()
     old_lang = meta.get_lang(self.filename.get())
     if new_lang != old_lang:
         meta.update_yaml(self.filename.get(), 'lang', new_lang)