Browse Source

check file exists

master
Kayn Ty 4 months ago
parent
commit
fd2c3bab33
  1. 0
      .gitignore
  2. 0
      .idea/.gitignore
  3. 0
      .idea/modules.xml
  4. 0
      .idea/transcription-vosk.iml
  5. 0
      .idea/vcs.xml
  6. 0
      LICENSE.md
  7. 0
      Makefile
  8. 0
      README.md
  9. 0
      clean.sh
  10. 0
      conversion_simple_en.py
  11. 0
      conversion_simple_fr.py
  12. 0
      extract_srt.py
  13. 0
      extract_srt_en.py
  14. 0
      input/.gitkeep
  15. 0
      input/aside/demo.wav
  16. 0
      input/converted_to_wav/.gitkeep
  17. 0
      inputs_to_wav.sh
  18. 0
      install.sh
  19. 44
      log_ydl.txt
  20. 0
      models/.gitkeep
  21. 0
      output/.gitkeep
  22. 0
      transcript.sh
  23. 0
      wav_to_wav_mono.sh
  24. 0
      webm_to_wav.sh
  25. 0
      website/_foot.php
  26. 0
      website/_head.php
  27. 0
      website/bulma.min.css
  28. 24
      website/download.php
  29. 0
      website/index.php
  30. 0
      website/info.php
  31. 11
      website/log_ydl.txt
  32. 0
      website/run.php
  33. 0
      website/test_works.txt

0
.gitignore

0
.idea/.gitignore

0
.idea/modules.xml

0
.idea/transcription-vosk.iml

0
.idea/vcs.xml

0
LICENSE.md

0
Makefile

0
README.md

0
clean.sh

0
conversion_simple_en.py

0
conversion_simple_fr.py

0
extract_srt.py

0
extract_srt_en.py

0
input/.gitkeep

0
input/aside/demo.wav

0
input/converted_to_wav/.gitkeep

0
inputs_to_wav.sh

0
install.sh

44
log_ydl.txt

