-
-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Idea: convert our episode audio files into mp4, then upload to YouTube automatically #244
Comments
Although Google Podcasts has been merged into Youtube Music, Youtube is still a very important channel. And we look forward to someone someone with experience in service development to implement this feature. |
What is the workflow? Where can I get the mp3 files and YouTube video title information? It seems that I only need to write some short scripts to achieve it. |
I guess the workflow is like this. When the RSS is updated, get the mp3 file and transcode it (executed through GitHub action), and then upload the mp4 file through YouTube's API. The mp3 files can be obtained from our RSS, and the video information is in shownotes. |
Maybe the concern comes from running CPU-intensive tasks (i.e. FFmpeg converting job) with GH Action? @yihong0618 had a lot of hacking GH action experiences to alert such concern, maybe please you could share more context? |
@LinuxSuRen @wey-gu do some search, for this job I think its OK. |
I will try to implement this issue. Here's a question. The "Check if the episode exists in YouTube" step may cause problems due to anti-crawlers. Can we save a log file locally to record the uploaded videos? |
That will do! Another mitigation to avoid being treated as malicious probe would be checking via rss interface/ proxied rss: https://www.youtube.com/feeds/videos.xml?channel_id=THE_CHANNEL_ID_HERE While, I agree with you that in current slo, maintain local state may be much better in many perspectives. |
aha, what is the channel ID of osf2f? It seems that only the author can see this ID himself. |
Here is the channel. https://www.youtube.com/channel/UCV7Ibg1k_aMSEcDFgJvuvdg But please make sure that everything is ok before using it. And thanks for your effort. |
我尝试去解决这个问题,但是遇到了2个问题 https://github.com/hellojukay/episode/actions
|
It seems it was in status "Testing" causing the refresh token expiring in 7 days, for production refresh token, it's longer, someone said it's like 1 year?
As I mentioned above, we may leverage the RSS of the channel to probe content without auth? |
This is not a big problem. We can wait. Acrrroding to @wey-gu comment, one year's token seem be acceptable. By the way, the RSS address of YouTube seems not available. See also https://www.youtube.com/feeds/videos.xml?channel_id=UCV7Ibg1k_aMSEcDFgJvuvdg |
“https://www.youtube.com/feeds/videos.xml?channel_id=UCV7Ibg1k_aMSEcDFgJvuvdg” should be the one, maybe just accessing via browser is not allowed, I checked via feedly it's fine.
|
update: it seems rss for youtube is full of problems, we could think of it doesnt support rss at all :( |
I cannot get the correct RSS content even via the following command: curl https://www.youtube.com/feeds/videos.xml?channel_id=UCV7Ibg1k_aMSEcDFgJvuvdg \
-H "Content-Type: application/rss+xml" -H 'Accept: application/rss+xml' |
Yeah, i have done the equivalent via python and encountered 404, too. |
YouTube already have the Postcast support. It would be great to convert our episode audio files into mp4, then upload to YouTube automatically. For example, we could find or create a CLI to do it. Then create a GitHub workflow to trigger it.
I found some potential tools could help us:
The steps might be:
See also the following example command:
ffmpeg -loop 1 -i logo.png -i osf2f-s01e21-richard.mp3 -vf "scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:-1:-1:color=black,setsar=1,format=yuv420p" -shortest -fflags +shortest osf2f-s01e21-richard.mp4
The text was updated successfully, but these errors were encountered: