a gstream plugin to generate video from bmp pics - plugins

I am now writing a gstreamer plugin as a source element.
I have several bmp pics. I want to generate a video from these pics.
Can anyone give me some guide or some tips. How can I write this gstreamer plugin

You need to be using multifilesrc element. In order to use it your file names should be ordered like:
image001.bmp
image002.bmp
...
image099.bmp
...
an example pipeline would be:
gst-launch-1.0 multifilesrc location="img.%03d.bmp" ! videoconvert ! <your favorite encoder here> ! avimux ! filesink location=my_video.avi

Related

Reading Dogbone (Magnus 3) sensor tags with Zebra RFD8500

I'am trying to read the new sensor tags Dogbone, (with Magnus S3 IC) but I don't have luck.
I'am using Zebra RFD8500 and programming with the Zebra SDK for Android.
I want to read the RSSI or the temperature values, but it seems the problem is with the Select command.
In either case, it is a two step procedure : 1) select command to match a specific tag pattern in a specific pointer address at the MEMORY_USER_BANK. Then the IC detect that have to store
the solicited value in a specific address at the MEMORY_RESERVED_BANK and 2) read the value, from the specific address at the MEMORY_RESERVED_BANK.
For the Select command (C1G2) I tried with Access-filters and Pre-Filters, but although the tag is matched, the IC doesn't store a value in the RESERVED Bank.
Somebody knows if Zebra APIs support the reading of this newers tags ? Or suggest me any other test?
Thanks a lot for your help
Regards.
It's possible to read the RSSI value with EPC Gen2 tags, so if the tag you're referring to supports this standard it should work.
Try downloading the Zebra RFID sample app > Perform inventory > If the tag is found it should display the RSSI. The sample app code can be found here
As for the temperature values try reading the USER memory in the sample app as well to see if you can get it.
I suggest using the SLS smartSLED; it has built-in functionality for the Magnus (Axzon) chip family (both S2 and S3).

ANSYS: how to organize my code?

I'm using ANSYS to analyse a basic structure, and I need to switch between dynamic analysis, static analysis. And sometimes I need to only consider a certain load. This makes the solution part in a mess.
!!! Add wind loads
*DIM,windforce,,4
windforce(1) = 2520
windforce(2) = -1575
windforce(3) = -1890
windforce(4) = -1575
*DO,i,1,3
SFBEAM,i ,1 ,PRES ,windforce(1)
*enddo
*DO,i,4,6
SFBEAM,i ,1 ,PRES ,windforce(2)
*enddo
*DO,i,7,9
SFBEAM,i ,1 ,PRES ,windforce(3)
*enddo
*DO,i,10,12
SFBEAM,i ,1 ,PRES ,windforce(4)
*enddo
FINISH
/SOLU ! enter solution phase
! !!Dynamic Analysis
! antype,modal
! modopt,lanb,40,0,0,,off
! mxpand,0,,,0
! lumpm,1
! solve
! finish
! ! ! Generate Mass and K Matrix
! antype,substr
! seopt,yg_bde,2
! lumpm,1
! m,all,all
! /output,matrix
! solve
! /output
! selist,yg_bde,3
! finish
SOLVE ! solve the resulting system of equations
FINISH
Everytime I swtich between this analysis, I need to comment in/out a big chuck of code. And this looks really terrible.
So How can I organize my code? Or how to make this code modulize? Is there any framework for ANSYS scripting language? (Like scss for css).
I don't think there is exactly such tool, but there is a list of Ansys approved text editors and other helpful programs (digitizers, CAD converters e.t.c).
I guess, if there will be any good framework, it must be listed there.
I suggest to use chunks of code in separate files and then call on these files in main code.
Simplest way to switch parts of code is to use *IF condition in combination with argument. Then you can call on your script as myscript.txt,ARG1,ARG2,ARG3.. where myscript.txt is your script name (also .ans,.mac ...) and ARGx are your switches.
Sample:
! here is the same stuff for any run
*IF,ARG1,EQ,1,then
! here is one variation of the code (e.g. static analysis)
*ENDIF
*IF,ARG1,EQ,2,then
! here is another variation of the code (e.g. dynamic analysis)
*ENDIF
! here is again code used for any variation of the code
If the sample above is in text file called solverswitch.txt, then you would execute various solver options via solverswitch.txt,1 (or solverswitch.txt,2)
I use jedit to edit complex ANSYS files, it recognizes most ANSYS commands and color-codes them for easy reference, besides having various typical functionalities of scripting software.
You have to rename your input files *.ans so that jedit recognizes the ANSYS format.
I'm not sure if this is what you mean by "modulize" the code, but you can create various scripts and call them from a main routine with the command
/INPUT,'file_name','file_extension','relative_path',,0
I work mainly with bridges and I frequently have to do multiple types of analyses (static, dynamic, etc.). My workflow is a base APDL file, e.g. "truss_bridge.txt" which calls other files: "bridge_load.txt", "bridge_design.txt", "bridge_out.txt" for different types of analyses, meshing, outputs, respectively.
I separate these different options inside of each file with the /EOF command and call the type of analysis that I want with the /INPUT command specifying the appropriate line. So my base file for your situation could be something like:
/INPUT,viaduct_materials,txt,direct ! material parameters
/INPUT,viaduct_real_constants,txt,direct ! R.C. parameters
/INPUT,viaduct_design,txt,direct ! Design bridge and meshing
/INPUT,viaduct_load,txt,direct,1 ! LOAD File static analysis
! Post Processing
/INPUT,viaduct_out,txt,direct,1 ! Output file S.A.
/INPUT,viaduct_load,txt,direct,14 ! LOAD File dynamic analysis
! Post Processing
/INPUT,viaduct_out,txt,direct,21 ! Output file D.A.

Play Framework/Scala getting specific files

I have two inputs image and music.
With image i have not problems handling it as
val imageFile = request.body.file("imageFile").get.ref.file
however, musicFile can be multiple and i couldn't find a way to get them with request.body.file("musicFile")
I can get them as request.body.files but this also return the image file now the problem how i am gonna identify them.?
I am using playframework 2.1.1 with Scala
Cheers,
I found my way : you can get all files by request.body.files
and then check the files =>file
file.key.equals("musicFile")

gstreamer: How to use typefind - an example

Would like to see a working example of using typefind. Where we can dynamically add the gstreamer element to the source pad of gstreamer as explained in this page
From that page
Once a media type has been detected, you can plug an element (e.g. a
demuxer or decoder) to the source pad of the typefind element, and
decoding of the media stream will start right after.
Based on the statement above, Want to add a particular type of demuxer when a particular media stream has been identified?
Auto-plugging elements like used in playbin will use typefind to probe the stream in order to select the right demuxer.
Common typefinders are registered here:
http://cgit.freedesktop.org/gstreamer/gst-plugins-base/tree/gst/typefind/gsttypefindfunctions.c
But you can also do that in your own plugin.

Multi-bitrate encoding with ffmpeg

How can I generate multiple versions of the same video file at different bitrates that are properly key-frame aligned? Is it posible with ffmpeg?
Here is an article with example http://www.wowza.com/forums/content.php?192-Encoding-Suggestions-for-Video-on-Demand
The article says that "Multi-birate encoding has not worked using ffmpeg". Is it right?
use two-pass encoding, process first pass with the lowest resolution and then encode again each resolution with pass=2 which will use stats generated with first pass. this will guarantee keyframes to be in excactly the same places.
You should use no-scenecut, keyint and min-keyint options. Set the keyint and min-keyint options to the same values.
For example:
keyint=70:min-keyint=70:no-scenecut