how to download a specific no of videos from a youtube playlist using Youtube-dl? - youtube-dl

I want to download a particular no. of videos from a Youtube playlist where they are arranged one after the other. How can I do so using youtube-dl and FFmpeg? Also, I want to number them according to their numbers in the playlist.

Use --playlist-end and a template with playlist_index, like this:
youtube-dl --playlist-end 2 -o "%(playlist_index)s-%(title)s-%(id)s.%(ext)s" PLiZxWe0ejyv9R8q1jN70HZ4mwhTJxSIXf
Replace 2 with the number of videos you want to download, and PLiZxWe0ejyv9R8q1jN70HZ4mwhTJxSIXf with the playlist ID or playlist URL you actually want to download.

Related

Thumnails for images in Instagram Graph API

I'd like to ask if there is any way to get thumbnail image for media returned from Instagram Graph API? I can get an image URL by using following endpoint: /{InstagramUserId}/media?fields=media_url
However it only returns one size. Old Instagram API returned various sizes like low_resolution, thumbnail, standard_size. Is it possible to get similar result by using Instagram Grahp API?
After searching for some time to a solution i finally found one.
So, include in the fields query string the permalink field and it should give as following (Sorry, for using Kim Kardashian as an example):
https://www.instagram.com/p/CAYDz52gSLh
then append this at the end media?size=t or simply media like this:
https://www.instagram.com/p/CAYDz52gSLh/media?size=t
media?size=t will give a 150x150 px image
media?size=m will give a 320x320 px image
media?size=l will give a 1080x1080 px image
I can not find a way to get the thumbnails in one step.
But in the next step after receiving the data, the thumbnail of each image and video can be found in this way using oEmbed:
https://graph.facebook.com/v9.0/instagram_oembed?url={permalink}&maxwidth=320&fields=thumbnail_url,author_name,provider_name,provider_url&access_token={accessToken}
permalink: The url received from the previous stage (business_discovery)
Example:
https://graph.facebook.com/v9.0/instagram_oembed?url=https://www.instagram.com/p/CBOuPY1AcMQ/&maxwidth=320&fields=thumbnail_url,author_name,provider_name,provider_url&access_token={accessToken}
More Details

display all logos on a page or map

I'm trying to find a way to display a list of 500+ logos from 500+ url's.
I want to make a global map of all companies with their respective logos that's i have coming from a url http://www.xxxxxx/wp-content/uploads/QOPIUS.png
The results could be like this
Image example from medium
I've tried some BI tools like Tableau or MS Report but none of them is doing the job to make a map and manually this weird.
If any ideas from there, you are welcome.
Thx.
There are several ways to do this. Simple solution:
If you have your URL paths in a file, just read the file line by line and download all logos. I am using bash for my example:
while read line; do curl -O $line; done < urls.txt
Once you have all your logos use imageMagick to concatenate your logos into one big jpg/png/other_file_format:
montage -mode concatenate -tile 4x *.jpg map.jpg
For more information see imageMagick documentation:
http://www.imagemagick.org/Usage/montage/

Is it possible to make a youtube list out of a text file?

So, I have a text in the form
artist01 - piece01
artist02 - piece02
...
Can I make a youtube list out of that, or at least get a text file like
youtube-url1
youtube-url2
...
Given that each search will return more than one results, I could just take the first result of each one and get the respective video URL.
I'm using Linux (Debian if that matters) and was wondering whether youtube-dl have this function. Or must I use the Youtube API?
Also, could that list with the URLs be made as a youtube list too?
Given a file searches, you can run
youtube-dl --get-id --default-search ytsearch --batch-file searches > song-ids
song-ids will contain the YouTube video IDs. You can feed them into youtube-dl at a later stage. If you want full URLs, prefix them with https://youtu.be/.

Wowza: get thumbnail with 1 out put video file

I'm using Wowza for recording a live stream. I want to get a thumbnail of the live stream. I followed this tutorial
http://blog.svnlabs.com/wowza-live-stream-thumbnail-images-with-http-provider/
Then when I record stream, it saved about 4 video file:
streamname.mp4,
streamname_160p.mp4,
streamname_320p.mp4,
streamname_source.mp4
Is there any way to save only 1 video file "streamname.mp4" but could still get the thumbnail by URL as the above tutorial mentions?
Thanks for all your help!
There is no way.
We have to remain at least one of extending file
e.g
streamname.mp4,
streamname_160p.mp4,

Rewrite image url in the RSS feed using Yahoo Pipes

I am trying to display full-sized images in Pinterest RSS feed instead of thumbnails using this Yahoo Pipe:
http://pipes.yahoo.com/pipes/pipe.info?_id=4cc22a300ac57e4a88f908f0548ff79e
In order to display large images I need to rewrite image URL for every item and change last symbol before the extension from "b" to "c" in example:
in original Pinterest RSS: http://pinterest.com/chalkboardnails/feed.rss
change from
http://media-cache-ec6.pinterest.com/upload/90916486199089541_BOwL6p5P_b.jpg
to
http://media-cache-ec6.pinterest.com/upload/90916486199089541_BOwL6p5P_c.jpg
How could I do this.
Thank you
to find b try (?<=http://.*/[A-Za-z\d]*_[A-Za-z\d]*_)(.*?)(?=\.jpg)
Use the REGEX function in Yahoo Pipes :
Lee