Quartz composer HLS video trouble - macos

I have a Quartz Composer Version 4.5 (141.5) on my MacOS 10.7.2 and a QuickTime Framework version 7.6.6.
All I want is just render test HLS video stream using QC. HLS stream is just an apple test stream: http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8
So, I've created a sketch:
(It's a MovieImporter patch covered by stream url)
Next all I can see in QC Viewer is just a blank screen and infinite debug log:
17:08:42.233 ["Movie Importer" # "Macro Patch"] > Execution failed at time 2802.003
17:08:42.313 ["Movie Importer" # "Macro Patch"] > Failed retrieving image from movie <QTMovie: 0x7fd992e02d00 time scale = 600, duration = 2184000, rate = 0.000000, tracks = { 0x7fd992f1a0e0 0x7fd992e205c0 0x7fd992e12310 0x7fd9928b11b0 0x7fd9928a7990 }> (error (null))
Also I've tried to launch same sketch on MacOS 10.6.8, QC 4.0(103.1), but unsuccessfully.
What the problem? Where I'm wrong?

It may be related to your Quartz Composer version adn Mac OS X Lion.
Try downloading the new version, as said here : http://kineme.net/forum/General/QCFramework148MovieImporterpatch

Related

Gstreamer cannot find internal camera on a Mac

I have installed Gstreamer via homebrew on my mac. I want to stream the mac's internal camera's footage, however when I run
gst-device-monitor-1.0 I keep getting Probing devices... Failed to start device monitor!
I also tried running the same command with GST_DEBUG=2 and then I get
WARN devicemonitor gstdevicemonitor.c:501:gst_device_monitor_start:<devicemonitor0> No filters have been set, will expose all devices found
0:00:00.002759000 24294 0x7ffc5151c190 WARN devicemonitor gstdevicemonitor.c:507:gst_device_monitor_start:<devicemonitor0> No providers match the current filters
The version I'm running is
gst-device-monitor-1.0 version 1.20.0
GStreamer 1.20.0
How do I get this to work? I have checked the mac settings and I don't see anything that'd block this. How do I make gstreamer see my mac's internal camera?
export GST_PLUGIN_PATH=/opt/homebrew/lib/gstreamer-1.0/
Setting this works for me.
I have the same problem on my Mac (M1, macOS Monterey). It is issue of gst-device-monitor-1.0. According to its source code it cannot find any corresponding device providers:
if (monitor->priv->filters->len == 0) {
GST_WARNING_OBJECT (monitor, "No filters have been set, will expose all "
"devices found");
gst_device_monitor_add_filter_unlocked (monitor, NULL, NULL);
}
if (monitor->priv->providers->len == 0) {
GST_OBJECT_UNLOCK (monitor);
GST_WARNING_OBJECT (monitor, "No providers match the current filters");
return FALSE;
}
The problem appeared a year ago and has not yet been resolved:
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/780
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/667
Still gstreamer itself can access video (including mac's internal camera) and audio sources on macOS just fine.
Video:
gst-launch-1.0 avfvideosrc device-index=0 ! video/x-raw, framerate=30/1, width=1280, height=720 ! queue ! autovideosink
Audio:
gst-launch-1.0 -v osxaudiosrc device=0 ! audio/x-raw ! queue ! autoaudiosink
Note: avfvideosrc is part of gst-plugins-bad, osxaudiosrc - part of gst-plugins-good

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

Chromecast HLS: Unable to derive timescale

I'm trying to get fmp4 HLS playing back on a new Chromecast (3rd gen I believe, not Ultra).
I've tried encoding the content with ffmpeg using both x264 and h264 libraries.
The main profile initially gives me a codec not supported error, remove the codec list from the hls manifest fixes this issue.
Switching to baseline (which is not ideal) doesn't give the codec error.
Both then (after removing the codec definitions or using baseline) give the following error:
Uncaught Error: Unable to derive timescale
at Xl (www.gstatic.com/cast/sdk/libs/mediaplayer/1.0.0/media_player.js:344)
at Y.$e (www.gstatic.com/cast/sdk/libs/mediaplayer/1.0.0/media_player.js:337)
at Y.k.processSegment (www.gstatic.com/cast/sdk/libs/mediaplayer/1.0.0/media_player.js:340)
at Am.k.processSegment (www.gstatic.com/cast/sdk/libs/mediaplayer/1.0.0/media_player.js:384)
at Mj.$e (www.gstatic.com/cast/sdk/libs/mediaplayer/1.0.0/media_player.js:238)
at Wj (www.gstatic.com/cast/sdk/libs/mediaplayer/1.0.0/media_player.js:236)
at Oj (www.gstatic.com/cast/sdk/libs/mediaplayer/1.0.0/media_player.js:240)
at Mj.fd (www.gstatic.com/cast/sdk/libs/mediaplayer/1.0.0/media_player.js:239)
at Nc (www.gstatic.com/cast/sdk/libs/mediaplayer/1.0.0/media_player.js:39)
at wi.Mc.dispatchEvent (www.gstatic.com/cast/sdk/libs/mediaplayer/1.0.0/media_player.js:38)
Make sure you're not setting:
loadRequestData.media.hlsSegmentFormat
For TS I had to set:
loadRequestData.media.hlsSegmentFormat = cast.framework.messages.HlsSegmentFormat.TS;
But for fmp4 I commented this out.

Rtsp h264 missing plugin

I'm trying to receive a live H264 stream from a wireless camera using RTSP. The camera IP is 192.168.150.1 and it doesn't require authentication.
Since I'm developing under windows, I installed Gstreamer 1.0 - 1.8.3, a complete installation, with all the plugin and everything selected during the installation process.
When I try the pipeline
gst-launch-1.0 rtspsrc location="rtsp://192.168.150.1" latency=100 ! rtph264depay ! avdec_h264 ! autovideosink
I receive this output:
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://192.168.150.1
Progress: (open) Retrieving server options
Progress: (open) Retrieving media info
ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0: No supported stream was found. You might need to allow more transport protocols or may otherwise be missing the right GStreamer RTSP extension plugin.
Additional debug info:
gstrtspsrc.c(6421): gst_rtspsrc_setup_streams (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0
ERROR: pipeline doesn't want to preroll.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
I also tried the following command:
gst-play-1.0 rtsp://192.168.150.1
getting this output:
Interactive keyboard handling in terminal not available.
Now playing rtsp://192.168.150.1
Pipeline is live.
ERROR Your GStreamer installation is missing a plug-in. for rtsp://192.168.150.1
ERROR debug information: gsturidecodebin.c(1006): no_more_pads_full (): /GstPlayBin:playbin/GstURIDecodeBin:uridecodebin0:
no suitable plugins found:
gstrtspsrc.c(6421): gst_rtspsrc_setup_streams (): /GstPlayBin:playbin/GstURIDecodeBin:uridecodebin0/GstRTSPSrc:source
Reached end of play list.
When I try the same URL (rtsp://192.168.150.1) in VLC I can see the stream. So my guess is that I'm missing "the right GStreamer RTSP extension plugin"
The output of inspect-1.0 | grep 264 is:
File STDIN:
x264: x264enc: x264enc
videoparsersbad: h264parse: H.264 parser
typefindfunctions: video/x-h264: h264, x264, 264
rtp: rtph264depay: RTP H264 depayloader
rtp: rtph264pay: RTP H264 payloader
openh264: openh264dec: OpenH264 video decoder
openh264: openh264enc: OpenH264 video encoder
libav: avdec_h264: libav H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 decoder
libav: avmux_ipod: libav iPod H.264 MP4 (MPEG-4 Part 14) muxer
I also tried using FFmpeg and I can see the video, but I prefer using Gstreamer because I'm going to use the same configuration (camera, pipeline, gstreamer library...) on an Android device, and in my opinion Gstreamer seems to be the best choice.
From FFmpeg I got this info about the stream
Stream #0:0: Video: h264 (Constrained Baseline), yuv420p, 640x352, 29.92 tbr, 90k tbn, 180k tbc
Does anyone have some advices to sort this thing out?
Wich plugin am I missing? And how can I to add in my installation?
Edit:
The output of gst-launch-1.0.exe -v playbin uri=rtsp://192.168.150.1
Setting pipeline to PAUSED ...
/GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0: ring-buffer-max-size = 0
/GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0: buffer-size = -1
/GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0: buffer-duration = -1
/GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0: use-buffering = false
/GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0: download = false
/GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0: uri = rtsp://192.168.150.1
/GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0: connection-speed = 0
/GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0: source = "\(GstRTSPSrc\)\ source"
Pipeline is live and does not need PREROLL ...
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://192.168.150.1
Progress: (open) Retrieving server options
Progress: (open) Retrieving media info
ERROR: from element /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0: Your GStreamer installation is missing a plug-in.
Additional debug info:
gsturidecodebin.c(1006): no_more_pads_full (): /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0:
no suitable plugins found:
gstrtspsrc.c(6421): gst_rtspsrc_setup_streams (): /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0/GstRTSPSrc:source
ERROR: pipeline doesn't want to preroll.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
I had exactly same problem with GStreamer/1.8.3.
And the reason was that my camera did not provide the "Control URL" attribute in it's session descriptions, while GStreamer is not smart enough to fall back to the base URL in this case (like other players do).
So, I ran the following command to get detailed logs from GStreamer:
gst-play-1.0 rtsp://camera_ip:port/ --gst-debug-level=9 --gst-debug-no-color &> GSTREAMER_LOGS.txt
In the logs I found this line:
DEBUG rtspsrc gstrtspsrc.c:6109:gst_rtspsrc_setup_streams:<source> skipping stream 0x7f01b402c140, no setup
Then looking into the current gstrtspsrc.c code from Kurento's gst-plugins-good bundle, I found that "skipping stream ..., no setup" error only happens when stream->conninfo.location == NULL. And that, as I said, happened because my camera didn't provide the "Control URL" attribute in SDP. Adding the following line to my camera SDP session descriptions solved the issue for me:
a=control:*
But, generally, this probably needs to be fixed in GStreamer code.
I believe this is a limitation of GStreamer that isn't shared by VLC and ffmpeg. I have a similar situation here, where I have three different RTSP cameras, two that work fine with GStreamer and one that doesn't. All three work fine with VLC and ffmpeg.
I used Wireshark to look at the raw RTSP protocol and found that the two cameras that work with GStreamer include an sprop-parameter-sets parameter field, while the one that doesn't work doesn't have this field.
The information encoded in sprop-parameter-sets (the SPS and PPS data) is usually present in the RTP stream that comes from the camera. Apparently VLC and ffmpeg are smart enough to pick this up, but GStreamer is not.
I tried to manually insert the sprop-parameter-sets data by using the caps command line parameter, but was unsuccessful.

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