create YouTube video slideshow from image and audio inputs - grails

I'd like to upload an audio file to my website, programmatically create an video slideshow using an image already on the server, and then upload that video to YouTube using its API. The website is built on Grails, so a Java solution would be great; Linux command line could also work.
Uploading videos using the YouTube API is working well. I also have no trouble getting avconv or ffmpeg to create videos that will play in, for example, Windows Media Player. This works to make a playable movie:
avconv -i image.jpg -i audio.mp3 video.mpg
However, manually uploading that video to YouTube results in a format error. I can create other files that YouTube will process successfully, but the audio plays back with regular stutters. (A second or so of clear audio, then a brief gap, then some clear audio, ...) For example:
avconv -i image.jpg -i audio.mp3 video.mkv
I have experimented with a variety of output formats and codecs, but all fall into one of those categories: apparent encoding success but YouTube processing failure, or processing success but unacceptable audio playback.
I wonder if anyone can point me in the right direction. I'm open to any solution that will let me solve the basic problem of uploading audio to YouTube via my Grails website without forcing my users to create the video slideshow themselves.
Thanks in advance for any clues.

It is quite easy to create a YouTube slideshow video on iPad. This guide shows the steps.
Adding music, applying transitions, editing photos can all be done there.

I built a pretty similar web service, based on ffmpeg: it's called tovid.io — uploads user-provided mp3 to YouTube as a video, using uploaded image file for a visual track. User uploads mp3 file, an image, then we render a video in the backend, and publish it on YouTube under the user's account.
It is very easy to render an h264 mp4 video following YouTube specs using Linux command line ffmpeg. Let me know if you're interested in our particular command line.

Related

Processing abandoned The video could not be processed

I followed this link with the second answer (two steps) to implement the video upload to Youtube: Upload video on Youtube using curl and api v3
The code works fine, but when I executed, I got response saying:
status:
embeddable: true
license: "youtube"
privacyStatus: "unlisted"
publicStatsViewable: true
uploadStatus: "uploaded"
That means it is working, but when I went to my youtube account to check the video on videos list, it said:
Processing abandoned
The video could not be processed
The video is not playable with a red triangle, so are there any more info about why? and how to fix it? the video is about 30 seconds long, and when I manually upload from my youtube account UI, it works.
also my scope is configured with:
scopes: ['https://www.googleapis.com/auth/youtubepartner-channel-audit',
'https://www.googleapis.com/auth/youtube.upload']
Export your video again and save it in a different format supported by Youtube. at first, youtube kept abandoning the processing of my mp4 video but when I saved it as MOV, I was able to upload it with ease. Hope it helps because uploading with video classic didn't fix my issue.
This video will explain to you all the possible reasons for your video rejection by youtube.
watch till the end so you can understand what is wrong with your video.
https://youtu.be/-iVtTHhfYtA
This is a new video with new reasons behind youtube rejection
I had the same problem with Electron. Solved by moving the API call from rendering process to main process. Apparently the video didn't upload at all using the node.js API in browser context.

Re-stream a live video from iphone to a server

I am getting a video feed in my app from a drone. The drone's SDK is giving me the video as Data or NSData into my app. I want to stream the same or divert the same to a server (for example a Wowza server). These two things should process simultanously.
You can use ffmpeg library for restreaming it.
There is a sample ffmpeg swift or objective c
I've been trying to send the video to a streaming service like YouTube for a year. The video coming into the iPad from the controller (connected to a Phantom 3 Advanced) is in H.263 format. ffmpeg is best at bulk transcoding, not a stream environment. Tried https://github.com/LaiFengiOS/LFLiveKit but it has bugs. It's a wrapper on ffmpeg that knows how to do RTMP.
The DJI go app knows how to do this, I've asked in the forum for help or code sample but they won't help. Bottom line is I can find no way to stream the video from the drone to a streaming service like YouTube or Wowza. I wish Wowza could accept H.263 native, but they site list only H.264.
So I can't give you an answer, but I can give you what I've figured out over the last year.

How to download a m3u8 video file chunk by chunk?

I'm not sure whether this question is eligible to ask in this forum. I just want to know how the video streaming applications like,
Hotstar
Youtube
Spuul
and all developed a downloading manager which handle a video downloading process smoothy. How can we develop the same in my application? What are all the things i need to check for developing this? How should i develop it properly?
Any suggestions?
There now exists a Chrome extension which unites segments from m3u8 list and combines them in a video which then is saved to your computer.
Here's the link HLS Video Saver.
Your best shot is HLS. Segment your video file on server side with lets say
apple segmenter. Then create m3u8 playlist with these files. Next open the playlist file with the media player of your choice.

How to play video and audio extracted from mkv file in metro app

I have managed to read matroska container and able to extract video and audio streams from a mkv file in my metro app. Now, I don't know how to feed the streams for playing. I want to know the concept of throwing media data on display. I have another option to repack the video and audio(s) with subtitles into MP4 container which will be played by MediaElement by default but that will not look like having a matroska codec in my metro app.
So, basically my question is: How to use MediaElement or any display graph to read the video and audio pulled out from any video container.
Please guide me. Thanks.

Blackberry, QRs, and video

I've been asked to create a QR image that, on being scanned by a smartphone, will play a short 2-minute video. The video is currently in .mp4 format, but the format can change. The video playback works fine on iPhone however I'm having some problems with the BlackBerry Bold.
When the user scans the QR code the phone directs them to a URL. Right now the URL they are directed to is http://domain.com/video.mp4. However when the user attempts to access this page they get a 413 Error "Entity too large". Basically, too much is being pushed to the client.
Reading the BlackBerryForums.com.au thread titled "Request Entity Too Large", I see you need to increase the allowed request size. But the user is able to play YouTube videos perfectly fine on their blackberry! WHY? is the youtube video size smaller? What format is YouTube using? Why does YouTube work, when my method doesn't?
I know the obvious solution here is to use YouTube as a hoster and embed the video but I am told I cannot use this quick and easy solution.
The problem is that YouTube streams the video. What you're trying to do is get the user to download the whole video file.
You may need to get a streaming server so that the video can be played.
Alternatively, reduce the filesize of the file by reducing the video resolution and bitrate, make sure the sound is mono and low bitrate as well.

Resources