问题
I'm using the YouTube API (version 2) to create Live Events from my application. The events are successfully created, but users have complained that the availability of the Ingestation Settings are different for events created through the API compared to events created through the YouTube site directly.
I've linked to two images to illustrate the differences:
The first is how the settings look for an event created through the API. The second is how the settings look for an event created through the YouTube site.
Note the differences in the encoder settings. Is there anything I can do to the API call to get the settings to match how they look in the second picture? Or is this how all events always appear when created through the API?
Here is an example of the call to the API (authorization bits edited):
Authorization: Bearer ************
Accept: application/atom+xml
Content-Type: application/atom+xml
GData-Version: 2
X-GData-Key: key=*********
<entry xmlns:yt="http://gdata.youtube.com/schemas/2007" xmlns:media="http://search.yahoo.com/mrss/" xmlns="http://www.w3.org/2005/Atom">
<title>Test</title>
<summary>Test</summary>
<yt:when start="2013-08-14T17:00:00Z" />
<content type="application/atom+xml">
<entry>
<media:group>
<media:category label="Sports" scheme="http://gdata.youtube.com/schemas/2007/categories.cat" />
</media:group>
</entry>
</content>
</entry>
回答1:
Since you used the GDATA (old, v2) API the events are created in old v2 platform.
In web, it looks like you opted in v3 (new) platform so events are created in new platform.
I suggest you to use new Live Streaming API.
Or you can opt-out in web too to use old version.
Here's a detailed blog post describing API and my Google I/O talk about this topic.
来源:https://stackoverflow.com/questions/18235664/difference-in-ingestation-settings-creating-a-live-event-using-youtube-api-vs-we