Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors in "merge" audio and video without downloading? #17

Open
Ipokrit opened this issue Jan 31, 2019 · 0 comments
Open

Errors in "merge" audio and video without downloading? #17

Ipokrit opened this issue Jan 31, 2019 · 0 comments

Comments

@Ipokrit
Copy link

Ipokrit commented Jan 31, 2019

   Hi,
   It seems I found two errors in how the script works with "--skip-download" key

parser.add_argument("-s", "--skip-download", action="store",
help="merges video and audio output of already downloaded streams",
metavar="TIMESTAMP")

   First. When downloading audio and video files are saved in a temporary folder, the name of which ("OUT_PREFIX") is obtained by joining "TIMESTAMP" and "SALT".
# Prefix for this run
TIMESTAMP = datetime.datetime.now().strftime("%Y%m%d-%H%M%S")
SALT = ''.join(random.choice(string.digits) for _ in range(3))
OUT_PREFIX = TIMESTAMP + '-' + SALT
But the argument of "--skip-download" key replaces only the first half.
if args.skip_download:
TIMESTAMP = args.skip_download
print("Overriding timestamp with:", TIMESTAMP)
And as "SALT" is still generated randomly we get incorrect folder address with previously downloaded video.

   And second. When the script works with "--skip-download" key, it first creates "OUT_PREFIX" from "TIMESTAMP" and "SALT", then change "TIMESTAMP", but the value "OUT_PREFIX" remains the same! As a result, we all the more do not get the correct address previously downloaded video.

@Ipokrit Ipokrit changed the title Errors in combine audio and video without downloading? Errors in "merge" audio and video without downloading? Feb 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant