Help add video playout support to Airtime...
  • Vote Up4Vote Down Daniel JamesDaniel James
    Posts: 844Member, Sourcefabric Team
    Hello,

    Several developers in the community have expressed interest in adding video playout to Airtime, perhaps via MLT or VLC. We would like to form a working group to consider the options available, and get hacking on features that video support would require. If you are interested in being part of this group, please leave a comment in the forum or contact us directly.

    Cheers!

    Daniel
  • 42 Comments sorted by
  • We are looking into adding support for video in the future. It is one of our more highly requested features at the moment.
    Airtime Pro Hosting: http://airtime.pro
  • Our audio playout engine is Liquidsoap, so we would probably use this and a combination of Icecast to stream the video.

    The technologies you mention are mostly P2P, which is not something we have in mind at the moment.
    Airtime Pro Hosting: http://airtime.pro
  • I am about to attempt this....... so if anyone else is in current development I would love to hear from you - no point in reinventing wheels..
    Post edited by John Chewter at 2013-09-09 10:49:16
    No longer using Airtime or Libretime.
  • o/ curious to know if there has been any progress on this, any branch to help test that had already implemented some video support?
  • Vote Up1Vote Down Daniel JamesDaniel James
    Posts: 844Member, Sourcefabric Team
    Officially we have not tested sending video via the Master source, so I would not be surprised if it did not work. In principle it should work, so we probably have to change some assumptions about the streams. For example we do not currently allow the user to specify a video output stream in the stream settings page.
  • hey, since i am not a developer, i cannot be much of technical help with this. but i'd be very interested in this feature. i guess it shouldn't be too hard to implement as i read that liquid soap supports video processing.... one suggestion though, as with video you will quickly reach bandwidth and thus economic barriers when using hosting services, i would suggest looking into p2p live video streaming solutions like tribler...

  • What kind of streaming backends are you evaluating for that purpose? I was googling for p2p aided video streaming over the last couple of weeks and it seems there are a lot of half-ready (open source) technologies (tribler, goalbit, freecast),  some functioning proprietary like octocast, p2plive, sopcast, and some legally unclear if oss or not solutions like the cumulus server implementing the "open source" (reverse engineered?) version of adobes cirrus server...

    which road are you looking into?
  • Vote Up0Vote Down Albert FRAlbert FR
    Posts: 1,978Member, Airtime Moderator
    but if icecast is present you can use you p2p video system to push them to your community ;)
    this software need a source to stream, icecast is this one
  • Liquidsoap supports video streaming and we've tried to stream video from media library. We can now stream one video file by disabling a call to audio_to_stereo in ls_script.liq and modifying output_to call with %ogg(%theora,%vorbis) but we're in stuck with playing two video in a sequence. We guess that the problem is near transitions or crossfade_airtime function.
  • My team is willing to take part in airtime video features development. If you wish, you can contact me directly via email or this forum.
  • Vote Up0Vote Down Albert FRAlbert FR
    Posts: 1,978Member, Airtime Moderator
    you also can post your modifications on github
    some people here can perhaps help you (code, debug, etc.)
  • As I mentioned in savonet-users ML, we've done a draft implementation of video playout in airtime.

    Things we've done:
    1. Disable liquidsoap cfgs generation
    2. Cut out audio_to_stereo call from queue
    3. Replace crossfade_airtime with crossfade_airtime_video that uses video.fade.* instead of fade.*
    4. add drop_metadata(s) right before map_metadata call in ls_script
    5. Modify output_to to call output.icecast(%theora,%vorbis)

    I've done some tests on my airtime 2.2 instance on CentOS 6.3 x86_64 with two 1minute ogg theora video clips. Now I can see the uninterrupted stream that runs for two minutes.

    After some cleanup we will be ready to roll out our ls_script and ls_lib modifications to some public location (guess, that will be github).
  • I would be willing to help test and research.  Please PM me with contact details. 
  • Vote Up0Vote Down hoerichhoerich
    Posts: 627Member, Airtime Moderator
    A chummily Community TV-Station nearby our Community Radio Station is also interested in this feature and willing to test. Just point us to the test-files ;-)

    I am really confident in recommending Airtime for the Austrian Community Media Scene and I am going to present Airtime to a few Radio- & TV-Stations in May.
    Official Airtime Forum Manager
    --------------------------
    Most of the time an issue is located between keyboard and chair.
  • Very nice feature to have. Please add this, Sourcefabric. It will help Airtime a lot by enabling people to create "music TV" stations.

    @Stanislav: any progress on the liquidsoap video integration?
    Post edited by Lee Bos at 2013-06-11 23:27:13
  • Vote Up0Vote Down charoscharos
    Posts: 20Member
    I'm not sure of the approach to implement this in Airtime. To my mind this seems like another project. Unless Airtime becomes modular (enable/disable or extend features) , Airime with video can become cluttered if you only want to use it to broadcast radio.
    Do you have some draft presentation of the the concept?
  • Please add me.
  • Thx it is great work.But i.m instaling this software one weak.I,have problem.Im runing ubuntu 12.04 on vps now with parallels control panel.When all is set up i,m cant login to or cant find login page.Airtime please give me full deatels how to install this software on vps with allredy instaled parallels control panel.
  • Hi Guys.. 

    please check the wotk being done by those folks..
    https://github.com/inaes-tic/mbc-playout
    It ´s exactly the subject of this thread!

    cheers
  • Vote Up0Vote Down Daniel JamesDaniel James
    Posts: 844Member, Sourcefabric Team
    Hi John, let us know how you get on! Which video codecs are you going for, initially - e.g. Ogg Theora?

    To begin with, we could break this down into required tasks, and tackle one at a time, such as:

    1. Allowing the upload of video files with the supported codec via the Add Media page.
    2. Having media-monitor move the uploaded video files to an appropriate location in the storage filesystem - should they be separate from audio-only files?
    3. Adding a new stream output type for video on the Stream Settings page.
    4. Liquidsoap script changes for video.

    Ideally, we're looking for solutions which preserve the current audio functionality. So while it might be tempting to hack out some features to get video working, in order to get the code into a mergeable state, we need to be as un-invasive as possible. The git master branch is the place to fork from.

    Cheers!

    Daniel

  • Vote Up0Vote Down Daniel JamesDaniel James
    Posts: 844Member, Sourcefabric Team
    Hi Deedos,

    deedos said:

    please check the wotk being done by those folks..
    https://github.com/inaes-tic/mbc-playout
    It ´s exactly the subject of this thread!


    We did take a look at that project, but they have diverged so far from the Airtime design that it would probably not be possible to merge their work directly.

    Cheers!

    Daniel
  • I am test coding this in another engine for a long list of good reasons. It is not so hard to do this - except that the pipeline and import need changing. When I suggested this before, I got flamed. I will try explaining it again.

    The Airtime route of changing formats 'on the fly', before final streaming, is very cpu intensive for video and needs to be transcoded each time the file is played and so the amount of viewers possible drops dramatically. If you transcode the video, on import, to the final streaming formats in a background thread (similar to the auto gain adjustment mechanism in Airtime) and stream the converted file out directly, it all works much better and the conversion only needs doing ONCE.

    I was told this was ridiculous. Ridiculous or not, I have it working in test in another engine and it works much better. If you did the same for audio you would also get benefits.
    Post edited by John Chewter at 2013-11-20 07:22:07
    No longer using Airtime or Libretime.
  • Vote Up0Vote Down Daniel JamesDaniel James
    Posts: 844Member, Sourcefabric Team
    Hi Alejo, I have recently been working on adding upload and media-monitor support for MP2 audio and this has provided some insight into what would be required for video uploads. One potential obstacle is that we use mutagen for reading file metadata and this program does not explicitly support video files.

    John is absolutely right that pre-rendering is more efficient if you have a relatively small library of videos and you play out each video many times. If you have a large library and you only play out some of the videos, and each video you play is only played out once, pre-rendering may be less efficient than rendering on the fly.

    One reason for rendering on the fly is to be able to have overlays from live sources. For example the scrolling text on a news program, or the clock. Another reason is to be able to change your output resolution without re-encoding your source material, or to output multiple resolutions for different devices.

    It's still very early days for doing video with Airtime so we welcome all research and feedback. There are no ridiculous ideas here :-)

    Cheers!

    Daniel 
  • Transcoding on the fly cut my total possible viewers in half. That is my main concern - the cpu was too busy. Trancoding in idle time fixed that.
    I would have thought that you could still do the other video tricks on a pre-transcoded stream and still gain some benefit?
    I guess you could have a transcode or not switch in import and put a value for that in a tag. Also I guess one could pre-transcode before upload and set that tag.
    I don't think I can add more as the other engine is quite different in many ways.
    Post edited by John Chewter at 2013-11-20 07:56:03
    No longer using Airtime or Libretime.
  • Vote Up0Vote Down Daniel JamesDaniel James
    Posts: 844Member, Sourcefabric Team
    That's another good point, if you are only streaming at certain times of the day and have other times when your CPU is doing very little then rendering in advance may help.
  • You can pace processes by idle time. Load balancing. This is what I am investigating. I can envision a daemon chewing through next weeks video, in slow times in background, this week or even dedicating one cpu core to it.

    Post edited by John Chewter at 2013-11-20 08:05:30
    No longer using Airtime or Libretime.
  • Hi Daniel and thanks for your response. Without wanting to take too much of your time please allow me to ask a couple of naive questions. What if we just start with ogg theora (ogv), and no other format, so "transcoding" wouldn't be necessary (perhaps i'm understanding this transcoding problem wrong? or am I just too short sighted thinking only Airtime allowing ogg video streams passing through). Aware that one of the main problems is the way the database/metadata is generated.. could it be considered that for certain type of files, namely .ogv, the user has to make a manual input of certain fields that are not supported by mutagen, although i see theora listed: 


    So yes, I understand and learn from your capacity to see this long term and 'sustainable' as development goes, but considering many more formats, big video bases and even text video generators can still be on the streaming client side.
  • Vote Up0Vote Down Daniel JamesDaniel James
    Posts: 844Member, Sourcefabric Team
    Thanks for pointing out that mutagen supports theora, this is a good start. Mutagen does not currently recognise WebM files, but we could probably fix that with a patch. Currently, uploading a Theora file to Airtime results in a message that the file is not a valid ogg file, so that would be the first thing to fix.

    Metadata should not be too much of a problem because it is the same as in the Vorbis files we already support: http://lists.xiph.org/pipermail/theora/2010-September/004147.html

    The issue with CPU use is not just transcoding from one format to another but that Liquidsoap decodes sources before re-encoding them for the output. This offers a lot of flexibility, but John is quite right that this approach does use a lot of system resources.

    Cheers!

    Daniel
  • "Liquidsoap decodes sources before re-encoding them for the output"

    Oh I see the "problem" now, for a start, /Me wonders what happens when is a live video .ogv source? Will Airtime be able to deal with it as when one has the live.ogg input stream source that overrides as master source whatever is on the playlist source.

    It will be just an entry point to having video on Airtime. Then it will be a question of being able to manually add clips. I guess that webm and even the new h265 will be possible at some point but for now having the chance to get theora will be already a big achievement. 

    I have looked at this using freej that btw has a great way for layering text over video in realtime but things with the mediabase became difficult quite quick and this plus the admin user interface are the biggest assets Airtime has cause it allows the average user to deal with his/her content on a timeline.

    Thanks for the exchange Daniel, i will be happy to help test any branch so to finally see some video passing through via Airtime.
  • Vote Up0Vote Down Daniel JamesDaniel James
    Posts: 844Member, Sourcefabric Team
    For now you have the option to send the live video stream directly to an Icecast mountpoint. Icecast has supported Theora since 2.2.0 and WebM since 2.4.0-beta.
  • I'm aware of that since years thanks to the karlH branch. My question is solely related to Airtime. Will it allow it to pass through if one send video over the Master stream input, in this case live.ogg? (I tried out but failed, perhaps a local error).
  • Following!
  • Vote Up0Vote Down Albert FRAlbert FR
    Posts: 1,978Member, Airtime Moderator
    you can send video with icecast, normally 2.4 recognize webm format
    but the great problem is the distribution
    perhaps live torrent is the solution, or youtube, or dailymotion, or ... I don't know ;-)
  • I am playing with torrent video and icecast. Will keep you updated. I have some extra tricks I thought of and am testing.
    Post edited by John Chewter at 2013-11-27 18:41:24
    No longer using Airtime or Libretime.
  • Hello,

    Im using Ubuntu Studio 13.04, I send Video to Icecast2 (Version 2.3.99) with gstreamer, here the Code

    "gst-launch v4l2src device=/dev/video0 ! queue ! ffmpegcolorspace ! videoscale ! video/x-raw-yuv,width=320,height=240 ! videorate skip-to-first=1 ! video/x-raw-yuv,framerate=25/1 ! vp8enc threads=2 quality=4 speed=0 max-latency=25 mode=vbr ! queue ! webmmux streamable=true name=mux jackaudiosrc connect=none ! audio/x-raw-float, channels=2 ! queue !  audioconvert ! vorbisenc quality=0.1 ! queue   ! mux. mux. ! queue ! shout2send ip=xxxx port=xxxx username=xxx password=xxx mount=/video.webm streamname=xxxx description=xx genre=xxx"

    Normaly Audio i send with IDJC (Link), in the next Release Stephen Fairchild will add Video Stream in IDJC, here (Link) IDJC is the best Broadcasting software on Linux.

    MFG
    Post edited by Andy at 2013-12-07 00:13:27
  • Vote Up0Vote Down hoerichhoerich
    Posts: 627Member, Airtime Moderator
    sounds good, let us know how it goes on...
    Official Airtime Forum Manager
    --------------------------
    Most of the time an issue is located between keyboard and chair.
  • hi all, i think that the topic is not about how to stream to icecast but how to have airtime listing video media files. The issue is to be able to program them on the playlist slots. Distribution is not the point yet.

    So if liquidsoap can handle video playlists what's there to hack to generate the proper metadata for videos to integrate Airtimes flow? 

    Even if its a manual indexing of videos, or if at first the functionality is only offered for live streams (no archive) it will be nice to have this on some to come Airtime release.
  • Vote Up0Vote Down Daniel JamesDaniel James
    Posts: 844Member, Sourcefabric Team
    The Mutagen library already knows how to handle Ogg Theora video files, but our playout test in Airtime (Can Liquidsoap play this file?) rejects the upload on the Add Media page. This is because the Liquidsoap binary we provide was compiled without video support.

    So the first thing to do for Theora support is recompile Liquidsoap or use the binary in a very recent distro such as Debian sid/Ubuntu Saucy and install the plugin http://packages.debian.org/sid/liquidsoap-plugin-theora

    Cheers!

    Daniel
  • Will try that out. Tx!
  • Hi,

    I just read this topic.

    I'm interesting with plays video.

    Maybe it's more easy to use VmixHD and interface vmix HD with airtime radio.

    Currently, Zenon-media is using vmix hd with their radio automation software (SEND 7.3).

    Let me know how it can be possible.

    Many thanks.

    Williams
  • Always think open source .
    If a product does not meet that criteria ,then adding it to your software only complicate matters with law suits.
    So Airtime users can use any video software they want but for development Sofab would have to thread cautiously on any proprietary software.

    As I always say these are old post sometimes not even worth rehashing.

    VOISSES
    7 to go
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • LiquidSoap and Icecast can already handle some video formats.
    No longer using Airtime or Libretime.