Removed live play feature as it does not work.
This commit is contained in:
parent
fdd63c0497
commit
c49e446f35
|
@ -37,7 +37,6 @@
|
||||||
"class configs: \n",
|
"class configs: \n",
|
||||||
" #@markdown ## Configuration\n",
|
" #@markdown ## Configuration\n",
|
||||||
" method = \"ascii-color\" #@param [\"filled-ascii\", \"ascii-color\", \"just-ascii\"]\n",
|
" method = \"ascii-color\" #@param [\"filled-ascii\", \"ascii-color\", \"just-ascii\"]\n",
|
||||||
" action = \"download\" #@param [\"run\", \"download\"]\n",
|
|
||||||
"\n",
|
"\n",
|
||||||
"# Set screen formatting. \n",
|
"# Set screen formatting. \n",
|
||||||
"class formatting:\n",
|
"class formatting:\n",
|
||||||
|
@ -67,7 +66,7 @@
|
||||||
"try: \n",
|
"try: \n",
|
||||||
" from google.colab import files; from google.colab import output\n",
|
" from google.colab import files; from google.colab import output\n",
|
||||||
"except: \n",
|
"except: \n",
|
||||||
" info.err(formatting.font.bold + 'You are not using this in Google CoLab. ' + formatting.clear + 'For this to work, please do so. ')\n",
|
" info.err(formatting.font.bold + 'Google CoLab is required to run this.' + formatting.clear + ' This requires components only available in Google CoLab servers.')\n",
|
||||||
" os.kill(os.getpid(), 1)\n",
|
" os.kill(os.getpid(), 1)\n",
|
||||||
"\n",
|
"\n",
|
||||||
"# Install apt programs and python modules. \n",
|
"# Install apt programs and python modules. \n",
|
||||||
|
@ -170,12 +169,8 @@
|
||||||
" if check_file_exists(): os.system('rm -rf output.old.sh && mv output.sh output.old.sh -v')\n",
|
" if check_file_exists(): os.system('rm -rf output.old.sh && mv output.sh output.old.sh -v')\n",
|
||||||
"\n",
|
"\n",
|
||||||
" def process():\n",
|
" def process():\n",
|
||||||
" if configs.action == \"download\":\n",
|
" info.status('Processing the video. This will take some while.')\n",
|
||||||
" info.status('Processing the video. This will take some while.')\n",
|
" !video-to-ascii -f video.mp4 -o output.sh --strategy {configs.method}\n",
|
||||||
" !video-to-ascii -f video.mp4 -o output.sh --strategy {configs.method}\n",
|
|
||||||
" else:\n",
|
|
||||||
" info.status('Processing the video. After some while, the video will play.')\n",
|
|
||||||
" !video-to-ascii -f video.mp4 --strategy {configs.method}\n",
|
|
||||||
"\n",
|
"\n",
|
||||||
" def check_success():\n",
|
" def check_success():\n",
|
||||||
" if check_file_exists():\n",
|
" if check_file_exists():\n",
|
||||||
|
@ -188,24 +183,20 @@
|
||||||
"\n",
|
"\n",
|
||||||
" attemptReplace()\n",
|
" attemptReplace()\n",
|
||||||
" process()\n",
|
" process()\n",
|
||||||
" if configs.action == \"download\":\n",
|
" check_success()\n",
|
||||||
" check_success()\n",
|
|
||||||
"\n",
|
"\n",
|
||||||
"def download_results():\n",
|
"def download_results():\n",
|
||||||
" info.status('Downloading the output…')\n",
|
" info.status('Downloading the output…')\n",
|
||||||
" try:\n",
|
" try:\n",
|
||||||
" files.download('output.sh')\n",
|
" files.download('output.sh')\n",
|
||||||
" except:\n",
|
" except:\n",
|
||||||
" info.err('The file could not be downloaded, but it is available for manual downloading at the files view in the sidebar.')\n",
|
" info.err('The file could not be downloaded automatically, but it is available for at the files view in the sidebar.')\n",
|
||||||
" else:\n",
|
|
||||||
" info.success('The file was succesfully downloaded.')\n",
|
|
||||||
"\n",
|
"\n",
|
||||||
"def main():\n",
|
"def main():\n",
|
||||||
" get_dependencies()\n",
|
" get_dependencies()\n",
|
||||||
" download_video()\n",
|
" download_video()\n",
|
||||||
" render()\n",
|
" render()\n",
|
||||||
" if configs.action == \"download\":\n",
|
" download_results()\n",
|
||||||
" download_results()\n",
|
|
||||||
"\n",
|
"\n",
|
||||||
"main()"
|
"main()"
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue