How to extract keyframe from AVI and MPG
Hi guy,
I'm Marco and I'm using JMF; I need for an help because I don't know how to extract keyframes from AVI and MPG files.
I'm using the code posted in this forum for extracting all frame in a video with the adding of an if expression that in the accessFrame method that I report below:
void accessFrame(Buffer frame) {
BufferToImage stopBuffer = new BufferToImage((VideoFormat) frame.getFormat());
Image stopImage = stopBuffer.createImage(frame);
try {
BufferedImage outImage = new BufferedImage(size.width, size.height, BufferedImage.TYPE_INT_RGB);
Graphics og = outImage.getGraphics();
og.drawImage(stopImage, 0, 0, size.width, size.height, null);
Iterator writers = ImageIO.getImageWritersByFormatName("jpg");
ImageWriter writer = (ImageWriter) writers.next();
File f = new File(frame.getSequenceNumber() + ".jpg");
{color:#ff0000}
if ((frame.getFlags() & Buffer.FLAG_KEY_FRAME) != 0){{color}
{color:#ff9900}
ImageOutputStream ios = ImageIO.createImageOutputStream(f);
writer.setOutput(ios);
{color}
{color:#ff9900}
writer.write(outImage);
ios.close();}
} catch (IOException e) {{color}
System.out.println("Error :" + e);
So, I'm able to extract some keyframe, but i'm not sure it is the correct way and my dubt grows out of the fact that without the if expression highlighted in red, it seems that I have more keyframes (those ones with flag ==1040). Another problem is that it works only with AVI because MPG instead of 1040, they have alternate sequence of 32 and 1056.
Cheers and thank u
Marco
my email-id is [email protected].. anyone plz send me the codings for extracting all the frames from a video..
Similar Messages
-
How to Extract Data from SAP and Load it into Essbase
Hi All,
Can you recommend some ways to extract data from SAP and load it into Essbase?. I have no knowledge about SAP, not sure how I can perform this task. Can I use ODI for this job?
Thankshi,
Not sure if this helps but give a try
you can create connection from EAS to SAP .. using a plug-in .. if you have access to oracle Support go for [ID 968961.1]
or
below are steps
1. In EASPATH\console, open components.xml in a text editor.
2. Under <PluginList>, enter <Plugin archiveName="SAP" packageName="com.essbase.eas.sap.ui"/> before the closing </PlugIn> tag.
3. Save and close the file.
4. In EASPATH\console\bin, open admincon.lax in a text editor.
5. Search for lax.class.path= and append ;..\lib\sap_client.jar;..\lib \sap_common.jar to the entry. Save and close the file.
6. In EASPATH\server\bin, open adminsvr.lax in a text editor.
7. Search for lax.nl.java.option.additional, and append -DRFC_INI=EASPATH\server\saprfc.ini. Save and close the file.
8. Create a new environment variable, RFC_INI, with a value of EASPATH\server\saprfc.ini
9. Copy librfc.dll andsapjcorfc.dll to EASPATH\server\bin. You may need to obtain these files from SAP.
let me know if it works :) -
How to extract data from xml and insert into Oracle table
Hi,
I have a large xml file. which will have hundreds of the following transaction tags having column names and there values.
There is a table one of the schema with coulums "actualCostRate","billRate"....etc.
I need to extract the values of these columns and insert into the table
<Transaction actualCostRate="0" billRate="0" chargeable="1" clientID="NikuUK" chargeCode="LCOCD1" externalID="L-RESCODE_UK1-PROJ_UK_CNT_GBP-37289-8" importStatus="N" projectID="TESTPROJ" resourceID="admin" transactionDate="2002-02-12" transactionType="L" units="11" taskID="5017601" inputTypeCode="SALES" groupId="123" voucherNumber="ABCVDD" transactionClass="ABCD"/>
<Transaction actualCostRate="0" billRate="0" chargeable="1" clientID="NikuEU" chargeCode="LCOCD1" externalID="L-RESCODE_US1-PROJ_EU_STD2-37291-4" importStatus="N" projectID="TESTPROJ" resourceID="admin" transactionDate="2002-02-04" transactionType="L" units="4" taskID="5017601" inputTypeCode="SALES" groupId="124" voucherNumber="EEE222" transactionClass="DEFG"/>Re: Insert from XML to relational table
http://www.google.ae/search?hl=ar&q=extract+data+from+xml+and+insert+into+Oracle+table+&btnG=%D8%A8%D8%AD%D8%AB+Google&meta= -
How to extract data from SAP and COBOL using ODI
Hi Folks,
Can you please let me know the procedures in ODI to extract data from SAP and COBOL?
Thank you all for the help.Hi
You can download Patch 8571830 from Oracle metalink.
It has a new technology "SAP ABAP" and KMs to extract and load data -
RKM SAP ERP and LKM SAP ERP to Oracle.
Thanks -
How to extract data from Buffer and create a RTP stream
Hi
I'm working on a project where I need to interrupt a media stream (video and audio) and extract the data. Send the data with a custom protocol. On the recieveing side I would like to reconstruct the stream using only the data chunks.
I'm currently looking at [DataSourceReader.java|http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/solutions/DataSourceReader.java] and more specifically at a method like printDataInfo(Buffer buffer) to extract the data.
Is it possible to create a RTP stream, only having access to the byte array "data" in Buffer ?
Thanks in advance.camelstrike wrote:
Hi
I'm working on a project where I need to interrupt a media stream (video and audio) and extract the data. Send the data with a custom protocol. On the recieveing side I would like to reconstruct the stream using only the data chunks.
I'm currently looking at [DataSourceReader.java|http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/solutions/DataSourceReader.java] and more specifically at a method like printDataInfo(Buffer buffer) to extract the data.
There are a couple of different ways to get the data. Reading it from inside a DataSink is perfectly fine...
Is it possible to create a RTP stream, only having access to the byte array "data" in Buffer ?Yes and no.
[http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/solutions/CustomPayload.html]
You need to know the format of the media in addition to the actual media data... -
How to extract data from CLOB and insert them into DB?
Hi PL/SQL Gurus,
I have no experience in PL/SQL, but I have a requirement now where I have to use it.
We have a table with 10 columns, one of them is a CLOB and it holds XML data. The XMLs are very huge in size.
Two new columns are added to the table and the data has to be filled for the existing records from the corresponding XML. The XML has all the data as attributes. I started searching on the internet and tried if I could extract the data out of XML.
SELECT extractValue(value(x), '/Order/Package/@Code',
'xmlns:ns0="http://mycompany.com/Order/OrderType.xsd"' )
FROM ORDER_TABLE A
, TABLE(
XMLSequence(
extract(
xmltype(A.XML_DATA)
, '/ns0:Root'
, 'xmlns:ns0="http://mycompany.com/Order/OrderType.xsd"'
) x;
But this isn't working. Could anyone please provide some ideas.
I just want to confirm that I am able to extract data. Once this is done I would like to create a procedure so that all the existing records can be updated.
Thanks in advance.
Regards,
FazzyCan this be acheived using a SQL statement.Yes, you can do it with the DML error logging clause.
Here's a quick example I've just set up :
Base table
SQL> create table order_table (
2 order_id number,
3 package_code varchar2(30),
4 package_desc varchar2(100),
5 xml_data clob
6 );
Table created
SQL> alter table order_table add constraint order_table_pk primary key (order_id);
Table altered
Adding data...
SQL> insert into order_table (order_id, xml_data)
2 values (1, '<?xml version="1.0" encoding="UTF-8"?>
3 <ns0:Root xmlns:ns0="http://mycompany.com/Order/OrderType.xsd" BookingDate="2009-06-07">
4 <ns1:OrderKey xmlns:ns1="http://mycompany.com/Order/OrderKeyTypes.xsd" SystemCode="THOMAS" Id="458402-TM1" Version="1"/>
5 <ns0:Package Code="0001" Desc="ProductName1"/>
6 <ns0:PromotionGroup Code="DSP" Name="OrderThomasPortal"/>
7 <ns0:Promotion Code="TH902" Name="OrderThomasPortal" SellingName="OrderThomasPortal" BackOfficeName="OrderThomasPortal"/>
8 <ns0:FinancialSupplier Code="HHT" Name="NYOrdSupp"/>
9 <ns0:SellingCurrency Code="EUR" Name="Euro"/>
10 <ns0:Owner ClientId="02654144" ClientMandator="T" ClientSystem="ROSY"/>
11 <ns0:Agent PersonInAgency="5254" AgentCode="000009" CommissionAmount="2.8" CommissionDueDate="2009-07-01+02:00" VatOnCommission="0"/>
12 </ns0:Root>');
1 row inserted
SQL> insert into order_table (order_id, xml_data)
2 values (2, '<?xml version="1.0" encoding="UTF-8"?>
3 <ns0:Root xmlns:ns0="http://mycompany.com/Order/OrderType.xsd" BookingDate="2009-06-07">
4 <ns1:OrderKey xmlns:ns1="http://mycompany.com/Order/OrderKeyTypes.xsd" SystemCode="THOMAS" Id="458402-TM1" Version="1"/>
5 <ns0:Package Code="0002" Desc="ProductName2/>
6 <ns0:PromotionGroup Code="DSP" Name="OrderThomasPortal"/>
7 <ns0:Promotion Code="TH902" Name="OrderThomasPortal" SellingName="OrderThomasPortal" BackOfficeName="OrderThomasPortal"/>
8 <ns0:FinancialSupplier Code="HHT" Name="NYOrdSupp"/>
9 <ns0:SellingCurrency Code="EUR" Name="Euro"/>
10 <ns0:Owner ClientId="02654144" ClientMandator="T" ClientSystem="ROSY"/>
11 <ns0:Agent PersonInAgency="5254" AgentCode="000009" CommissionAmount="2.8" CommissionDueDate="2009-07-01+02:00" VatOnCommission="0"/>
12 </ns0:Root>');
1 row inserted
SQL> commit;
Commit complete
{code}
Note that the second row inserted contains a not well-formed XML (no closing quote for the /Root/Package/@Desc attribute).
*Creating the error logging table...*
{code}
SQL> create table error_log_table (
2 ora_err_number$ number,
3 ora_err_mesg$ varchar2(2000),
4 ora_err_rowid$ rowid,
5 ora_err_optyp$ varchar2(2),
6 ora_err_tag$ varchar2(2000)
7 );
Table created
{code}
*Updating...*
{code}
SQL> update (
2 select extractvalue(doc, '/ns0:Root/ns0:Package/@Code', 'xmlns:ns0="http://mycompany.com/Order/OrderType.xsd"') as new_package_code
3 , extractvalue(doc, '/ns0:Root/ns0:Package/@Desc', 'xmlns:ns0="http://mycompany.com/Order/OrderType.xsd"') as new_package_desc
4 , package_code
5 , package_desc
6 from (
7 select package_code
8 , package_desc
9 , xmltype(xml_data) doc
10 from order_table t
11 )
12 )
13 set package_code = new_package_code
14 , package_desc = new_package_desc
15 log errors into error_log_table ('My update process')
16 reject limit unlimited
17 ;
1 row updated
SQL> select order_id, package_code, package_desc from order_table;
ORDER_ID PACKAGE_CODE PACKAGE_DESC
1 0001 ProductName1
2
{code}
One row has been updated as expected, the other has been rejected and logged into the error table :
{code}
SQL> select * from error_log_table;
ORA_ERR_NUMBER$ ORA_ERR_MESG$ ORA_ERR_ROWID$ ORA_ERR_OPTYP$ ORA_ERR_TAG$
31011 ORA-31011: XML parsing failed AAAF6PAAEAAAASnAAB U My update process
ORA-19202: Error occurred in XML processing
LPX-00244: invalid use of less-than ('<') character (use <)
Error at line 5
ORA-06512: at "SYS.XMLTYPE", line 272
ORA-06512: at line 1
{code} -
How to extract data from idocs and store to target
I recently started on BODS project, i am really not sure how does teh idocs work.
Is the sap r3 produces Idocs and the bods need to perform the ETL on idocs? or is it the otherway?
Thank you very much for the helpful info.
Kind regards.hi,
Not sure if this helps but give a try
you can create connection from EAS to SAP .. using a plug-in .. if you have access to oracle Support go for [ID 968961.1]
or
below are steps
1. In EASPATH\console, open components.xml in a text editor.
2. Under <PluginList>, enter <Plugin archiveName="SAP" packageName="com.essbase.eas.sap.ui"/> before the closing </PlugIn> tag.
3. Save and close the file.
4. In EASPATH\console\bin, open admincon.lax in a text editor.
5. Search for lax.class.path= and append ;..\lib\sap_client.jar;..\lib \sap_common.jar to the entry. Save and close the file.
6. In EASPATH\server\bin, open adminsvr.lax in a text editor.
7. Search for lax.nl.java.option.additional, and append -DRFC_INI=EASPATH\server\saprfc.ini. Save and close the file.
8. Create a new environment variable, RFC_INI, with a value of EASPATH\server\saprfc.ini
9. Copy librfc.dll andsapjcorfc.dll to EASPATH\server\bin. You may need to obtain these files from SAP.
let me know if it works :) -
How to extract data from SAP 4.7 and upload data to SAP ECC 6.0
Hi,
How to extract data from SAP 4.7 and upload data to SAP ECC 6.0? Can i use BDC,BAPI,LSMW? Help me please.hi
good
both works not possible simultaneously.
If you want to do it in two separate task than you can use the GUI_UPLOAD function module to fulfill your requirement.
thanks
mrutyun^ -
The article is
"How to extract audio from a movie file"
But it only tells you how to extract when you first drag the movie file into the project. This much is obvious when a dialog presents you with a checkbox asking if you want to "Extract the audio track" ... Duh
Here was my workflow:
Dragged the movie file into my project
I checked "Extract the audio track"
I shifted the "Movie Start Time"
Extracted audio track did not shift with the movie
I deleted the extracted audio and played the audio directly from the movie
Now, I need the audio extracted again at the current movie position
I knew where this option was in the Logic 9 menus, but I'm having trouble finding it in Logic X
Is this option still available, or has it been removed?Solved:
I found the menu option for extracting or re-extracting the movie audio. BTW, the original article:
Logic Pro 9.1: How to extract audio from a movie file in 64-bit mode
should really also state the menu command for extracting the audio, not just the procedure when first adding the movie to the project.
Here's the menu command:
File>Movie>Import Audio from Movie
Cheers -
How to extract text from a PDF file?
Hello Suners,
i need to know how to extract text from a pdf file?
does anyone know what is the character encoding in pdf file, when i use an input stream to read the file it gives encrypted characters not the original text in the file.
is there any procedures i should do while reading a pdf file,
File f=new File("D:/File.pdf");
FileReader fr=new FileReader(f);
BufferedReader br=new BufferedReader(fr);
String s=br.readLine();any help will be deeply appreciated.jverd wrote:
First, you set i once, and then loop without ever changing it. So your loop body will execute either 0 times or infinitely many times, writing the same byte every time. Actually, maybe it'll execute once and then throw an ArrayIndexOutOfBoundsException. That's basic java looping, and you're going to need a firm grip on that before you try to do anything as advanced as PDF reading. the case.oops you are absolutely right that was a silly mistake to forget that,
Second, what do the docs for getPageContent say? Do they say that it simply gives you the text on the page as if the thing were a simple text doc? I'd be surprised if that's the case.getPageContent return array of bytes so the question will be:
how to get text from this array? i was thinking of :
private void jButton1_actionPerformed(ActionEvent e) {
PdfReader read;
StringBuffer buff=new StringBuffer();
try {
read = new PdfReader("d:/getjobid2727.pdf");
read.getMetaData();
byte[] data=read.getPageContent(1);
int i=0;
while(i>-1){
buff.append(data);
i++;
String str=buff.toString();
FileOutputStream fos = new FileOutputStream("D:/test.txt");
Writer out = new OutputStreamWriter(fos, "UTF8");
out.write(str);
out.close();
read.close();
} catch (Exception f) {
f.printStackTrace();
"D:/test.txt" hasn't been created!! when i ran the program,
is my steps right? -
How to extract data from CRICKET MCS410CA using RS232
I need to extract data from CRICKET and use it for internal Localization of mobile robot.How to use the extracted data to form a map...
You seem to have the same exact project as someone else... http://forums.ni.com/t5/LabVIEW/cricket-integration/m-p/2052334
Hmmmmm.....
Some might think you're all in the same class.... -
How to extract data from SAP in FDM 11121
I came across some documents from version 11113, says there is a SAP adapter, however ,when I check 11121 there's no such adapter, does anyone know how to extract data from SAP in FDM 11121?
I download a package from Bristlecone, but I dont see any xml files in it, just a bunch of dll and I didn't find any instructions on how to set up/configure in FDM, it just explained how to register in SAP app server and client.
Hyperion 11113 has readme on sap adapter(Hyperion Readme Template), but I cannot find the same readme file in 11121, all I can find is ERP Integration Adapter document. any idears where I can find at least a readme document? -
How to extract data from web URL
I was doing one project which need to extract data from web pages and then analyze these data. the question is how to extract data from there, using html parser? need help, thanks a lot
I was doing one project which need to extract data
from web pages and then analyze these data. the
question is how to extract data from there, using
html parser? need help, thanks a lotTry this:
http://java.sun.com/docs/books/tutorial/networking/urls/readingURL.html
Or, like you said yourself, use an HTML parser:
http://java-source.net/open-source/html-parsers -
How to extract data from Chart History?
Dear all, I have read a lot of posts, but still don't understand how to extract data from Chart history.
Suppose you acquired 1024 points of data every time, then use "build array" to build an array, then send to intensity chart to show, then save the history into a .txt file, but how to extact data from the file?
How Labview store the data in the 2D history buffer?
Anybody has any examples?The simplest would be to save the 2D array as a spreadsheet file, the read it back the same way.
Maybe the attached simple example can give you some ideas (LabVIEW 7.1). Just run it. At any time, press "write to file". At any later time, you can read the save data into the second history chart.
If you are worried about performance, it might be better to use binary files, but it will be a little more complicated. See how far you get.
LabVIEW Champion . Do more with less code and in less time .
Attachments:
IntensityChartHistorySave.vi 79 KB -
How to extract data from planning book
nu t apo. need help regarding how to extract data from planning book givn the planning book name , view name & some key figures.
Total Demand (Key Figure DMDTO):
o Forecast
o Sales Order
o Distribution Demand (Planned)
o Distribution Demand (Confirmed)
o Distribution Demand (TLB-Confirmed)
o Dependent Demand
Total Receipts (Key Figure RECTO):
o Distribution Receipt (Planned)
o Distribution Receipt (Confirmed)
o Distribution Receipt (TLB-Confirmed)
o In-Transit
o Production (Planned)
o Production (Confirmed)
o Manufacture of Co-Products
Stock on Hand (Key Figure STOCK):
o Stock on Hand (Excluding Blocked stock)
o Stock on Hand (Including Blocked stock)
In-Transit Inventory (Cross-company stock transfers)
Work-in-progress (Planned orders / Process orders with start date in one period and finish date in another period)
Production (Planned), Production (Confirmed) and Distribution Receipt elements need to be converted based on Goods Receipt date for projected inventory calculation.Hello Debadrita,
Function Module BAPI_PBSRVAPS_GETDETAIL2 or BAPI_PBSRVAPS_GETDETAIL can help you.
For BAPI BAPI_PBSRVAPS_GETDETAIL, the parameters are:
1) PLANNINGBOOK - the name of your planning book
2) DATA_VIEW - name of your data view
3) KEY_FIGURE_SELECTION - list of key figures you want to read
4) SELECTION - selection parameters which describe the attributes of the data you want to read (e.g. the category or brand). This is basically a list of characteristics and characteristic values.
BAPI_PBSRVAPS_GETDETAIL2 is very similar to BAPI_PBSRVAPS_GETDETAI but is only available from SCM 4.1 onwards.
For the complete list of parameters, you can go to transaction SE37, enter the function module names above and check out the documentation.
Please post again if you have questions.
Hope this helps.
Maybe you are looking for
-
CF10 Websockets not working with iOS 6.1.3 iPad
Hi all. I was reading and trying out Adobe blog posts on CF Websockets and discovered that the code doesn't work on my iPad. My server is CF10 update 11 (IIS7.5) and the iPad is on iOS 6.1.3. All of the tutorials I could find work great with PC bro
-
Can't open new tab by clicking + button or from File
I am unable to open new tab by clicking the + box or even from File - New Tab. It has been working perfectly but failed since last week. I have tried to uninstall and reinstall the program but the trouble seems remaining unchanged.Is my Firefox affec
-
How do I set a customized lock screen in iOS7?
How do I set a customized lock screen in iOS7?
-
Can I export a sequence without rerendering the entire thing again?
Using the latest FCP.. Im working on a project with some heavy boris effects stuff... SLOW SLOW rendering.. The entire sequence is already rendered.. but when I go to export the sequence as a QT movies.. using the current settings.. it wants to reren
-
I know someone more then likely uses livejournal and has a mac. Ok i am wanting to make a blog using iweb but i have 4 years of livejournal entries that i dont want to get rid of. what is the best way of linking the two so i can work from iweb and pu