add custom ffmpeg avfilter in mlt [closed] - opengl

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 14 days ago.
Improve this question
I created one custom filter under av filter and added it into ffmpeg.
I build the ffmpeg and in ffmpeg its working fine and visible in ffmpeg filter list.
Now I tried to build mlt with this custom ffmpeg. mlt build successfully.
I checked in mlt filters but it is not available.
On investigating I found in mlt there is no avfilter available which can take 2 videos as input.
As my filter also takes 2 videos as input and apply some filter and output one video that's why it's not available.
Now I want to know
Why mlt is not supporting multiple input av filters ?
Where in code mlt restricted it.
What is the best way to add this filter ?

Why mlt is not supporting multiple input av filters ?
MLT Filter objects only support input from one source. So using an AV filter with multiple inputs can not work. This is fundamental to the design of MLT.
Where in code mlt restricted it.
https://github.com/mltframework/mlt/blob/master/src/modules/avformat/factory.c#L448
What is the best way to add this filter ?
MLT transitions can mix two frames from two different producers. It would be possible to design a new MLT transition similar to MLT filter that provides access to AV filters with two inputs.

Related

Displaying an image and its metadata in C++ [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I am learning Linux programming using C++. As a project I want to make program that would pop up a window and display the image (passed as arguments), with the meta data of the file.
I have looked up the OpenCV library, and I would like to build something similar but simpler, on my own. Basically I want to implement just this kind of functionality. How should I go about doing this?
For a start, I will be working only with .jpg files.
the popup window part can be happen by QT or SDL
or many other GUI framework and you should consider GTK too. simple image operation can be done by these too, but for more advance topics you can go for example to Imagemagick library
QT sample : http://doc.qt.io/archives/qt-4.8/qt-tutorials-widgets-toplevel-example.html
SDL sample : https://wiki.libsdl.org/SDL_CreateWindowAndRenderer
also reading metadata in qt can be done using QImage or QImageReader and methods like QImage::textKeys() or QImageReader::textKeys()
If you want to implement it from scratch, you must know a few things
Binary I/O (C++ provides that easily)
How Images are stored in computers, what's the difference between different formats like .jpeg and .png - how they encode and compress pixels ?
How to Draw anything on your screen ? there are many options Using a GUI toolkit canvas, X11 windowing system drawing abilities or even use something like OpenGL or DirectX.
Or just simply use any of the libraries mentioned by #nullqube
Qt framework could definitely make your project easier.
It would also allow you to easily display a file dialog window to let the user select the file, rather than passing it as an argument to the program.

Model-based generation of project documentation [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
During the development of my projects I find myself producing some large documents with slight variations on only a few paragraphs. For instance, the same configuration plan will be used throughout different projects but each document has to be tailored with specific data and to comply with some specific requirements.
Being a lazy person and a fan of model-driven development, I have been looking for ways to optimize this process and I got these options:
Document templates - Using master document templates (the presentation) with forms (the model) or restricting the edition of a document to only a few key fields, and then cross-referencing the inputted data all over the document would do the trick... but I still feel that I could de-couple both layers a bit more.
UML modeling - Using CASE tools with UML support, I thought I could model my documents as packages and classes with annotations, change the model for each project and generate a report using a document template. The problem is that those tools are not designed for treating large chunks of text and I am having some difficulties to progress.
Process modeling - Using Eclipse EPF https://www.eclipse.org/epf/ seems a bit overkilling for what I want to accomplish. Remember: I´m a lazy person.
I would like to ask the community on their experiences with model-based documentation or their ways to optimize the generation of documents throughout the software development cycle.
I'm not sure I fully understand, so apologies if this misses the mark.
I've faced (I think) a similar problem, where there's a many:many relationship between content and the documents it needs to be presented in. For example, a 'project overview' that needs to be included in a requirements document, project plan, etc.
Thus far the best solution I've found is:
Write each section in Markdown format. There are some nice editors that make writing Markdown easy and efficient (e.g. Mou on OSX).
Use Pandoc to convert Markdown into Restructured Text (RST).
Use Sphinx to generate documents from the RST files.
I have multiple Sphinx doc templates, each of which combines some of the common sections with others specific to that doc. If one of the common sections gets updated it's easy to re-generate all docs to incorporate. Version Control is pretty straightforward as the source files are all simple text. Sphinx can also generate multiple formats easily: for example html to put online, or pdf for printing/distribution.
You could remove the need for step 2 by writing in RST natively. For me the extra step is worth it as I haven't found an RST editor that's as comfortable or efficient as Mou. YMMV of course.
It's not a perfect solution: for example, creating links across sections isn't that easy. But in general it works well for my needs.
hth.

Inputs Needed for making a Media Player [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I'm trying to develop a music player using Qt, QML & CPP.
I'm new to this kind of development (related to multimedia).
I want some insights from you on how other Music Players work.
My first hurdle is how should I maintain the Library Info.? -- All the Metadata of each file, their locations etc.
I thought of having a Database. As I'm using Qt, It provides SQLite internally. So, I'm opting for creating a Database which contains all the metadata of each music file (.mp3)
Will this be feasible if we have lot of mp3 files. Say, 40K files. So, it comes to almost 40K records in a DB table. Then will this SQLite works well ? Are there any alternatives for maintaining the media library?
Hope I'm clear, I can elaborate if specified.
Thanks in Advance,
inblueswithu
Then will this SQLite works well ? Are there any alternatives for
maintaining the media library?
In short, yes, SQLite will work.
There are various media players like this this out there using SQLite for embedded systems, and they work fine for this requirement. The limits are documented on the official website.
If you plan to have a QtQML application, I would suggest using the QtSql module for handling the database, and QtMultimedia for the audio part. I would also recommend QtQuick controls for the UI part.
Here you can find the module documentations for those:
QtSql: https://qt-project.org/doc/qt-5.1/qtsql/qtsql-index.html
QtMultimedia: http://qt-project.org/doc/qt-5.1/qtmultimedia/qtmultimedia-index.html
QtQuick Controls: http://qt-project.org/doc/qt-5.1/qtquickcontrols/qtquickcontrols-index.html
Yes, SQLite can support 40k rows in a table. You can see http://www.sqlite.org/limits.html for more info about its limits.

Any latex web services with an API? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
Is there a web service API that takes this type of a latex http-request:
http://some_web_service/texfile?texfile=
\new\documentclass[12pt]{article}
\begin{document}
bla
\end{document}
and returns:
bla.pdf
the Online LaTeX Equation Editor is perfect for this.
EG:
uses the following markup:
![equation using Online Equation Editor]
(https://latex.codecogs.com/gif.latex?x&space;=&space;\frac{4}{5}+\pi\Omega\int_{2\pi}^{\infty}{5\left\(\frac{\tau+3}{2}\right\)d\omega})
note that you will need to escape parentheses with a backslash, eg: \left\( stuff \right\)
If you look through the editor API documentation you might figure out that you can change the format from gif to png by changing the api url endpoint from /gif.latex to /png.latex.
There's also options to set a white background by using \bg_white:
![equation using Online Equation Editor]
(https://latex.codecogs.com/gif.latex?\bg_white&space;x&space;=&space;\frac{4}{5}+\pi\Omega\int_{2\pi}^{\infty}{5\left\(\frac{\tau+3}{2}\right\)d\omega})
See also this meta.stackexchange answer and this tex.stackexchange answer. I'm sure there are many more answers that point to this tool and implement it in different ways. IE: instead of using the url to generate a gif or png using markdown notation, or you could use html markup and bypass markdown or you could just drag the image over to your post.
I'm looking for the same thing and Latex Online seems to be the closest thing to what we need.
You just need to setup the server by yourself.
EDIT
I've written my own little Sinatra app for this: https://github.com/codegestalt/sinatratex
ScribTeX has a CLSI API, you can send CLSI requests from any platform to compile LaTeX.
I blogged some time ago about this along with a CLSI client written in F#.
The Common LaTeX Service Interface (CLSI) is a web service interface and implementation that exposes common LaTeX related capabilities (such as compiling LaTeX documents to different formats):
http://code.google.com/p/common-latex-service-interface/
(This interface is one of the ways that latexlab.org can compile latex)
Fundamentally, this shouldn't be any different than a build server like you see for lots of open source projects (along the lines of Koji for example). Ultimately, you would just hook into pdflatex instead of gcc.
Were you to be able to install software on your local server this wouldn't be too hard. Some combination of Perl / TT / latexmk along with a LaTeX system (e.g. TeXLive or MiKTeX).
I don't know about latexlab mentioned above. The closest thing I know of is http://www.tlhiv.org/ltxpreview/ , which perhaps you could wrap to do what you need (or even write a howto for your users).
Just for completeness:
GitHub or docker might do the trick.
It's basically a micro service implemented in java/spring boot, which is wrapping pdflatex. Urls are immutable and the pdfs are stored on disk/distributed storage. You'll have to host it on your own though. The code is pretty simple and you're able/allowed to customize it to your needs. See the "Scaling the service" section in readme for more details about setting up a production environment.

Latitude longitude API's [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I have an address database and I tried to find latitude and longitude using google geocoding and yahoo API. Is there any other popular API's or programs are there. I'm using ubuntu platform.
I was usually using Google Maps geocoding service over HTTP which returns you Json or XML as you like. Browse around here for more information about this.
Another option may be GeoNames.org. It also provides some interesting services and client libraries.
I'm aware of at least one other geocoding system, OpenStreetMap. The only major differences I've found with any of these API's is the level of detail in each. OpenStreetMap has significantly less data, but is much easier to integrate with custom data. Also, I think the maps produced by google are the most beatiful of the three.
With both of those that you mention, if you're mass-processing them or not showing a map to the user at the time of querying the API, you're violating TOS.
A better solution to meet your needs would be something like LiveAddress. I actually work at SmartyStreets where we develop it ourselves -- there's no license restrictions such as would prevent you from running even millions of addresses. In addition to returning coordinates, LiveAddress will also verify the existence of addresses and standardize them for you. This is helpful in removing duplicates and has a lot of business advantages.
If you have any further address-related questions I'll be happy to personally assist.
You might also find geocoder.us useful.
Using YQL, u can obtain a list of possible forecast
First step:
Reverse geocoding
SELECT woeid
FROM geo.places
WHERE text="##LATITUDE##, ##LONGITUDE##"
then apply a filter to order results by placeType. This help U to order forecast by map level accuracy (town, city, postal code, region, ....)
SELECT woeid
FROM geo.places
WHERE text="##LATITUDE##, ##LONGITUDE##" |
SORT(field="placeTypeName.code")
Now use simile join to get all forecasts by woeid resulted by last query and filter null results
SELECT channel
FROM weather.woeid
WHERE w in (
SELECT woeid
FROM geo.places
WHERE text="##LATITUDE##, ##LONGITUDE##" |
SORT(field="placeTypeName.code"))
AND channel.