Play streaming video on libVLC iOS

This forum is about all development around libVLC.
Isleo
New Cone
New Cone
Posts: 6
Joined: 23 Aug 2016 11:38

Play streaming video on libVLC iOS

Postby Isleo » 23 Aug 2016 12:25

Hi forum,

I am working on an iOS application that play a streaming video from a Mobotix camera. They use MxPEG format. I tried MobileVLCKit 2.2.2 and the unstable version 3.0.0a10 with Cocoapods. However, with version 2.2.2. I can hear audio and with 3.0.0 just see a frame. This is the code, in summary:

Code: Select all

_mediaplayer = [[VLCMediaPlayer alloc] init]; _mediaplayer.delegate = self; _mediaplayer.drawable = self.movieView; NSArray *options = @[@"-vvv",@"--avformat-format=mxg"]; _mediaplayer = [_mediaplayer initWithOptions:options]; _mediaplayer.media = [VLCMedia mediaWithURL:[NSURL URLWithString:@"http://192.168.1.23/control/faststream.jpg?source=MxPEG"]];
Furthermore, I tried a single video downloading it from a server and it works. I do not know if it a problem of the format or the streaming.

I would appreciate it if you could suggest me other way to do it or the solution itself.

Thanks you in advance,

Isleo.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Play streaming video on libVLC iOS

Postby Jean-Baptiste Kempf » 24 Aug 2016 16:58

What are the logs?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

Isleo
New Cone
New Cone
Posts: 6
Joined: 23 Aug 2016 11:38

Re: Play streaming video on libVLC iOS

Postby Isleo » 25 Aug 2016 13:04

Here:

Code: Select all

