Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Possible encoding conflict when saving output and errors to file. Missing comma in title. #24334
Comments
|
This has nothing to do with youtube-dl and its options as |
|
Thanks for the tip. I am new to all of this and I am not sure how to "setup proper UTF-8 locale". Is this within youtube-dl?
I did figure out how to use the encoding property. For those who follow there is no hyphen required between --encoding and type. After adding |
Checklist
Question
WRITE QUESTION HERE
This would be the best place to ask regarding an issue I am encountering with youtube-dl. I am writing errors and output to a text file called vidstatus and referencing those lines to give feedback to AppleScript on the progress of the youtube-dl request.
The title of the video is altered when writing errors and output to that temp file. When I reference the title in the tmp file, to use as a path to the downloaded file, the script fails since the title has been altered. It's apparent that there's an encoding conflict when writing output and errors to the file, but I am not sure what process or arguments are causing this or how to correct it.
After I run this in AppleScript a comma is removed from the title in the /tmp/vidstatus file.
do shell script "cd /tmp/; /usr/local/bin/youtube-dl --newline --ffmpeg-location /usr/local/bin/ffmpeg " & currentURL & " > /tmp/vidstatus 2>&1 & echo $!"I get a report like this:
In this instance the issue is in the word Mens. The comma has been removed when writing the output to the file. I am not sure what process is causing this or how to correct it.
This line in my configuration file:
-o '/Volumes/Godzilla/Video/YouTube Video/%(title)s-%(id)s.%(ext)s'When the file is downloaded the path looks like this:
/Volumes/Godzilla/Video/YouTube Video/Nathan Adrian vs Caeleb Dressel _ Men’s 100m Free B Final _ 2020 TYR Pro Swim Series - Des Moines-wvYJ_j92bjU.mp4The difference between Men's and Mens is a stumbling block for my AppleScript.
When running youtube-dl in terminal the comma is not removed from errors and output.
I don't see a request in the reporting template to include debug info but I will include it here as requested:
I attempted to add encoding to the configuration and received an error.
youtube-dl: error: no such option: --encoding-US-ASCIII don't see a list of acceptable encodings