kelciour / playphrase

Search and play phrases from movies and audiobooks
173 stars 26 forks source link

output file location change #11

Closed raj6996 closed 4 years ago

raj6996 commented 4 years ago
D:\0.Github\playphrase>playphrase -i "D:\0.Github\playphrase\English" -o "D:\0.Github\Output" -v -s "bhaiya"
Traceback (most recent call last):
  File "playphrase.py", line 528, in <module>
  File "playphrase.py", line 270, in main
IOError: [Errno 13] Permission denied: 'D:\\0.Github\\Output'
[2040] Failed to execute script playphrase

Only works default folder?

kelciour commented 4 years ago

The -o can only be used with the file, i.e. -o "log.txt"

raj6996 commented 4 years ago

is there any option to setup -o option make/change folder automatically?

kelciour commented 4 years ago

I don't understand the question. The -o "log.txt" option will only save the results of "grep" command in "log.txt". It's similar to -d, but -d will output it to the terminal window.

log.txt

G:\English Movies\G.I. Jane (1997).txt:(00:07:43,880, 00:07:49,468) Triathlon, winter sports, Olympic contender... winner of the Arlie Burke essay contest, works Intel.
G:\English Movies\The Fox and the Hound (1981).txt:(00:35:00,966, 00:35:03,765) Yeah, we're goin' s-s-south for the winter.
G:\English Movies\The Sword in the Stone (1963).txt:(00:20:52,243, 00:20:58,624)    That's the guest room. It's a bit drafty in the winter... but in this blazing hot weather, it's the best room in the house.
raj6996 commented 4 years ago

I think my english is bad, so you don't get it properly. -v, --video create video fragments -vs, --video-sub create video fragments with hardcoded subtitles these video cuts saved automatically into default playphrase folder, I want to change it. those video fragments can't setup desire location drive or folder. -o "D:\0.Github\Output" Videogrep or python scripts make it. I wonder why don't support your scripts.

kelciour commented 4 years ago

Thank you. I updated the script and now -o can be used to specify the output directory. It's been released as v.1.2.5 - https://github.com/kelciour/playphrase/releases/tag/v1.2.5

raj6996 commented 4 years ago

./playphrase -i "D:\0.Github\English" -o "D:\0.Github\English\Namaste" -vs "नमस्ते" I used this command and it still same issue like before only output file created that folder. fragments was created in default playphrase folder! please test yourself!

kelciour commented 4 years ago

Sorry, it looks like I uploaded the previous version by mistake. Please try to download it again.

The output folder should exist as it won't be created automatically.

https://github.com/kelciour/playphrase/releases/tag/v1.2.5

raj6996 commented 4 years ago

I redownload, this time it can't create any video files, output folder empty. Previous 1.25 version works fine! please check out again.

kelciour commented 4 years ago

Hmm, it works fine for me. Does it work without -o "D:\0.Github\..."? It should output in the current folder. Maybe create a new folder and use it as -o.

raj6996 commented 4 years ago
Administrator@WIN-R2MDWSDES MINGW64 /d/0.Github/playphrase.v1.25
$ ./playphrase -i "D:\0.Github\English" -o "D:\0.Github\English\output" -vs "नमसते"
ERROR: 'D:\0.Github\English\output' is not a folder

Administrator@WIN-R2MDWSDES MINGW64 /d/0.Github/playphrase.v1.25
$ ./playphrase -i "D:\0.Github\English" -o "D:\0.Github\English\output" -vs "नमसते"
Number of clips: 4
 100% [=========================>] 4/4
Administrator@WIN-R2BMFF7TTIS MINGW64 /d/0.Github/playphrase.v1.25
$

When I pasted link 1st error showed. Then I created output folder, and it running, but output folder was empty. Older v1.25 worked to create segments, now it was not works any more for me.

kelciour commented 4 years ago

I'm not sure why it fails. The only change was to use absolute path instead of relative path. Try the next version. If there're any errors, they should be visible now.

https://github.com/kelciour/playphrase/releases/tag/v1.2.6

And maybe specify the folder that doesn't exist. It'll be created automatically.

./playphrase -i "D:\0.Github\English" -o "D:\0.Github\English\output-2" -vs "नमसते"
raj6996 commented 4 years ago
Administrator@WIN-R2MDWSDES MINGW64 /d/0.Github/playphrase-v1.2.6-win64
$ ./playphrase -i "D:\0.Github\English" -o "D:\0.Github\English\output-2" -vs "नमसते"
'नमसते' is not found in 'D:\0.Github\English'
$ ./playphrase -i "D:\0.Github\English" -vs "नमस्ते"
Number of clips: 4
   0% [>                         ] 0/4
 ffmpeg version N-88555-g6ea7711532 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 7.2.0 (GCC)
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth --enable-libmfx
  libavutil      56.  0.100 / 56.  0.100
  libavcodec     58.  1.100 / 58.  1.100
  libavformat    58.  0.102 / 58.  0.102
  libavdevice    58.  0.100 / 58.  0.100
  libavfilter     7.  0.101 /  7.  0.101
  libswscale      5.  0.101 /  5.  0.101
  libswresample   3.  0.101 /  3.  0.101
  libpostproc    55.  0.100 / 55.  0.100
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Automatic encoder selection failed for output stream #0:2. Default encoder for format mp4 (codec none) is probably disabled. Please choose an encoder manually.
Error selecting an encoder for stream 0:2

New error found!

kelciour commented 4 years ago

I updated FFmpeg to the latest version and reuploaded the release file. Give it a try.

https://github.com/kelciour/playphrase/releases/tag/v1.2.6

raj6996 commented 4 years ago

redownloaded and same issue still happened? I think it some python scripts problem. 1.25 v1 works, then nothing works!

kelciour commented 4 years ago

I pushed a fix. Try a new version.

https://github.com/kelciour/playphrase/releases/tag/v1.2.7

raj6996 commented 4 years ago

Now everything works fine! excellent work...