Youtube-dl and Shell speed - ffmpeg

So I've been experimenting with youtube-dl on Ubuntu 14 recently and I should say downloading is well fast even I have a 1GB Ubuntu LAMP but when it comes to triggering FFMPEG and deleting process hangs for a good time. Even worked with -k but as soon as FFMPEG process is completed, it takes time to respond. I do understand this is a big subject but I'd really like to hear your thoughts, what amazes me is how a website like thisis running in less than a second? Here is what I have,
[youtube] UxxajLWwzqY: Downloading webpage
[youtube] UxxajLWwzqY: Downloading video info webpage
[youtube] UxxajLWwzqY: Extracting video information
[info] Writing video description metadata as JSON to: /var/www/html/download/Icona Pop - I Love It (feat. Charli XCX) [OFFICIAL VIDEO].info.json
[download] Destination: /var/www/html/download/Icona Pop - I Love It (feat. Charli XCX) [OFFICIAL VIDEO].m4a
[download] 100% of 2.73MiB in 00:00
[ffmpeg] Correcting container in "/var/www/html/download/title.m4a"
[ffmpeg] Destination: /var/www/html/download/title.mp3
Deleting original file /var/www/html/download/title.m4a (pass -k to keep)
youtube-dl "http://www.youtube.com/watch?v=UxxajLWwzqY" --write-info-json --extract-audio --audio-format mp3 -o "/var/www/html/download/%(title)s.%(ext)s"
I really don't understand how this is done so fast? Is there anything I'm missing?
Thanks for your time.

I am having the same issue, i was able to resolve it by running against a playlist instead.

Related

VLC : which file to update VLC Lua youtube script on Mac OS X?

I am trying to read a youtube video through VLC on my mac:
/Applications/VLC.app/Contents/MacOS/VLC -v https://www.youtube.com/watch?v=afzmwAKUppU&app=desktop
Which gives errors :
VLC media player 3.0.
8 Vetinari (revision 3.0.8-0-gf350b6b5a7)
[00007faf5b5e9140] lua generic warning: Error while running script /Applications/VLC.app/Contents/MacOS/share/lua/extensions/youtube.lua, function descriptor() not found
[00007faf5b4589c0] macosx interface warning: Failed to enable media key support, likely app needs to be whitelisted in Security Settings.
[00007faf5b784950] securetransport tls client warning: Ignoring ALPN request due to lack of support in the backend. Proxy behavior potentially undefined.
[00007faf5b770200] lua stream warning: Couldn't extract video URL, falling back to alternate youtube API
[00007faf5b6b5b60] securetransport tls client warning: Ignoring ALPN request due to lack of support in the backend. Proxy behavior potentially undefined.
[00007faf5f97ce70] securetransport tls client warning: Ignoring ALPN request due to lack of support in the backend. Proxy behavior potentially undefined.
2020-10-15 13:45:28.281 VLC[65658:198319] Can't find app with identifier com.spotify.client
[00007faf5b5d8580] lua stream error: Couldn't extract youtube video URL, please check for updates to this script
[00007faf5b44b570] main playlist: playlist is empty
The youtube.lua, I got it by downloading the file from internet :
curl "http://git.videolan.org/?p=vlc.git;a=blob_plain;f=share/lua/playlist/youtube.lua;hb=HEAD" -o /Applications/VLC.app/Contents/MacOS/share/lua/extensions/youtube.lua
Which works on my ubuntu, but not in my Mac: I am wondering if this is not the correct version for Mac OS. And so, which file should be put there ?
If I look on the VLC Lua directory, I find :
/Applications/VLC.app/Contents/MacOS/share/lua/extensions$ ls -l
total 192
-rw-r--r--# 1 romain admin 72K Aug 14 2019 VLSub.luac
-rw-r--r-- 1 root admin 22K Oct 15 13:35 youtube.lua
the youtube.lua is the new script I added, but maybe it was another one to put there ?
Probably a bit late here now, but in any case:
You need to take the youtube.lua from here: https://github.com/videolan/vlc/blob/master/share/lua/playlist/youtube.lua
Then rename it to youtube.luac and place it in the directory (for MacOS) /Applications/VLC.app/Contents/MacOS/share/lua/playlist
I would recommend renaming the old one and keeping it in case something goes awry.
At least on my computer this worked and I can now open YouTube videos in VLC again.
Have you tried the 3.0.11.1 release? https://get.videolan.org/vlc/3.0.11.1/macosx/vlc-3.0.11.1.dmg
You're correct that youtube.lua would be the correct file, though the issue might come from other parts of the code depending on it. FYI, since you are running a stable VLC build, the code you should look at is https://code.videolan.org/videolan/vlc-3.0/-/blob/master/share/lua/playlist/youtube.lua.
https://code.videolan.org/videolan/vlc/-/blob/master/share/lua/playlist/youtube.lua is nightly v4 unstable builds (though for the lua script, they are identical).
Additionally, look out for a new release with an updated script soon https://mailman.videolan.org/pipermail/vlc-devel/2020-October/139076.html

Failing to upload an mp4 to youtube