@ -0,0 +1,44 @@
total 1708
-rw-r--r-- 1 www-data www-data 271266 Mar 23 09:48 base.mp3
-rw-r--r-- 1 www-data www-data 1470542 Mar 27 14:43 mono_canal.wav
Sat Mar 27 14:43:32 CET 2021 ###### end conversion __ 2021-Mar-27_1616852609 __ https://peertube.cipherbliss.com/videos/watch/e6a37508-042e-4d83-8598-5d36b764bb3d
total 1708
-rw-r--r-- 1 www-data www-data 271266 Mar 23 09:48 base.mp3
-rw-r--r-- 1 www-data www-data 1470542 Mar 27 21:48 mono_canal.wav
Sat Mar 27 21:48:48 CET 2021 ###### end conversion __ 2021-Mar-27_1616878123 __ https://peertube.cipherbliss.com/videos/watch/e6a37508-042e-4d83-8598-5d36b764bb3d
total 1708
-rw-r--r-- 1 www-data www-data 271266 Mar 23 09:48 base.mp3
-rw-r--r-- 1 www-data www-data 1470542 Apr 20 17:19 mono_canal.wav
Tue Apr 20 17:19:20 CEST 2021 ###### end conversion __ 2021-Apr-20_1618931951 __ https://peertube.cipherbliss.com/videos/watch/e6a37508-042e-4d83-8598-5d36b764bb3d
total 1708
-rw-r--r-- 1 www-data www-data 271266 Mar 23 09:48 base.mp3
-rw-r--r-- 1 www-data www-data 1470542 Apr 20 17:37 mono_canal.wav
Tue Apr 20 17:37:31 CEST 2021 ###### end conversion __ 2021-Apr-20_1618933048 __ https://peertube.cipherbliss.com/videos/watch/e6a37508-042e-4d83-8598-5d36b764bb3d
total 1708
-rw-r--r-- 1 www-data www-data 271266 Mar 23 09:48 base.mp3
-rw-r--r-- 1 www-data www-data 1470542 Aug 18 16:09 mono_canal.wav
Wed Aug 18 16:09:53 CEST 2021 ###### end conversion __ 2021-Aug-18_1629295789 __ https://peertube.cipherbliss.com/videos/watch/e6a37508-042e-4d83-8598-5d36b764bb3d
total 1708
-rw-r--r-- 1 www-data www-data 271266 Mar 23 09:48 base.mp3
-rw-r--r-- 1 www-data www-data 1470542 Aug 18 16:10 mono_canal.wav
Wed Aug 18 16:10:50 CEST 2021 ###### end conversion __ 2021-Aug-18_1629295848 __ https://peertube.cipherbliss.com/videos/watch/e6a37508-042e-4d83-8598-5d36b764bb3d
total 1708
-rw-r--r-- 1 www-data www-data 271266 Mar 23 09:48 base.mp3
-rw-r--r-- 1 www-data www-data 1470542 Aug 18 16:12 mono_canal.wav
Wed Aug 18 16:12:13 CEST 2021 ###### end conversion __ 2021-Aug-18_1629295930 __ https://peertube.cipherbliss.com/videos/watch/e6a37508-042e-4d83-8598-5d36b764bb3d
total 1708
-rw-r--r-- 1 www-data www-data 271266 Mar 23 09:48 base.mp3
-rw-r--r-- 1 www-data www-data 1470542 Aug 18 16:14 mono_canal.wav
Wed Aug 18 16:14:15 CEST 2021 ###### end conversion __ demo_video_tk __ https://peertube.cipherbliss.com/videos/watch/e6a37508-042e-4d83-8598-5d36b764bb3d
total 1708
-rw-r--r-- 1 www-data www-data 271266 Mar 23 09:48 base.mp3
-rw-r--r-- 1 www-data www-data 1470542 Aug 18 16:14 mono_canal.wav
Wed Aug 18 16:15:56 CEST 2021 ###### end conversion __ demo_video_tk __ https://peertube.cipherbliss.com/videos/watch/e6a37508-042e-4d83-8598-5d36b764bb3d
total 1708
-rw-r--r-- 1 www-data www-data 271266 Mar 23 09:48 base.mp3
-rw-r--r-- 1 www-data www-data 1470542 Aug 18 16:14 mono_canal.wav
Wed Aug 18 16:16:17 CEST 2021 ###### end conversion __ demo_video_tk __ https://peertube.cipherbliss.com/videos/watch/e6a37508-042e-4d83-8598-5d36b764bb3d
total 1708
-rw-r--r-- 1 www-data www-data 271266 Mar 23 09:48 base.mp3
-rw-r--r-- 1 www-data www-data 1470542 Aug 18 16:14 mono_canal.wav
Wed Aug 18 16:17:22 CEST 2021 ###### end conversion __ demo_video_tk __ https://peertube.cipherbliss.com/videos/watch/e6a37508-042e-4d83-8598-5d36b764bb3d

0
models/.gitkeep

0
output/.gitkeep

0
transcript.sh

0
wav_to_wav_mono.sh

0
webm_to_wav.sh

0
website/_foot.php

0
website/_head.php

0
website/bulma.min.css

24
website/download.php

