Rudloff / alltube

Web GUI for youtube-dl
GNU General Public License v3.0
2.96k stars 582 forks source link

Cyrillic titles get replaced with "-" #230

Closed tshpr closed 5 years ago

tshpr commented 5 years ago

New issue

When I am trying to download a YouTube video with cyrillic title, it gets replaced with "-" and the identifier after v=. I checked youtube-dl on server and its returning proper file name with "--get-filename"

Your environment

CentOS7 YouTube-DL 2019-06-08

ffmpeg version 2.8.15 Copyright (c) 2000-2018 the FFmpeg developers built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-36) configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' --extra-ldflags='-Wl,-z,relro ' --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3 --enable-bzlib --disable-crystalhd --enable-gnutls --enable-ladspa --enable-libass --enable-libcdio --enable-libdc1394 --enable-libfdk-aac --enable-nonfree --disable-indev=jack --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-openal --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libx264 --enable-libx265 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avresample --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect libavutil 54. 31.100 / 54. 31.100 libavcodec 56. 60.100 / 56. 60.100 libavformat 56. 40.101 / 56. 40.101 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 40.101 / 5. 40.101 libavresample 2. 1. 0 / 2. 1. 0 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 2.101 / 1. 2.101 libpostproc 53. 3.100 / 53. 3.100 Missing argument for option 'v'. Error splitting the argument list: Invalid argument

Please answer these questions when reporting a new issue:

What is your operating system (Windows, Linux, OSX, etc.)? CentOS

What is your web server (Apache, IIS, etc.)? Openlitespeed

What version of AllTube are you using? 2.0.3

How did you install AllTube (with Git or with a release package)? Release

What version of PHP are you using? 7.2

What version of Python are you using? 2.7.5

What version of youtube-dl are you using? 2019-06-08

Do you get any PHP-related errors in your webserver's logs? No

What is the content of your config/config.yml file?

---
# Path to your youtube-dl binary
youtubedl: vendor/rg3/youtube-dl/youtube_dl/__main__.py

# Path to your python binary
python: /usr/bin/python

# An array of parameters to pass to youtube-dl
params:
    - --no-warnings
    - --ignore-errors
    - --flat-playlist
    - --restrict-filenames
    - --no-playlist

# True to enable audio conversion
convert: true

# True to enable advanced conversion mode
convertAdvanced: false

# List of formats available in advanced conversion mode
convertAdvancedFormats: [mp3, avi, flv, wav]

# Path to your avconv or ffmpeg binary
avconv: /usr/bin/ffmpeg

# avconv/ffmpeg logging level.
avconvVerbosity: error

# Path to the directory that contains the phantomjs binary.
phantomjsDir: vendor/bin/

# True to disable URL rewriting
uglyUrls: false

# True to stream videos through server
stream: false

# True to enable remux mode (merge best audio and best video)
remux: false

# MP3 bitrate when converting (in kbit/s)
audioBitrate: 128

# App name
appName: AllTube Download

# Generic formats supported by youtube-dl
genericFormats:
    best: Best
    bestvideo+bestaudio: Remux best video with best audio
    worst: Worst

Please provide the URL of a video that causes the issue. https://www.youtube.com/watch?v=Azd-nR8Wf7I

Describe your issue

To give this video as example: I click right button >> AllTube >> Download as audio and the cyrillic name in the video gets replaced with 2012-Azd-nR8Wf7I . Similarities happen with any other video with cyrillic in its name(the cyrillic part gets omitted or replaced with - for each word).

Let me know if more info is needed.

tshpr commented 5 years ago

P.S. I did a little change in .htaccess on rewrite rules to fix links.

Here is my file:

<ifmodule mod_mime.c>
    AddType application/x-web-app-manifest+json .webapp
    Addtype font/truetype .ttf
</ifmodule>

<ifmodule mod_expires.c>
    ExpiresActive On
    ExpiresByType application/javascript "access plus 1 week"
    ExpiresByType text/css "access plus 1 week"
    ExpiresByType image/png "access plus 1 week"
    ExpiresByType image/jpeg "access plus 1 week"
    ExpiresByType image/svg+xml "access plus 1 week"
    ExpiresByType font/truetype "access plus 1 week"
</ifmodule>

FileETag None

<ifmodule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [QSA,L]
</ifmodule>

<ifmodule mod_filter.c>
    AddOutputFilterByType DEFLATE text/css text/html application/javascript font/truetype
</ifmodule>

<ifmodule mod_headers.c>
    Header set X-Frame-Options "ALLOW-FROM https://ytdw.timetakernet.info/"
    Header set X-Content-Type-Options nosniff
    Header set X-XSS-Protection "1; mode=block"
    Header set Referrer-Policy no-referrer
    Header set Content-Security-Policy "default-src 'self'; object-src 'none'; script-src 'none'; img-src http:"
</ifmodule>

I removed the heroku-related RewriteCond and RewriteRule.

Rudloff commented 5 years ago

Hello, See https://github.com/Rudloff/alltube/issues/160#issuecomment-379758956 for an explanation.