YouTube Data API v3: List all videos for a channel published in the last 24 hours, ignoring "placeholders" - youtube-data-api

I've had some code in production for 6 months or so that runs every 24 hours and pulls all videos from certain YouTube channels that were published in the last 24 hours (i.e. since it last checked). It's been working well.
However, a couple of the YouTube channels this code monitors publish some kind of "placeholder" or "teaser" a day or two ahead of publishing the actual video, which means that my code "sees" the video twice:
when the placeholder is published;
when the actual video is published.
I'm not interested in #1, since there's no video actually available yet, just a teaser that it's "coming soon". I'm only interested in knowing about the video once it's actually been published. Is there a way to filter out these placeholders from my search, so that my code only "sees" the video when it is actually published? A search parameter would be ideal, but if this can only be done by filtering of the result in my own code (e.g. by returned metadata), that would work too.
For reference, here's the URL my code hits:
https://youtube.googleapis.com/youtube/v3/search?part=snippet&channelId=[CHANNEL_ID]&order=date&publishedAfter=[NOW_MINUS_24_HOURS]&key=[MY_API_KEY]
Here's an example of a video where this happened, albeit I don't think there's any way to know that a placeholder had been published a day or two prior to the video going up.

Since you can't change a video to make it longer (only shorter) once it's been uploaded, and uploading a new video results in a new URL, I assume they're using the "Premiere" option when uploading.
Video search results for YouTube's Premiere option will have the following property returned in the json before actually airing:
"liveBroadcastContent": "upcoming",
This will change to the following after being aired:
"liveBroadcastContent": "none",
I don't actually see a way to apply the filter as a query parameter. There's &eventType=none&type=video, as listed on the search API page, but that only works for LIVE/broadcast events. This is a bit of an inconsistency/incompleteness in the API, IMHO.

Related

What is the proper way to get new comments on my youtube channels in youtube-data-api

Currently I am fetching all comments on loop over videos. Is there any other way to get latest comments better. I means looping thousands of videos and getting just 10 new comments is time and resource consuming. Is there any good solution.
Unfortunately, it is not currently possible to get multiple Video's comments in one API call. See the documentation here.
You would have to iterate through each video and get the comments for each one which would be very costly on quota but necessary.

Youtube data api quota increase

Hi i am writing android app that lets users take videos and upload them to youtube, as of now i am not anticipating any where close to reaching quota since Im still developing the app. But I am worried since the limit is 1,000,000 units per day, I will eventually cross it.
So how do we increase it, I noticed under the quota tab there is an option, clicking it brings up a form. But it doesn't mention how much will it cost me to increase the limit? Also I couldn't find any google support page so I am asking it here
thanks
With the current quota, you can upload near 660 videos a day. If you get close to that number you can fill that form which is a long form and you need two cups of coffee and perhaps more than 2 hours to do it. In around 48 hours, they will send the result and will approve it, if your app behaves compatible with "terms of service". And it's free.
Cheers.
Edit
It is not documented anywhere, but very recently (almost since the day I answered this question), YouTube has changed the data-api, that each day it accepts 50 videos, and afterward it accepts only one video per 15 minutes. And because it is just applied without being documented nor explained by YouTube, we cannot anticipate what the limitation is going to be.

PushSource filter pushing sample too for render

I'm bit new to directshow. I'm using PushSource filter sample provided with DirectShow to push sequence of bmp image to avi file. But before that I'm trying to see whether filter is able to render the samples. The render is able to display just the first frame, though the filter is running properly and filling the buffers. I put printf at various stages to see the flow.
I feel that PushSource is running too fast and render is getting hanged.
Please provide some suggesting how to synchronize the two.
Also let me know if I'm missing something.
You are likely to miss time stamps, you are omitting them or possibly leaving garbage where they are supposed to be correct. You will want the pushing filter to stamp samples correctly, so that multiplexers and renderers have no doubts as for sample presentation times.

Censor Plugin or Extension for VLC Media Player

I'm having an idea to create a Censor Plugin/Extension for VLC Player..
Problem Scenario :
An Adult-Scene for 1 minute in a nice movie makes it not watchable with Family.
My Solution :
Create a Plugin/Extension which does the following
Reads time positions from a file similar to subtitle files
Skip these time positions (which are adult or inappropriate) when playing
Help i needed :
I searched in Google and in videolan website, But can't find an exact solution
Are there already similar Plugins available?
Where should i start?
Please help me if you could guys.. thanks..
Same looking for having/developing Exact same solution. This might be helpful to you.
http://code.google.com/p/movie-content-editor/
A similar thing is also available on github:
https://github.com/rdp/sensible-cinema
You may also want to read this discussion thread:
https://forum.videolan.org/viewtopic.php?t=89466
finding great similar answer here
If you chop random bytes out the movie is likely not playable. The player might crash or fail to resynchronize the stream – the video might just stop. Plus, you're gonna have a hard time figuring out where the "adult" bytes are, so to speak.
If you already know where the parts are that you want to cut out, I would edit the file in any of the numerous video editors. Even Windows Movie Maker or iMovie would do the job, and those are easily available on both major OSes.
This is a requested feature for VLC. Not really anything user-friendly out there. Still, VLC offers the possibility to create playlists in a certain format that would mute or skip parts of a file. This is called XSPF. You might be able to figure out the proper format for this.
Also, there's movie-content-editor:
A VLC based editor built in python that allows users to create and use custom filter files to make movies more family friendly. Allows users to have the player automatically mute specific words or skip certain scenes based on the content of those scenes.
And sensible-cinema:
Clean Editing Movie Player allows you watch edited movies by applying delete lists (EDL's) (i.e. "mute out" or "cut out" scenes) to DVD's/files, with preliminary support for also applying them to arbitrary web/internet based players like netflix instant, hulu/hulu plus etc
See also these threads on The VideoLAN Forums:
auto skip unwanted parts of a video
Clearplay-like (content filter) module exists?

Flex 4 > spark.components.VideoPlayer > How to switch bit rate?

The VideoPlayer (possibly VideoDisplay also) component is capable of somehow automatically picking the best quality video on the list it's given. An example is here:
http://help.adobe.com/en_US/FlashPlatform/beta/reference/actionscript/3/spark/components/mediaClasses/DynamicStreamingVideoItem.html#includeExamplesSummary
I cannot find the answers to below questions.
Assuming that the server that streams recorded videos is capable of switching across same videos with different bit rates and streaming them from any point within their timelines:
Is the bandwidth test/calculation within this component only done before the video starts playing, at which point it picks the best video source and never uses the other ones? Or, does it continuously or periodically execute its bandwidth tests and does it accordingly switch between video sources during the playback?
Does it support setting the video source through code and can its automatic switching between video sources be turned off (in case I want to provide this functionality to the user in the form of some button/dropdown or similar)? I know that the preferred video source can be set, but this only means that that video source will be tested/attempted first.
What other media servers can be used with this component, besides the one provided by Adobe, to achieve automated and manual switching between different quality of same video?
Obviously, I'd like to create a player that is smart enough to automatically switch between different quality of videos, and that will support manual instructions related to which source to play - both without interrupting the playback, or at least without restarting it (minor interruptions acceptable). Also, the playback needs to be able to start at any given point within the video, after enough data has been buffered (of course), but most importantly, I want to be able to start the playback beyond what's buffered. A note or two about fast-forwarding is not going to hurt, if anyone knows anything.
Thank you for your time.

Resources