@ -24,7 +24,7 @@ include( '_head.php' );
// sanitize input
$url = $_POST[ 'url' ];
$lang = $_POST[ 'lang' ] or 'fr';
$lang = isset($_POST[ 'lang' ]) ? $_POST['lang'] : 'fr';
echo "<br/>récupération de la vidéo à l'url " . $url . " ... <br>";
@ -32,18 +32,28 @@ include( '_head.php' );
// print '[Erreur] pas de commande youtube-dl installée sur ce serveur';
// } else {
$uniqid = date( 'Y-M-d_' ) . time();
// $uniqid = date( 'Y-M-d_' ) . time();
$uniqid = 'demo_video_tk';
// # exemple url https://peertube.cipherbliss.com/videos/watch/e6a37508-042e-4d83-8598-5d36b764bb3d
if (file_exists('../input/ydl/'.$uniqid)) {
echo "The file $filename exists";
}else{
// exec( './youtube-dl.sh uniqueid_facho https://peertube.cipherbliss.com/videos/watch/b88a9568-517c-4a49-ab07-75c79323a825', $output, $result );
exec( './youtube-dl.sh ' . $uniqid . ' ' . $url . ' ' . $lang, $output, $result );
$phrases_only = file_get_contents( '../input/ydl/' . $uniqid . '/3_without_nulls.txt' );
echo "<br/> résultat du script. <br>";
echo "<br/> résultat du script. <br><pre>";
var_dump( $result );
echo "</pre><br/> output du script. <br><pre>";
var_dump( $output );
echo "</pre>";
if ( $result ) {
@ -75,6 +85,7 @@ include( '_head.php' );
echo "<br/>Conversion de la vidéo " . $uniqid . "... <br>";
}
echo '<article class="message is-success">
<div class="message-header">
<p>Succès</p>
@ -82,8 +93,11 @@ include( '_head.php' );
</div>
<div class="message-body">
Vous pouvez télécharger vos fichiers.
<ul>
<li>
<a href='../input/ydl/'.$uniqid.'/4_phrases_.txt'>phrases txt</a>
</li>
</ul>
</div>
</article><br>
<article class="message is-info">

0
website/index.php

0
website/info.php

11
website/log_ydl.txt

@ -8,3 +8,14 @@
Sat Mar 27 14:23:15 CET 2021 ###### start conversion __ batman_script __ https://peertube.cipherbliss.com/videos/watch/193545b2-3cd5-468a-b563-e17d0121e1bf
Sat Mar 27 14:23:18 CET 2021 ###### end conversion __ batman_script __ https://peertube.cipherbliss.com/videos/watch/193545b2-3cd5-468a-b563-e17d0121e1bf
Sat Mar 27 14:24:10 CET 2021 ###### start conversion __ batman_script __ https://peertube.cipherbliss.com/videos/watch/193545b2-3cd5-468a-b563-e17d0121e1bf
Sat Mar 27 14:43:29 CET 2021 ###### start conversion __ 2021-Mar-27_1616852609 __ https://peertube.cipherbliss.com/videos/watch/e6a37508-042e-4d83-8598-5d36b764bb3d
Sat Mar 27 21:48:44 CET 2021 ###### start conversion __ 2021-Mar-27_1616878123 __ https://peertube.cipherbliss.com/videos/watch/e6a37508-042e-4d83-8598-5d36b764bb3d
Tue Apr 20 17:19:12 CEST 2021 ###### start conversion __ 2021-Apr-20_1618931951 __ https://peertube.cipherbliss.com/videos/watch/e6a37508-042e-4d83-8598-5d36b764bb3d
Tue Apr 20 17:37:28 CEST 2021 ###### start conversion __ 2021-Apr-20_1618933048 __ https://peertube.cipherbliss.com/videos/watch/e6a37508-042e-4d83-8598-5d36b764bb3d
Wed Aug 18 16:09:49 CEST 2021 ###### start conversion __ 2021-Aug-18_1629295789 __ https://peertube.cipherbliss.com/videos/watch/e6a37508-042e-4d83-8598-5d36b764bb3d
Wed Aug 18 16:10:48 CEST 2021 ###### start conversion __ 2021-Aug-18_1629295848 __ https://peertube.cipherbliss.com/videos/watch/e6a37508-042e-4d83-8598-5d36b764bb3d
Wed Aug 18 16:12:10 CEST 2021 ###### start conversion __ 2021-Aug-18_1629295930 __ https://peertube.cipherbliss.com/videos/watch/e6a37508-042e-4d83-8598-5d36b764bb3d
Wed Aug 18 16:14:13 CEST 2021 ###### start conversion __ demo_video_tk __ https://peertube.cipherbliss.com/videos/watch/e6a37508-042e-4d83-8598-5d36b764bb3d
Wed Aug 18 16:15:53 CEST 2021 ###### start conversion __ demo_video_tk __ https://peertube.cipherbliss.com/videos/watch/e6a37508-042e-4d83-8598-5d36b764bb3d
Wed Aug 18 16:16:15 CEST 2021 ###### start conversion __ demo_video_tk __ https://peertube.cipherbliss.com/videos/watch/e6a37508-042e-4d83-8598-5d36b764bb3d
Wed Aug 18 16:17:20 CEST 2021 ###### start conversion __ demo_video_tk __ https://peertube.cipherbliss.com/videos/watch/e6a37508-042e-4d83-8598-5d36b764bb3d

0
website/run.php

0
website/test_works.txt

Loading…
Cancel
Save