2016-08-25 11:58:38.297 MobileVLCKit2.2.2[819:8891] Unknown class ViewController in Interface Builder file. 2016-08-25 11:58:38.320 MobileVLCKit2.2.2[819:8891] creating player instance using shared library [0e214074] core generic error: option marq-color does not exist [0e214074] core generic error: option marq-opacity does not exist [0e214074] core generic error: option marq-position does not exist [0e214074] core generic error: option marq-refresh does not exist [0e214074] core generic error: option marq-size does not exist [0e214074] core generic error: option marq-timeout does not exist [0e214074] core generic error: option marq-x does not exist [0e214074] core generic error: option marq-y does not exist 2016-08-25 11:58:38.358 MobileVLCKit2.2.2[819:8891] creating player instance with private library as options were given [0e215164] core libvlc debug: VLC media player - 2.2.2 Weatherwax [0e215164] core libvlc debug: Copyright © 1996-2016 the VideoLAN team [0e215164] core libvlc debug: revision 2.2.2-18-gf8b3bf0 [0e215164] core libvlc debug: configured with /Users/fkuehne/Desktop/VLCKit/MobileVLCKit/ImportedSources/vlc/configure '--prefix=/Users/fkuehne/Desktop/VLCKit/MobileVLCKit/ImportedSources/vlc/install-ios-Simulator/i386' '--host=i386-apple-darwin11' '--with-contrib=/Users/fkuehne/Desktop/VLCKit/MobileVLCKit/ImportedSources/vlc/contrib/i386-apple-darwin11-i386' '--enable-static' '--disable-debug' '--enable-dvbpsi' '--enable-avcodec' '--disable-macosx' '--disable-macosx-dialog-provider' '--disable-macosx-qtkit' '--disable-macosx-eyetv' '--disable-macosx-vlc-app' '--disable-macosx-avfoundation' '--disable-audioqueue' '--disable-shared' '--enable-macosx-quartztext' '--enable-mkv' '--enable-opus' '--disable-faad' '--disable-lua' '--disable-a52' '--enable-fribidi' '--disable-qt' '--disable-skins2' '--disable-vcd' '--disable-vlc' '--disable-vlm' '--disable-httpd' '--disable-nls' '--disable-glx' '--disable-sse' '--enable-neon' '--disable-notify' '--enable-live555' '--enable-realrtsp' '--enable-swscale' '--disable-projectm' '--enable-libass' '--enable-libxml2' '--disable-goom' '--disable-dvdread' '--disable-dvdnav' '--disable-bluray' '--disable-linsys' '--disable-libva' '--disable-gme' '--disable-tremor' '--enable-vorbis' '--disable-fluidsynth' '--disable-jack' '--disable-pulse' '--disable-mtp' '--enable-ogg' '--enable-speex' '--enable-theora' '--enable-flac' '--disable-screen' '--enable-freetype' '--enable-taglib' '--disable-mmx' '--disable-addonmanagermodules' '--disable-mad' 'host_alias=i386-apple-darwin11' 'CC=xcrun clang' 'CFLAGS=-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk -arch i386 -O3 -g -miphoneos-version-min=7.0' 'LDFLAGS=-L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/lib -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk -Wl-ios_version_min,7.0' 'CPPFLAGS=-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk -arch i386 -O3 -g -miphoneos-version-min=7.0' 'CPP=xcrun cc -E' 'CXX=xcrun clang++' 'CXXFLAGS=-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk -arch i386 -O3 -g -miphoneos-version-min=7.0 -stdlib=libstdc++' 'OBJC=xcrun clang' 'OBJCFLAGS=-fobjc-abi-version=2 -fobjc-legacy-dispatch ' 'CXXCPP=xcrun c++ -E' [0e215164] core libvlc debug: plug-ins loaded: 217 modules [0e215164] core libvlc debug: translation test: code is "C" [0e215164] core libvlc debug: CPU has capabilities MMX MMXEXT SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 FPU [0ce47ae4] core playlist debug: creating audio output [0ce491f4] core audio output debug: looking for audio output module matching "any": 3 candidates [0ce491f4] core audio output debug: using audio output module "audiounit_ios" [0ce47ae4] core playlist debug: keeping audio output [0ce49c24] core interface debug: looking for interface module matching "ios_dialog_provider,none": 1 candidates [0ce49c24] ios_dialog_provider interface debug: iOS dialog provider initialised [0ce49c24] core interface debug: using interface module "ios_dialog_provider" [0ce4a524] core generic error: option marq-color does not exist [0ce4a524] core generic error: option marq-opacity does not exist [0ce4a524] core generic error: option marq-position does not exist [0ce4a524] core generic error: option marq-refresh does not exist [0ce4a524] core generic error: option marq-size does not exist [0ce4a524] core generic error: option marq-timeout does not exist [0ce4a524] core generic error: option marq-x does not exist [0ce4a524] core generic error: option marq-y does not exist [0ce4a524] core generic debug: creating audio output [0e222334] core audio output debug: looking for audio output module matching "any": 3 candidates [0e222334] core audio output debug: using audio output module "audiounit_ios" [0ce4a524] core generic debug: keeping audio output [0ce5fae4] core input debug: Creating an input for 'http://172.26.0.168/control/faststream.jpg?source=MxPEG' [0ce5fae4] core input debug: using timeshift granularity of 50 MiB, in path '/tmp' [0ce5fae4] core input debug: `http://admin:meinsm@172.26.0.168/control/faststream.jpg?source=MxPEG' gives access `http' demux `' path `admin:meinsm@172.26.0.168/control/faststream.jpg?source=MxPEG' [0ce5fae4] core input debug: specified demux `any' [0ce5fae4] core input debug: creating demux: access='http' demux='any' location='admin:meinsm@172.26.0.168/control/faststream.jpg?source=MxPEG' file='(null)' [0cd70004] core demux debug: looking for access_demux module matching "http": 4 candidates [0cd70004] core demux debug: no access_demux modules matched [0ce5fae4] core input debug: creating access 'http' location='admin:meinsm@172.26.0.168/control/faststream.jpg?source=MxPEG', path='(null)' [0e119104] core access debug: looking for access module matching "http": 15 candidates [0e119104] http access debug: querying proxy for http://admin:meinsm@172.26.0.168/control/faststream.jpg?source=MxPEG [0e119104] http access debug: no proxy [0e119104] http access debug: http: server='172.26.0.168' port=80 file='/control/faststream.jpg?source=MxPEG' [0e119104] http access debug: user='admin' [0e119104] core access debug: net: connecting to 172.26.0.168 port 80 [0e119104] core access debug: connection succeeded (socket = 8) [0e119104] http access debug: protocol 'HTTP' answer code 200 [0e119104] http access debug: Content-Type: multipart/x-mixed-replace; boundary="MOBOTIX_Fast_Serverpush" [0e119104] core access debug: using access module "http" [0e102094] core stream debug: Using stream method for AStream* [0e102094] core stream debug: starting pre-buffering [0e102094] core stream debug: received first data after 0 ms [0e102094] core stream debug: pre-buffering done 1102 bytes in 0s - 342 KiB/s [0e11e074] core stream debug: looking for stream_filter module matching "any": 9 candidates [0e11e074] core stream debug: no stream_filter modules matched [0e11e074] core stream debug: looking for stream_filter module matching "record": 9 candidates [0e11e074] core stream debug: using stream_filter module "record" [0ce5fae4] core input debug: creating demux: access='http' demux='any' location='admin:meinsm@172.26.0.168/control/faststream.jpg?source=MxPEG' file='(null)' [0cd72134] core demux debug: looking for demux module matching "any": 57 candidates [0cd72134] image demux debug: Detected image: Mxpeg [0cd72134] ts demux debug: TS module discarded (lost sync) [0cd72134] mod demux debug: MOD validation failed (ext=) [0cd72134] avformat demux debug: trying url: http://admin:meinsm@172.26.0.168/control/faststream.jpg?source=MxPEG [0cd72134] avformat demux debug: CPU flags: 0x0107d3db [0cd72134] avformat demux debug: forcing format: mxg [0cd72134] avformat demux debug: detected format: mxg [0ce5fae4] core input debug: selecting program id=0 [0cd72134] avformat demux debug: adding es: video codec = MXPG (147) [0cd72134] avformat demux debug: adding es: audio codec = alaw (65543) [0cd72134] avformat demux debug: AVFormat supported stream [0cd72134] avformat demux debug: - format = mxg (MxPEG clip) [0cd72134] avformat demux debug: - start time = 1472120923663147 [0cd72134] avformat demux debug: - duration = -1 [0cd72134] core demux debug: using demux module "avformat" [0f006874] core decoder debug: looking for decoder module matching "any": 32 candidates [0f006874] avcodec decoder debug: CPU flags: 0x0107d3db [0f006874] avcodec decoder debug: trying to use direct rendering [0f006874] avcodec decoder debug: allowing 4 thread(s) for decoding [0f006874] avcodec decoder debug: avcodec codec (Mxpeg) started [0f006874] core decoder debug: using decoder module "avcodec" [0d05ea74] core decoder debug: looking for decoder module matching "any": 32 candidates [0d05ea74] g711 decoder debug: samplerate:8000Hz channels:1 [0d05ea74] core decoder debug: using decoder module "g711" [0cd737b4] core demux meta debug: looking for meta reader module matching "any": 1 candidates [0cd737b4] core demux meta debug: no meta reader modules matched [0ce5fae4] core input debug: `http://admin:meinsm@172.26.0.168/control/faststream.jpg?source=MxPEG' successfully opened [0ce5fae4] core input debug: Buffering 0% [0ce5fae4] core input debug: Buffering 0% [0ce5fae4] core input debug: Buffering 51% [0ce5fae4] core input debug: Buffering 51% [0ce4a524] core generic debug: reusing audio output [0ce5fae4] core input debug: Buffering 55% [0e222334] core audio output debug: VLC is looking for: 's16l' 8000 Hz Mono frame=1 samples/2 bytes [0ce5fae4] core input debug: Buffering 55% [0ce5fae4] core input debug: Stream buffering done (1100 ms in 0 ms) [0e812074] core spu text debug: looking for text renderer module matching "quartztext": 2 candidates [0e812074] core spu text debug: using text renderer module "quartztext" [0d05b874] core scale debug: looking for video filter2 module matching "any": 20 candidates [0d05b874] swscale scale debug: 32x32 (32x32) chroma: YUVA -> 16x16 (16x16) chroma: RGBA with scaling using Bicubic (good quality) [0d05b874] core scale debug: using video filter2 module "swscale" [0d0a5674] core scale debug: looking for video filter2 module matching "any": 20 candidates [0d0a5674] yuvp scale debug: YUVP to YUVA converter [0d0a5674] core scale debug: using video filter2 module "yuvp" [0e819274] core video output debug: Deinterlacing available [0e819274] core video output debug: deinterlace 0, mode blend, is_needed 0 [0e819274] core video output debug: Opening vout display wrapper [0e11d194] core vout display debug: looking for vout display module matching "any": 3 candidates [0e11d194] core vout display debug: no vout display modules matched [0e819274] core video output error: video output creation failed [0e812074] core spu text debug: removing module "quartztext" [0d0a5674] core scale debug: removing module "yuvp" [0d05b874] core scale debug: removing module "swscale" [0f006874] core decoder error: failed to create video output [0f006874] core decoder warning: can't get output picture [0f006874] avcodec decoder warning: disabling direct rendering [0e222334] audiounit_ios audio output debug: we set the AU format: [8000.000000][mcpl][9][8][1][8][2][32] [0e222334] audiounit_ios audio output debug: the actual set AU format is [8000.000000][mcpl][9][8][1][8][2][32] [0d867e74] core spu text debug: looking for text renderer module matching "quartztext": 2 candidates [0d867e74] core spu text debug: using text renderer module "quartztext" [0d868274] core scale debug: looking for video filter2 module matching "any": 20 candidates [0d868274] swscale scale debug: 32x32 (32x32) chroma: YUVA -> 16x16 (16x16) chroma: RGBA with scaling using Bicubic (good quality) [0d868274] core scale debug: using video filter2 module "swscale" [0d07a474] core scale debug: looking for video filter2 module matching "any": 20 candidates [0d07a474] yuvp scale debug: YUVP to YUVA converter [0d07a474] core scale debug: using video filter2 module "yuvp" [0d850e74] core video output debug: Deinterlacing available [0d850e74] core video output debug: deinterlace 0, mode blend, is_needed 0 [0d850e74] core video output debug: Opening vout display wrapper [0e219104] core vout display debug: looking for vout display module matching "any": 3 candidates [0e219104] core vout display debug: no vout display modules matched [0d850e74] core video output error: video output creation failed [0d867e74] core spu text debug: removing module "quartztext" [0d07a474] core scale debug: removing module "yuvp" [0d868274] core scale debug: removing module "swscale" [0f006874] core decoder error: failed to create video output [0f006874] core decoder warning: can't get output picture [0e222334] audiounit_ios audio output debug: audio output unit started: 0 [0e222334] audiounit_ios audio output debug: analog AudioUnit output successfully opened [0e222334] core audio output debug: output 'f32l' 8000 Hz Stereo frame=1 samples/8 bytes [0ce62e84] core volume debug: looking for audio volume module matching "any": 2 candidates [0ce62e84] core volume debug: using audio volume module "float_mixer" [0e222334] core audio output debug: input 's16l' 8000 Hz Mono frame=1 samples/2 bytes [0e851074] core audio filter debug: looking for audio filter module matching "scaletempo": 11 candidates [0e851074] scaletempo audio filter debug: format: 8000 rate, 1 nch, 4 bps, fl32 [0e851074] scaletempo audio filter debug: params: 30 stride, 0.200 overlap, 14 search [0e851074] scaletempo audio filter debug: 1.000 scale, 240.000 stride_in, 240 stride_out, 192 standing, 48 overlap, 112 search, 400 queue, fl32 mode [0e851074] core audio filter debug: using audio filter module "scaletempo" [0e222334] core audio output debug: conversion: 's16l'->'f32l' 8000 Hz->8000 Hz Mono->Mono [0d07a674] core audio converter debug: looking for audio converter module matching "any": 5 candidates [0d07a674] audio_format audio converter debug: s16l->f32l, bits per sample: 16->32 [0d07a674] core audio converter debug: using audio converter module "audio_format" [0e222334] core audio output debug: conversion pipeline complete [0e222334] core audio output debug: conversion: 'f32l'->'f32l' 8000 Hz->8000 Hz Mono->Stereo [0d096474] core audio converter debug: looking for audio converter module matching "any": 5 candidates [0d096474] core audio converter debug: using audio converter module "trivial_channel_mixer" [0e222334] core audio output debug: conversion pipeline complete [0e851474] core audio resampler debug: looking for audio resampler module matching "any": 1 candidates [0e851474] core audio resampler debug: using audio resampler module "ugly_resampler" [0d05ea74] core decoder debug: End of audio preroll [0ce5fae4] core input debug: Decoder wait done in 260 ms [0e222334] core audio output warning: playback way too early (-519892): playing silence [0e222334] core audio output debug: inserting 4159 zeroes (lldb)

fkuehne
Developer
Developer
Posts: 7264
Joined: 16 Mar 2004 19:37
VLC version: 0.4.6 - present
Operating System: Darwin
Location: Germany
Contact:

Re: Play streaming video on libVLC iOS

Postby fkuehne » 12 Sep 2016 19:28

Can you dump and provide a sample stream?
VideoLAN
Felix Paul Kühne
Medic. VLC developer for appleOS since before you were born.
Blog: https://www.feepk.net

Isleo
New Cone
New Cone
Posts: 6
Joined: 23 Aug 2016 11:38

Re: Play streaming video on libVLC iOS

Postby Isleo » 22 Sep 2016 17:45

Hi,

There are some public cameras on the Internet. You can try this one: http://86.125.43.4/control/faststream.jpg?stream=MxPEG. If you want to watch the output (it just frames, no audio), you can go to http://86.125.43.4 on you browser.

Thanks you,

Isleo.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 19 guests