I wish to add this effects in MoviePy:
clip = clip.fx( vfx.colorx, 2.5) clips.append(clip)
to a local already-edited video instead of pulling the video from the internet.
Applying the effects will make the video unique to get around YouTube’s Content ID.
Here is where I learnt about this method: https://youtu.be/AGD-alltz6g
I removed the YouTube links from the code the YouTube guy wrote and added the local file path (“C:\Users\My PC\Videos\Video Name”) of my preferred video, but nothing worked.
Could you help me, please?
Related
Hello guys !
I'm working on a personal project, and I have a little problem which is the following one:
I'm using the moviepy module to build videos, with sound; When I execute my program,
I have the result that I expected, I mean the video I wanted to have, and I can read it well
from my PC as a mp4 video using VLC.
But,
When I try to export this video to my iPhone (I tried to use Google Drive, Dropbox, emails, etc),
the sound disappear.
What makes me think the mistake comes from my code ?
When I'm on my phone, I can read the video very well straightly from Google Drive (or something else), but when I trying to save it on my gallery (pictures/videos), the sound disappears at this moment. Even when I post my video directly from Dropbox to Instagram, it says that "this video has no sound".
Obviously, I've tried different .mp4 videos (not created with moviepy), and it works very well.
I'm so exhausted of spending hours trying to figured out where the problem could come from, that's why I'm asking for your help.
Here is the function that build my videos with the sound, and where I'm 100% sure the the problem is from :
def build_sentence_video(self):
logo = mpy.ImageClip(self.logo_path).set_position('center', 0).resize(width=100, height=100).set_position((10,5))
clip = mpy.VideoClip(self.make_simple_frame, duration=10)
video = mpy.CompositeVideoClip([clip, logo], size=VIDEO_SIZE).on_color(color=WHITE, col_opacity=1).set_duration(4)
video_with_new_audio = video.set_audio(AudioFileClip(self.audio, buffersize=200000, fps=44100))
video_with_new_audio.write_videofile(self.fr_word+".mp4",
fps=2,
)
Sorry in advance if my english is awful.
Thank you for your help !
I'm using an api for instagram called instaloader. I'm trying to download 25 pictures from each profile in an array. I tried using get_posts
for post in profile.get_posts():
#download posts
L.download_post(post, target=data_path/p_name)
but this downloads the picture along with all the comments and metadata. I only want to download the pictures because the instagram accounts I'm scraping have too many comments (getting comments isn't the point anyway).
I saw something called download_pic but I have no idea how to use it. I tried using it in my code below and got an error that said "url is not defined".
profile_names = ["kyliejenner", "justinbieber", "instagram"]
for p_name in profile_names:
profile = Profile.from_username(L.context, p_name)
L.download_pic(data_path/p_name, url, mtime, filename_suffix=None, _attempt=1)
Could someone explain to me how to use download_pic (if that's what I'm supposed to be using to only download photo's/videos) and maybe send me to a reliable tutorial?
I was looking for exacly the same thing for some time and I finally found solution:
L.download_pic(FILENAME, POST.url, POST.date_utc)
POST object you can get using e.g. Post.from_shortcode()
POST.url will give you the link for first image in post
POST.date_utc will just grab the date and time from the post (without mtime entered you are not able to download it)
This will download just the picture into folder you want to.
After a long research, I can't find a way to get the mpd url for a YouTube video. My question is, is it even possible to get it?
In theory, YouTube has to have a manifest file, so that it could play out the segment files. My research has led to some old posts where people have allegedly found a way to do it. A python script that is supposed to extract the mpd file. After analyzing, what exactly it is done, I have found that line 68, he is looking for a dashmpd, which is not contained in the code. I thought maybe the name of the parameter is changed, and tried to look for some URL, but without success.
mpdurl = html[html.find("dashmpd"):]
Topic where MPD file is used., another similar topic.
So again, my question is is it even possible to extract the mpd url/file from a YouTube video? Or is it encrypted and not possible any more? Does it make a difference if the video is in webm or mp4 format?
I am trying to see if it is possible to make a thumbnail pic from an online video (videos run in flash) programmatically. Just to elaborate on what I am exactly looking to do:
I have a link to to a video that plays in a browser using adobe flash. I would like to take a screenshot of the video (at any frame would do for now) using any programming language (prefer python). Also I have noticed that when one uploads a video on youtube, it automatically generates a thumbnail. Any pointers as to if this is a viable option and how to go about it?
Thanks
I'm writing a CLI for a music-media-platform. One of the features is going to be that you can directly play YouTube videos from the CLI. I don't really have an idea of how to do it, but this one sounded the most reasonable:
I'm going to use of those sites where you can download music from YouTube, for example, http://keepvid.com/ and then I directly stream and play this, but I have one problem. Is there any Python library capable of doing this and if so, do you have any concrete examples?
I've been looking, but I found nothing, even not with GStreamer.
You need two things to be able to download a YouTube video, the video id, which is represented by the v= section of the URL, and a hidden field t= which is present in the page source. I have no idea what this t value is, but it's what you need :)
You can then download the video using a URL in the format;
http://www.youtube.com/get_video?video_id=*******&t=*******
Where the stars represent the values obtained.
I'm guessing you can ask for the video id from user input, as it's straightforward to obtain. Your program would then download the HTML source for that video, parse the source for the t value, then download the video using the newly constructed URL.
For example, if you open this link in your browser, it should download the video, or you can use a downloading program such as Wget;
http://www.youtube.com/get_video?video_id=3HrSN7176XI&t=vjVQa1PpcFNM4c8MbEhsnGaNvYKoYERIJ-hK7ErLpUI=
It appears that KeepVid is simply a JavaScript bookmarklet that links you to a KeepVid download page where you can then download the YouTube video in any one of a variety of formats. So, unless you want to figure out how to stream the file that it links you to, it's not easily doable. You'd have to scrape the page returned and figure out which URL you wanted to download, and then you'd have to stream from that URL (and some of the formats may or may not be streamable anyway).
And as an aside, even though they don't have a terms of service specified, I'd imagine that since they appear to be mostly advertisement-supported that abusing their functionality by going around their advertisement-supported webpage would be ethically questionable.