WPF M3U8 STREAMING - wpf

ive got link like this "http://trwamtv.live.e96-jw.insyscd.net/trwamtv.smil/playlist.m3u8" and I would like to stream it inside mediaelement ? is there anyone who knows how to do it ?

The MediaElement doesn't support M3U files inherently. M3Us are playlists, not media files (http://en.wikipedia.org/wiki/M3U). It may be possible to drill down through the playlist files until you get to actual media files, queue these, then have MediaElement play them.
The playlist file you've provided contains three separate links to different resolution versions of the same video clip:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-STREAM-INF:BANDWIDTH=950000,RESOLUTION=960x540
chunklist_b950000.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=500000,RESOLUTION=640x360
chunklist_b500000.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=250000,RESOLUTION=320x180
chunklist_b250000.m3u8
Notice that each of the 'chunklist' references are to further M3U playlists. Replacing 'playlist.m3u8' in your link with 'chunklist_b950000.m3u8' provides a further playlist file which contains references to 3 MPEG_TS files:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-ALLOW-CACHE:NO
#EXT-X-TARGETDURATION:12
#EXT-X-MEDIA-SEQUENCE:21565
#EXTINF:10.0,
media-urj3zh3ic_b500000_21565.ts
#EXTINF:10.0,
media-urj3zh3ic_b500000_21566.ts
#EXTINF:10.0,
media-urj3zh3ic_b500000_21567.ts
The WPF MediaElement doesn't support Transport Stream (.ts) files. Unfortunately you'll need to look elsewhere for a solution. I'd recommend looking into Vlc.Dotnet, the WPF MediaKit, MPlayer.Net, or some other third party media control.

Related

How to download images and bounding boxes from imageNet such that they have matching names?

I am doing object detection for a specific class, say, chairs .
I want to download images of chairs from imageNet. I also want to download the annotation xml files (bounding boxes) from imageNet.
Both these things are provided on imageNet and I have successfully been able to download them using a tool called ImageNet_Utils
https://github.com/tzutalin/ImageNet_Utils
But the downloaded images and bounding boxes don't have matching names. So it is impossible to tell which xml file is for which image.
How do I download images and bounding boxes from imageNet such that corresponding image and annotation xml files have matching names?
The download image URLs page says
The URLs are listed in a single txt file, where each line contains an
image ID and the original URL
Unfortunately, as of 2020-03-06, all the URL mapping files link to a Oops! The URL is not valid page. However, can however get mappings for each node individually. They are available by wnid: http://www.image-net.org/api/text/imagenet.synset.geturls.getmapping?wnid=n03273913
A bounding box annotation file will contain this element.
<filename>n03273913_16800</filename>
The n03273913 is the synset id and the 16800 is the image id. In the synset mapping file you'll find the line
n03273913_16800 http://farm1.static.flickr.com/186/425238103_8fe80b37de.jpg
You can download the image from that location.
There's a c++ library known as dlib. You can pass your downloaded images from dlib, it has GUI support for drawing blocks in images and save them in vector formats in an XML file. You can refer here for the documentation

Avoid open video file after playblast

I'm finishing a script that playblasts several pieces of animation into different movie files. It works fine but I'd like it to NOT open all the video files once it is done playblasting them.
Can't find that option even inside maya playblast options itself... Any light on that?
You need to pass the viewer flag to false, are you doing playblast via code ? if so check this doc

File Attributes/Description

I have to put some attributes on a file like you see it on an jpeg file, there you can add many attributes about the image and resolution and also but information in about the camera.
I also saw it on an mp3 file where you can add information about the song, album ,producer etc...
Is there any way to add these attributes to something like an pdf, txt.
Thanks for your time.
I have to put some attributes on a file like you see it on an jpeg file, there you can add many attributes about the image and resolution and also but information in about the camera.
That is part of the JPEG/Exif file specification.
I also saw it on an mp3 file where you can add information about the song, album ,producer etc...
That is part of the MP3 file specification.
Is there any way to add these attributes to something like an pdf, txt.
Metadata is part of the PDF file specification. There is nothing like that for plain text files.

Gstreamer 1.0 image/video player. Which way to implement?

I have a list of files (videos and images) I would like to show on the screen using gstreamer 1.0, means iterating over the elements (file paths) in the list and "play" them sequentially in the c application with "delays" e. I tried different examples which partly work, but I cannot get the whole picture together to implement.
So what is the conceptual solution for this? Should I use one "dynamic" pipeline or two (one for images - because I think here is imagefreeze before videoconvert necessary and one for video)? And how can I use decodebin to detect the format of the media automatically? decodebin works from the command line, but with errors like no video decoder found for 'jpeg' in c application?
Try to make universal pipeline (or two for videos and images). i.e. you put to input any file from your list and get output video or image. This pipeline(s) should works from gst-launch. After that try to implement this pipeline in to C code, or write pipeline here.
My way:
Take file from list. If image -> create image decode pipeline, if video -> create video decode pipeline. Delete pipeline. Delay. Go to next file.

How to create file format with metadata

I am trying to make a new file format for music. It needs to be a file that actually stores multiple audio files, for example a zip file. I am looking for a way to turn the zip file into this new file format. However, I still want to use id3 tags with these new files. I was wondering how I can make this new file format which is one file that holds multiple audio files, but still contains overall id3 tags for that one file, so that I can load it into my mobile applications.
Any help/recommendations would be appreciated.
Cheers,
AJ
The problem with creating your own new file format is that only you can use it. Until you convince lots of other people that it is a useful new format, no one else will have the tools to be able to do anything with the files you create.
For existing music player programs to be able to handle a new file format, you must write a CODEC for your file format in that player's plug-in style. Probably more than one plug-in as your file format is both a container of music and a catalog as well.
One alternative to creating a new file format is to put the MP3 files you have into a new MP3 file with each old file a new TRACK in the new file. Be sure to set each new tracks start time to be after the sum of all previous tracks play duration, so they don't step on each other. Merge the metadata about each file into the metadata of the new file. This might work OK for collections with lots of common metadata (like same artist), but might not work very well if the metadata is extremely varied.
Another alternative is to convert them to CDA format and put then into an Audio-CD image file, just as if you had burned them to a CD.
A third alternative is to put your files into an SQLite database file. Your metadata from each MP3 file fill in records, and you have your choice of leaving the MP3 file external and just linking to it, or storing the blob of your MP3 file in the DB as well. If you do store the blobs, then the SQLite database file is a single file that contains everything you put in it.
-Jesse
Don't create new formats unless you really really have a very good reason to do so.
Its sounds like Matroska can do anything you need. But in contrast to your own format you and other developers will have a bunch of ready to use tools to work with the format. This includes editors, players,... Additionally it you can leave making initial engineering errors to other people.
If you really really want to create your own format: Either just put your audio files that support id3 tags into your zip file, or create a meta file, for example in XML format, into your zip files as well, that contains the meta information that you want to be included.

Resources