I'm trying to convert an WMA file into mp4 in order to upload the file to youtube.
VN550672.wma.zip
Although the conversion is successful (see below) i'm not able to upload the file to youtube. I'm getting the following error
The video has failed to process. Please make sure you are uploading a supported file type.
VN550672.mp4.zip
Any suggestions?
System configuration:
Python version: 3.6.3
Pydub version: 0.22.1
ffmpeg or avlib?: ffmpeg
ffmpeg/avlib version: 2.8.4
Could it be as easy as youtube requires that the media file includes a video stream? The wma file only has a audio stream.
You can try to transcode and add a dummy video stream using
ffmpeg -i VN550672.WMA -f lavfi -i color=size=426x240 VN550672.mp4
(426x240 is the youtube suggested minimal resolution)

(MEncoder) How to resolve librtsp: buffer overflow in rtsp_get error?

I'm trying to use MEncoder to dump an RTSP stream I get. When I try to do the same, I get an error saying "librtsp: buffer overflow in rtsp_get".
The full console output is given below.
C:\mplayer-svn-37594>mplayer -dumpstream "rtsp://qa.vibrnet.com:80/mov/video.sav?MAC=00C0021F1116&channel=2&GUID=betauser"
MPlayer Redxii-SVN-r37594-4.9.3 (i686) (C) 2000-2016 MPlayer Team
FFmpeg version: N-77758-g6e24946
Build date: 2016-01-09 00:49:37 EST
Playing rtsp://qa.vibrnet.com:80/mov/video.sav?MAC=00C0021F1116&channel=2&GUID=betauser.
Resolving qa.vibrnet.com for AF_INET...
Connecting to server qa.vibrnet.com[204.x.x.x]: 80...
librtsp: buffer overflow in rtsp_get
When I tried to play the stream, I get this error as well. What could be the reason? Help me resolve this one. Thank you!

Cannot convert mp4 to gif using gifify

I am getting the following error when trying to convert an mp4 video to gif using gifify
Unable to find application named 'Cloud'
Does anyone know how to debug or investigate this type of issue?
Appears that gifify "by default" attempts to upload the gif to "CloudApp" ("Cloud" in earlier versions) https://github.com/jclem/gifify/blob/master/gifify.sh#L88
So run it like gifify -n movie.mp4 instead.
I suggest you add a new issue telling them to log better when there is no CloudApp installed here: https://github.com/jclem/gifify/issues

Gstreamer on OSX

I'm trying to create a very simply Gstreamer pipeline where I have a source element that is my FaceTime camera and a sink element that is a udp sink.
I first install Gstreamer using the instructions here. I ran some of the basic pipelines no problem; however, when I tried to use the following command
./gst-launch-0.10 v4l2src ! xviimagesink
I got the following error:
ERROR: pipeline could not be constructed: no element "v4l2src".
So I did some digging and turns out that the v4l2src plugin is in a gst-plugins-good. I installed these good plugins using macports using the following command:
port install gst-plugins-good
After a very long time everything installed without error. Now gst-launch appears in three places.
/Library/Frameworks/GStreamer.framework/Versions/0.10/bin/gst-launch-0.10
/opt/local/bin/gst-launch
/opt/local/bin/gst-launch-0.10
If I try to run the above mentioned pipline from any of those directories I still get
ERROR: pipeline could not be constructed: no element "v4l2src".
If I type the following command from anywhere I get some more errors but seems like it still is not finding v4lsrc.
gst-launch v4l2src ! xviimagesink
Gives:
Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded!
Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded!
Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded!
Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded!
GConf Error: Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://projects.gnome.org/gconf/ for information. (Details - 1: Failed to get connection to session: Not enough memory)
ERROR: pipeline could not be constructed: no element "v4l2src".
So it seems like I have GStreamer mess and I still can't get my camera to work because GStreamer can't find v4l2src.
Some help would be appreciated! Thanks in advance.
v4l2src means "video-for-linux (ver.2) source".
since you are not running "linux", it is not so surprising that you cannot use "v4l2".
you might try to use the osxvideosrc (afaik this is in gstreamer-plugins-bad).
generally i suggest to check which elements are installed on your machine when you are looking for a a specific functionality, e.g.:
$ gst-inspect | grep -i video |grep -i source
PS: and usually i find it a good idea to throw some colorspace-converter (like ffmpegcolorspace) between a video-source and and -sink.
For me those two works from MacPorts (https://www.macports.org/):
GStreamer 1.0, applemedia: avfvideosrc: Video Source (AVFoundation), use device-index parameter to select a device (index will vary depending on the connection order).
bash-3.2# port install gstreamer1*
iCeDeROM:~ cederom$ gst-inspect-1.0 |grep video | grep src
inter: intervideosrc: Internal video source
decklink: decklinkvideosrc: Decklink Video Source
applemedia: qtkitvideosrc: Video Source (QTKit)
applemedia: avfvideosrc: Video Source (AVFoundation)
ximagesrc: ximagesrc: Ximage video source
videotestsrc: videotestsrc: Video test source
autodetect: autovideosrc: Auto video source
GStreamer 0.10 (autodetect: autovideosrc: Auto video source)
bash-3.2# port install gstreamer0*
iCeDeROM:~ cederom$ gst-inspect-0.10 |grep video | grep src
ximagesrc: ximagesrc: Ximage video source
inter: intervideosrc: FIXME Long name
gsettings: gsettingsvideosrc: GSettings video src
gconfelements: gconfvideosrc: GConf video source
autodetect: autovideosrc: Auto video source
applemedia: qtkitvideosrc: Video Source (QTKit)
applemedia: miovideosrc: Video Source (MIO)
videotestsrc: videotestsrc: Video test source
I use autovideosink or osxvideosink for testing (second works faster, first use Xorg). Use gst-inspect <module> for module information.

Resources