Closed ch4rc0al1080 closed 4 years ago
When I use Alltube as a library.I use this options
Config::setOptions(
[
'youtubedl' => '/usr/local/bin/youtube-dl',
'python' => '/usr/bin/python3',
'params' => array("--no-warnings","--ignore-errors","--flat-playlist","--restrict-filenames","--no-playlist"),
]
);
And I try to get specific videos by using
$video = new Video($url, 'mp4');
I found an interesting fact.
If I use Alltube website JSON API to get json, the url will be a mp4 file
But if I use function getJson()
, I will get m3u8 file
Hello, Would it be possible to provide a SFW video that reproduces the issue?
M3U8 is not a real video format, it is a playlist format that only contains references to video files located elsewhere. There is usually no point in just downloading the M3U8 file by itself, so if stream mode is enabled, Alltube will fetch the real video stream for you: https://github.com/Rudloff/alltube/blob/acc63a536e72709f8d8043b06652e3a92ddb10bb/controllers/DownloadController.php#L167
So if you want to do the same thing with the library, you probably need to use getM3uStream()
.
I will provide the url later, but I think I have fixed how to get a mp4 url
-f mp4
is not right. It should be -f 720p
About providing a SFW video, I just found the problem on pornhub by now...
I will provide the url later, but I think I have fixed how to get a mp4 url
-f mp4
is not right. It should be-f 720p
Hello, Where to put '-f 720p' to get 720p link? With default settings it shows link to .m3u8
I will provide the url later, but I think I have fixed how to get a mp4 url
-f mp4
is not right. It should be-f 720p
Hello, Where to put '-f 720p' to get 720p link? With default settings it shows link to .m3u8
like this
$video = new Video($url, "720p");
I will provide the url later, but I think I have fixed how to get a mp4 url
-f mp4
is not right. It should be-f 720p
Hello, Where to put '-f 720p' to get 720p link? With default settings it shows link to .m3u8
like this
$video = new Video($url, "720p");
Thank you, it works.
For youtube-dl I can use '[height<=720]' command. youtube-dl -g -f '[height<=720]' URL This command will give a link no higher than 720p resolution
For example if video have 1080p it will show 720p If 720p -> 720p If 480p -> 480p
How can I use this command or something like this?
I will provide the url later, but I think I have fixed how to get a mp4 url
-f mp4
is not right. It should be-f 720p
Hello, Where to put '-f 720p' to get 720p link? With default settings it shows link to .m3u8
like this
$video = new Video($url, "720p");
Thank you, it works.
For youtube-dl I can use '[height<=720]' command. youtube-dl -g -f '[height<=720]' URL This command will give a link no higher than 720p resolution
For example if video have 1080p it will show 720p If 720p -> 720p If 480p -> 480p
How can I use this command or something like this?
According to the code, I found that you can use $video = new Video($url, "[height<=720]")
, because
$video = new Video($url, $format);
$video_url = $video->getUrl();
will run as
youtube-dl -g -f $format $url
May be it will be better if @Rudloff will be so nice to add more information in README
Thank you!
I am closing this, since it seems you got what you needed.
Different video format gotten from website and as library.
Your environment
Please answer these questions when reporting a new issue:
What is your operating system (Windows, Linux, OSX, etc.)?
Ubuntu 18.04 LTS
What is your web server (Apache, IIS, etc.)?Apache2
What version of AllTube are you using?LTS by 2020-02-12
How did you install AllTube (with Git or with a release package)?Git
What version of PHP are you using?7.2.24
What version of Python are you using?3.6.9
What version of youtube-dl are you using?2020.01.01
Do you get any PHP-related errors in your webserver's logs? no What is the content of yourconfig/config.yml
file?Describe your issue
I use Alltube as a libaray to get pornhub videos . But recently I found that when I get a pornhub video by website(Alltube website I bulit),I can get a 'mp4' file, but I can only get 'm3u8' file while using it as a function.
my Alltube website: https://52proxy.fun/ytb/