AlfredoSequeida / fvid

fvid is a project that aims to encode any file as a video using 1-bit color images to survive compression algorithms for data retrieval.
MIT License
354 stars 43 forks source link

SyntaxError: invalid syntax #6

Closed KasperSvendsenGit closed 4 years ago

KasperSvendsenGit commented 4 years ago

Hi, I'm getting a syntax error when trying execute. Doesn't seem to be related to file formats... Can you help.

python fvid.py -i test.mp4 -e File "fvid.py", line 90 f"{FRAMES_DIR}decoded_frames%03d.png" ^ SyntaxError: invalid syntax

python fvid.py -i image.jpeg -e File "fvid.py", line 90 f"{FRAMES_DIR}decoded_frames%03d.png" ^ SyntaxError: invalid syntax

python fvid.py -i image2.png -e File "fvid.py", line 90 f"{FRAMES_DIR}decoded_frames%03d.png" ^ SyntaxError: invalid syntax

python fvid.py -i test.txt -e File "fvid.py", line 90 f"{FRAMES_DIR}decoded_frames%03d.png" ^ SyntaxError: invalid syntax

YakirOren commented 4 years ago

check the version of python

KasperSvendsenGit commented 4 years ago

check the version of python

I'm running Python 2.7.18, tried running it with Python3 as well, but get different errors with that. Thanks!

YakirOren commented 4 years ago

im trying to figure out the other errors too :/

7

dtaivpp commented 4 years ago

Hey all post your other errors here. I got this working on macos python 3. One of the issues I ran into is you need to install libmagic. If you have homebrew you can do brew install libmagic

Also @KasperSvendsenGit your issue with python 2 is it doesn't have support for 'f' strings so it will need to be run with Python3

AlfredoSequeida commented 4 years ago

@KasperSvendsenGit The first thing that comes to mind is what @dtaivpp said. fstrings were implemented with python 3.6. So if you tried python 3 then I would make sure that you have 3.6 or newer.

KasperSvendsenGit commented 4 years ago

@KasperSvendsenGit The first thing that comes to mind is what @dtaivpp said. fstrings were implemented with python 3.6. So if you tried python 3 then I would make sure that you have 3.6 or newer.

Alright now running on Python 3.8.6, it doesn't strictly error out anymore, though I don't get an output file. @dtaivpp Installing libmagic doesn't seem to have changed anything on linux.

image

AlfredoSequeida commented 4 years ago

@KasperSvendsenGit I'm glad you got that working. If you're using the latest version (0.0.2) from this repo, the project structure has changed so running it like that won't work without some modifications since the entry point has changed.

The easy fix would be to install it using pip3

pip3 install fvid

then you can just run it like:

fvid -i [input file] -e

to encode from any directory in your command line

alternatively, you should also be able to call it using the __main__.py file

Let me know how that goes for you.

KasperSvendsenGit commented 4 years ago

@AlfredoSequeida I've resolved the problem by running "sudo pip3 install fvid"

Thanks!