Splitting 3gp file in JMF
I want to split a .3gp video into 2 separate .3gp file using java. so is it possible to do so? the .3gp file structure will also be a great help. i searched in google but did not find any suitable specification. thus if any one help, it would be great......
please help me in this .... i am really stuck. i cant find any code to split 3gp file neither i can get any file format specification , byte wise....
so please help ...
Similar Messages
-
Play .3gp-files with JMF (jffmpeg)
Hello,
for a MMS-Application I'm trying to show 3gp-files with Java. I heard that it should work with jffmpeg but I still couldn't get it to work.
I added the Codec:
String JFFMPEG_VIDEO = "net.sourceforge.jffmpeg.VideoDecoder";
try {
Codec video = (Codec) Class.forName(JFFMPEG_VIDEO).newInstance();
PlugInManager.addPlugIn(JFFMPEG_VIDEO,
video.getSupportedInputFormats(),
video.getSupportedOutputFormats(null),
PlugInManager.CODEC);
} catch (Exception e) {
e.printStackTrace();
}and then started the player.
It already works for mpg-Videos, but if the file-extension is .3gp the player throws a javax.media.NoPlayerException: Cannot find a Player for : file://C:/test.3gp
When I change the file-name to test.mpg the player initializes but doen't show a picture.
How can I register the 3gp-extension? Or is anything else missing?
Thanks in advance for any hint :-)I still didn't get it to work as I need it, but I made some progress so far:
Instead of jffmpeg I used the FOBS for JMF Package (http://fobs.sourceforge.net/index.html) in addition with the JMF.
Using this package allows you to play a 3gp-Video in Swing that is stored in your filesystem (!).
I'm still having two problems with this solution:
- I use a Java Webstart-framework and can't acces the user's harddisk, so I need to play the 3gp-Videos directly from memory (they are stored as byte[] in a database), but the current version of FOBS is limited to 3gp-Playback only from filesystem.
- Each user of the application has to download and install JMF and FOBS for their OS (system-specific libraries). Especially FOBS is not always very easy to install, because it needs to change some of the jmf.properites. This can not be done with the JAR-distribution-System of WebStart and I'm expecting problems, when the users try to install both packages on their own.
If you are developing a plain Swing-Application you might be satisfied with the possibilities of FOBS and JMF.
Good luck :-) -
Actually the JMF does not support 3gp files. Is the support of this type of file planned?
If no, can somebody say me which would be the process to implement it into JMF ?
- first develop one demultiplexer?
- develop a AMR codec?
- use the h.263 codec?
Please, help me.
Very thanks!
MarcHi Marc,
we also do things with 3gp files...
for now we use ffmpeg to, but I am also looking at the possibilty of using JMF. As far as I know the 3gp file format IS the mp4 file format which is based on the Quicktime mov format. In ffmpeg it is (using -f mov) to decode 3gp files by treating them like quicktime files.
Actually the JMF does not support 3gp files. Is the
support of this type of file planned? I wish it would be so - but as mobile phones with video support will become more popular the demand for software capable of handling this format will increase
If no, can somebody say me which would be the process
to implement it into JMF ?
- first develop one demultiplexer?since the quicktime demultiplexer (mov.c) of ffmpeg can handle 3gp files, it should be (maybe) possible with JMF�s quicktime demultiplexer...
- develop a AMR codec?you would need to do that... a reference C implementation of the AMR codec is available for download on the 3gpp homepage.
- use the h.263 codec?3gp files can contain h.263 or MPEG-4 video streams... -
How to capture the video in a file using JMF-RTP?
Please someone help in capturing the live streaming in a file using JMF......
Thanks..Hi, I have a problem with RTPExport output video files. One side streams H263/RTP(AVTransmit2.java) and other write this steam to a file by RTPExport.java. When network conditions are ideal, output video file has same fps and same number of frames like original file. Problem occures, when theres packet lost in network, then output file has different fps,and also has less frames like original video(because it didnt write missing frames to file, and thats why it get shorter). Pls how can I achieve output file that will have the same fps like original one? How to write to file an identical copy of what I can see while receiveing video with AVReceive2.java? Its there a way to modifi rtpexport or avreceiver to do this? Thanks!
-
Using Windows Media player to view .3gp files
I really need help opening up a .3gp file that was sent from a cell phone. It said that I had to choose a file to open it with, and I chose Windows media player, but I keep getting this message.......Windows Media Player cannot play the file. The Player
might not support the file type or might not support the codec that was used to compress the file.
Can someone please tell me how I can correct this problem. I must see this video right away.
Thanks!Looking for a way to play 3GP or 3G2 files on your computer? If so,
there are a couple of ways you can do this. First of all, 3GP files are
usually movies that are taken from a mobile phone.
If you want to play these on your computer, you can either install a
codec or download third-party software to play these files. In this
article, I will try to mention all the different ways to play 3GP and
3G2 files.
Method 1 – Install Video Codec
Firstly, if you want to play 3GP files in Windows Media Player, you have to install one of the two following programs:
Haali media splitter
FFFDShow MPEG_4 Video Decoder
However, during the installation, you also have to select a specific configuration in order for it to work properly.
For FFDShow, you need to make sure that AMR is enabled on the Audio
Decoder screen and H263(+) is enabled on the Video Decoder screen.
For the Haali Media Splitter program, just make sure that the Enable MP4 support box is checked.
Method 2 – Convert File
The second way you can play these videos is to simply convert them.
This might be a better way so that you can play these videos on anyone’s
computer or stream them to devices like the XBox, etc. -
How to split pdf files also how to downsize a pdf file?
how to split pdf files also how to downsize a pdf file?
Hi Ali,
If the PDF file you're starting with is larger than 100MB, ExportPDF won't be able to convert it.
To convert a file of that size and to create separate files, you'll need Adobe Acrobat. You'd need Acrobat to divide the file into smaller chunks for ExportPDF anyhow, so Acrobat is probably the best solution for you. You can learn more about Acrobat here: http://www.adobe.com/products/acrobat.html
Kindest regards, Stacy -
Importing 3GP Files into a Final Cut Timeline
I'm trying to import 3GP files from a cell phone video camera into Final Cut to edit. I've read that it can be done, but I'm having difficulties setting the correct presets in FCP.
When I import a clip into FCP I get the following settings in the clip window:
FRAME SIZE: 352 x 288
Vid Rate: 10 fps
Compressor: H.263
Aud Rate: 8.0 KHZ
That said, I cannot replicate these settings when I try to set the "Sequence Settings" and therefore, the clip does not appear in the timeline when I drag it down. Is there a preset for using this file format? Is there an easier way to do this?
Thank you in advance for your help.as your mobile phone footage is a non standard tv format, you really need to start off with a proper sequence setting, SD PAL, SD NTSC 4:3 then import your footage into the browser, drop it onto the timeline and let fcp auto conform to the sequence. You could also look at compressor to convert it to the right frame size, or use mpeg streamclip to turn the footage into DV QT movie
but as the mobile footage is small and highly compressed @10 frames a sec it is never going to look great anyway -
How to split a file by using Native Format Builder?
Hi all,
Please help me with this issue.
In this project we need to split a file to save in the db.
Following is the sample code and I would like to split this from 'BOH--------------' to 'BOT---------------' (as in BOLD)
But as you can see sometimes 'BOT' line comes up multiple times so I need to skip few 'BOT's until I meet new 'BOH' line.
I guess I have to use complex type in Native Format Builder, but I'm not sure how to..
Please help me with this situation.
Thanks in advance.
BFH0000000101TYO988 203PROD1108021046JP000869
BCH00000002020811110807D110801
BOH000001690316300561110807 JPY0
BKT0000017006 000011 015X 988 AXSS00000000 00000000 00000000
BKS00000171241108010000119881734947154 0 0FFVV 16300561 TKTTTYO/TYO TDHAWK/JL
*BKS00000172301108010000119881734947154 00000006200{0000000000{ SW 0000000200{BP 0000000215{0000007233{0000000000{ JPY0*
*BKS00000173301108010000119881734947154 00000000000{0000000000{ YQ 0000000618{ 0000000000{0000000000{0000000000{ JPY0*
*BKS00000174391108010000119881734947154 0I 000000000000000{ 000000000000000{000000000000000{0000000000{ JPY0*
BKS00000175461108010000119881734947154 0 1/2/NON-REF/MZP1M
BKI00000176631108010000119881734947154 01 03AUG03AUG HND GMP OZ 1035 M 03AUG 2020 OK20K MZPH1M
BKI00000177631108010000119881734947154 02 04AUG03SEP GMP HND OZ 1045 M 06AUG 1530 OK20K MZPH1M
BAR00000178641108010000119881734947154 0 JPY62000/ JPY2000SW JPY2150BP JPY6180YQ JPY72330 13150RX5 0
BAR00000179651108010000119881734947154 0NAGASHIMA/HIDEKIMR
BAR00000180661108010000119881734947154 01CASH
BMP00000181731108010000119881734947154 0 C
BKF00000182811108010000119881734947154 0 103AUG11 TYO OZ SEL 387.28MZPH1M OZ TYO 387.28MZPH1M
BKF00000183811108010000119881734947154 0 2 NUC774.56END ROE80.044
*BKP0000018484110801000011CA 0000007233{ 0000000000000000{0000007233{ JPY0*
BKT0000018506 000012 015X 988 AXSS00000000 00000000 00000000
BKS00000186241108010000129881734947155 1 0FFVV 16300561 TKTTTYO/TYO TDHAWK/JL
*BKS00000187301108010000129881734947155 10000006200{0000000000{ SW 0000000200{BP 0000000215{0000007233{0000000000{ JPY0*
*BKS00000188301108010000129881734947155 10000000000{0000000000{ YQ 0000000618{ 0000000000{0000000000{0000000000{ JPY0*
*BKS00000189391108010000129881734947155 1I 000000000000000{ 000000000000000{000000000000000{0000000000{ JPY0*
BKS00000190461108010000129881734947155 1 1/2/NON-REF/MZP1M
BKI00000191631108010000129881734947155 11 03AUG03AUG HND GMP OZ 1035 M 03AUG 2020 OK20K MZPH1M
BKI00000192631108010000129881734947155 12 04AUG03SEP GMP HND OZ 1045 M 06AUG 1530 OK20K MZPH1M
BAR00000193641108010000129881734947155 1 JPY62000/ JPY2000SW JPY2150BP JPY6180YQ JPY72330 13150RX5 0
BAR00000194651108010000129881734947155 1IWATA/HITOSHIMR
BAR00000195661108010000129881734947155 11CASH
BMP00000196731108010000129881734947155 1 C
BKF00000197811108010000129881734947155 1 103AUG11 TYO OZ SEL 387.28MZPH1M OZ TYO 387.28MZPH1M
BKF00000198811108010000129881734947155 1 2 NUC774.56END ROE80.044
*BKP0000019984110801000012CA 0000007233{ 0000000000000000{0000007233{ JPY0*
BKT0000020006 000013 017X 988 WSPN00000000 00000000 00000000
BKS00000201241108010000139882898050606 0 0FFFF 16300561 TKTTNGO/NGO N7ZAXW/1P
*BKS00000202301108010000139882898050606 00000005000{0000000000{ SW 0000000250{BP 0000000154{0000007539{0000000000{ JPY0*
*BKS00000203301108010000139882898050606 00000000000{0000000000{ KX 0000000199{YQ 0000001936{0000000000{0000000000{ JPY0*
*BKS00000204391108010000139882898050606 0I 000000000000000{ 000000000000000{000000000000000{0000000000{ JPY0*
BKS00000205461108010000139882898050606 0 NON-ENDS/QZA14/
BKI00000206631108010000139882898050606 01X02OCT02OCT NGO ICN OZ 121Q 02OCT 1200 OK20K QLZA14D
BKI00000207631108010000139882898050606 02O02OCT02OCT ICN REP OZ 737Q 02OCT 1920 OK20K QLZA14D
BKI00000208631108010000139882898050606 03X10OCT10OCT REP ICN OZ 738Q 10OCT 2340 OK20K QLZA14D
BKI00000209631108010000139882898050606 04 11OCT11OCT ICN NGO OZ 122Q 11OCT 0910 OK20K QLZA14D
BAR00000210641108010000139882898050606 0JPY 50000/ XT 21350SW 2500BP 1540JPY 75390 52350NT 9
BAR00000211651108010000139882898050606 0WATANABE/FUMIE.MS
BAR00000212661108010000139882898050606 01VI 4297 XXXXXXXXX 1870P0812
BKF00000213811108010000139882898050606 0 1NGO OZ X/SEL OZ REP 312.32OZ X/SEL OZ NGO 312.32NUC624.64 END ROE80.044OZ XT1990KX 1936
BKF00000214811108010000139882898050606 0 20YQ
*BKP0000021584110801000013CCVI4297 0000007539{4297690004451870 0812 701410 0000000000000000{0000000000{ JPY0*
*BKP0000021684110801000013CA 0000000000{ 0000000000000000{0000000000{ JPY0*
BKT0000021706 000014 015X 988 INFI00000000 00000000 00000000
BKS00000218241108010000149885195702276 678841696569480 5FFVV 16300561 TKTTNGO/NGO JMERJU/1F
*BKS00000219301108010000149885195702276 60000002500{0000000000{ SW 0000000250{BP 0000000215{0000003583{0000000000{ JPY0*
*BKS00000220301108010000149885195702276 60000000000{0000000000{ YQ 0000000618{ 0000000000{0000000000{0000000000{ JPY0*
*BKS00000221391108010000149885195702276 6I 000000000000000{ 000000000000000{000000000000000{0000000000{ JPY0*
BKS00000222461108010000149885195702276 6 NON-REF/QZA7
BKI00000223631108010000149885195702276 61O16SEP16SEP NGO ICN OZ 123 Q 16SEP 1745 OK20K QKPMZA7
BKI00000224631108010000149885195702276 62 22SEP22SEP ICN NGO OZ 124 Q 22SEP 1500 OK20K QKPMZA7
BAR00000225641108010000149885195702276 6JPY 25000/ 2500SW 2150BP 6180YQJPY 35830INFI78840 99999999 N0
BAR00000226651108010000149885195702276 6INUKAI/HIROKO MS NTS REF 3607438
BAR00000227661108010000149885195702276 61JC35875900009516110115/ C 018627*
BMP00000228731108010000149885195702276 6 NTS REF 3607438 ANU
BKF00000229811108010000149885195702276 6 116SEP11NGO OZ SEL156.16OZ NGO156.16NUC312.32END ROE80.044
*BKP0000023084110801000014CCJC3587 0000003583{3587590000951611 0115 018627 0000000000000000{0000000000{ JPY0*
*BKP0000023184110801000014CA 0000000000{ 0000000000000000{0000000000{ JPY0*
BKT0000023206 000015 014X 988 GDSL00000000 00000000 00000000
BKS00000233241108010000159885340399785 458803403997853 6FFVV 16300561 TKTTNRT/NRT V7R5WC/1V
*BKS00000234301108010000159885340399785 40000004000{0000000000{ YQ 0000000618{BP 0000000215{0000005087{0000000000{ JPY0*
*BKS00000235301108010000159885340399785 40000000000{0000000000{ SW 0000000204{OI 0000000050{0000000000{0000000000{ JPY0*
*BKS00000236391108010000159885340399785 4I 000000000000000{ 000000000000000{000000000000000{0000000000{ JPY0*
BKS00000237461108010000159885340399785 4 NON-REF-QZA7
BKI00000238631108010000159885340399785 41 08AUG08AUG NRT ICN OZ 107 Q 08AUG 0900 OK20K QHA2ZA7
BKI00000239631108010000159885340399785 42 10AUG10AUG ICN NRT OZ 106 Q 10AUG 1510 OK20K QHA2ZA7
BAR00000240641108010000159885340399785 4 JPY40000/ JPY500OI JPY10370XT JPY50870 588002LNCK U3
BAR00000241651108010000159885340399785 4TAKAHASHI/AYA MS
BAR00000242661108010000159885340399785 41CASH
BKF00000243811108010000159885340399785 4 1FP CASH FC 8AUG TYO OZ SEL 249.86QHA2ZA7 OZ TYO 249.86QHA2ZA7 NUC499.72END ROE80.044 XT
BKF00000244811108010000159885340399785 4 2 6180YQ 2150BP 2040SW
*BKP0000024584110801000015CA 0000005087{ 0000000000000000{0000005087{ JPY0*
*BOT000002469316300561110807 00000000030675{00000000019553{00000000000000{00000000006775{00000000000000{SALE 00000000000000{JPY0*
*BKT0000024706 000016 010 988 INFI00000000 00000000 00000000 A*
*BKS00000248241108010000169885195419735 678841696711651 4 16300561 RFND /*
*BKS00000249301108010000169885195419735 60000005700}0000000000{ OI 0000000050}SW 0000000204}0000006087}0000000000{ JPY0*
*BKS00000250301108010000169885195419735 60000000000{0000000000{ BP 0000000215}YQ 0000000518}0000000000{0000000000{ JPY0*
*BKS00000251301108010000169885195419735 60000000000{0000000000{ CP 0000000600{ 0000000000{0000000000{0000000000{ JPY0*
*BKS00000252391108010000169885195419735 6I 000000000000000{ 000000000000000{000000000000000{0000000000{ JPY0*
BKS00000253451108070000169885195419735 2 1200 110727
BAR00000254651108010000169885195419735 6SATO/YUKIMR
BKP0000025583110801000016 9889AZ5E61I6V
BKP0000025684110801000016CA 0000006087} 0000000000000000{0000006087} JPY0
BKT0000025706 000017 010 988 INFI00000000 00000000 00000000 A
BKS00000258241108010000179885195419736 078841696711481 1 16300561 RFND /
*BKS00000259301108010000179885195419736 00000005700}0000000000{ OI 0000000050}SW 0000000204}0000006087}0000000000{ JPY0*
*BKS00000260301108010000179885195419736 00000000000{0000000000{ BP 0000000215}YQ 0000000518}0000000000{0000000000{ JPY0*
*BKS00000261301108010000179885195419736 00000000000{0000000000{ CP 0000000600{ 0000000000{0000000000{0000000000{ JPY0*
*BKS00000262391108010000179885195419736 0I 000000000000000{ 000000000000000{000000000000000{0000000000{ JPY0*
BKS00000263451108070000179885195419736 3 1200 110727
BAR00000264651108010000179885195419736 0KANG/SOONBOKMS
BKP0000026583110801000017 9889AZ5E61I6W
BKP0000026684110801000017CA 0000006087} 0000000000000000{0000006087} JPY0
*BOT000002679316300561110807 00000000012174}00000000012174}00000000000000{00000000000774}00000000000000{RFND 00000000000000{JPY0*
*BOT000002689416300561110807 00000000018501{00000000007379{00000000000000{00000000006001{00000000000000{ 00000000000000{JPY0*
BOH000002690316300863110807 JPY0
BKT0000027006 000018 015X 988 AXSS00000000 00000000 00000000
BKS00000271241108010000189881734547779 3 0FFVV 16300863 TKTTNGO/NGO 47F8J6/JL
BKS00000272301108010000189881734547779 30000005000{0000000000{ SW 0000000250{BP 0000000215{0000006083{0000000000{ JPY0
BKS00000273301108010000189881734547779 30000000000{0000000000{ YQ 0000000618{ 0000000000{0000000000{0000000000{ JPY0
BKS00000274391108010000189881734547779 3I 000000000000000{ 000000000000000{000000000000000{0000000000{ JPY0
BKS00000275461108010000189881734547779 3 1/2/NON-REF/MZP1M
BKI00000276631108010000189881734547779 31 07AUG07AUG NGO ICN OZ 121 M 07AUG 1200 OK20K MZP1M
BKI00000277631108010000189881734547779 32 08AUG07SEP ICN NGO OZ 124 M 09AUG 1500 OK20K MZP1M
BAR00000278641108010000189881734547779 3 JPY50000/ JPY2500SW JPY2150BP JPY6180YQ JPY60830 13150OL2 0
BAR00000279651108010000189881734547779 3KAMEGAI/NORIOMR
BAR00000280661108010000189881734547779 31CASH
BMP00000281731108010000189881734547779 3 C
BKF00000282811108010000189881734547779 3 107AUG11 NGO OZ SEL 312.32MZP1M OZ NGO 312.32MZP1M N
BKF00000283811108010000189881734547779 3 2UC624.64END ROE80.044
BKP0000028484110801000018CA 0000006083{ 0000000000000000{0000006083{ JPY0
BKT0000028506 000019 014X 988 AXSS00000000 00000000 00000000
BKS00000286241108010000199881734547801 4 0FFVV 16300863 TKTTNGO/NGO 5Y5RQQ/JL
BKS00000287301108010000199881734547801 40000008350{0000000000{ SW 0000000250{BP 0000000215{0000009433{0000000000{ JPY0
BKS00000288301108010000199881734547801 40000000000{0000000000{ YQ 0000000618{ 0000000000{0000000000{0000000000{ JPY0
BKS00000289391108010000199881734547801 4I 000000000000000{ 000000000000000{000000000000000{0000000000{ JPY0
BKI00000290631108010000199881734547801 41 16AUG NGO ICN OZ 123 C 16AUG 1745 OK30K CRTOZKR
BKI00000291631108010000199881734547801 42 16AUG ICN NGO OZ 9122 Y 18AUG 1835 OK20K YRTOZKR
BAR00000292641108010000199881734547801 4 JPY83500/ JPY2500SW JPY2150BP JPY6180YQ JPY94330 13150GI3 0
BAR00000293651108010000199881734547801 4HIRAI/SHUJIMR
BAR00000294661108010000199881734547801 41CASH
BMP00000295731108010000199881734547801 4 C
BKF00000296811108010000199881734547801 4 116AUG11 NGO OZ SEL 624.65CRTOZKR OZ NGO 418.51YRTOZ
BKF00000297811108010000199881734547801 4 2KR NUC1043.16END ROE80.044
BKP0000029884110801000019CA 0000009433{ 0000000000000000{0000009433{ JPY0
BOT000002999316300863110807 00000000015516{00000000015516{00000000000000{00000000002166{00000000000000{SALE 00000000000000{JPY0
BOT000003009416300863110807 00000000015516{00000000015516{00000000000000{00000000002166{00000000000000{ 00000000000000{JPY0
BOH000003010316300933110807 JPY0
BKT0000030206 000020 009 988 INFI00000000 00000000 00000000 A
BKS00000303241108010000209885195510345 178840417924611 4 16300933 RFND /
BKS00000304301108010000209885195510345 10000005800}0000000000{ SW 0000000265}YQ 0000000259}0000006074}0000000000{ JPY0
BKS00000305301108010000209885195510345 10000000000{0000000000{ CP 0000000250{ 0000000000{0000000000{0000000000{ JPY0
BKS00000306391108010000209885195510345 1I 000000000000000{ 000000000000000{000000000000000{0000000000{ JPY0
BKS00000307451108070000209885195510345 4 1000 110727
BAR00000308651108010000209885195510345 1SONG/YOUNGSUKMR
BKP0000030983110801000020 9889AZ5E63G3T
BKP0000031084110801000020CA 0000006074} 0000000000000000{0000006074} JPY0
BKT0000031106 000021 009 988 INFI00000000 00000000 00000000 A
BKS00000312241108010000219885195510346 278840417924641 0 16300933 RFND /
BKS00000313301108010000219885195510346 20000004000}0000000000{ SW 0000000265}YQ 0000000259}0000004274}0000000000{ JPY0
BKS00000314301108010000219885195510346 20000000000{0000000000{ CP 0000000250{ 0000000000{0000000000{0000000000{ JPY0
BKS00000315391108010000219885195510346 2I 000000000000000{ 000000000000000{000000000000000{0000000000{ JPY0
BKS00000316451108070000219885195510346 5 1000 110727
BAR00000317651108010000219885195510346 2KIM/WONBINMR
BKP0000031883110801000021 9889AZ5E63G3U
BKP0000031984110801000021CA 0000004274} 0000000000000000{0000004274} JPY0
BOT000003209316300933110807 00000000010348}00000000010348}00000000000000{00000000000548}00000000000000{RFND 00000000000000{JPY0
BOT000003219416300933110807 00000000010348}00000000010348}00000000000000{00000000000548}00000000000000{ 00000000000000{JPY0
BCT00021143950811 0014500000009520310F00000005400221G00000002821794}00000001540700F00000000000000{ 00000000002785PJPY0
BFT0002114499TYO 0014500000009520310F00000005400221G00000002821794}00000001540700F00000000000000{ 00000000002785PJPY0
Edited by: 964067 on Oct 14, 2012 11:26 PM
Edited by: 964067 on Oct 14, 2012 11:26 PMHi,
Firstly please ensure that the file that you are reading is bound to have a format of some sort.
I will relate this to one of the requirement we did it in previous projects.
We have a requirement to read a csv file coming in:
1) It will be having records for Header (ODH) and Detail (ODL)
2) The Header and Detail records will be repeated 'N' number of times in the input file.
The schema we used it something as below to poll the CSV file:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
xmlns:tns="http://TargetNamespace.com/ReadCSV" targetNamespace="http://TargetNamespace.com/ReadCSV"
elementFormDefault="qualified" attributeFormDefault="unqualified" nxsd:parseBom="true"
nxsd:version="NXSD" nxsd:stream="chars" nxsd:encoding="US-ASCII">
<xsd:element name="Package">
<xsd:complexType>
<xsd:choice minOccurs="1" maxOccurs="unbounded" nxsd:choiceCondition="terminated" nxsd:terminatedBy=",">
<xsd:element name="Header" nxsd:conditionValue="BOH">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="RecordAction" type="xsd:string" minOccurs="0" nxsd:style="terminated"
nxsd:terminatedBy="," nxsd:quotedBy="""/>
<xsd:element name="VisitType" type="xsd:string" minOccurs="0" nxsd:style="terminated"
nxsd:terminatedBy="," nxsd:quotedBy="""/>
<xsd:element name="OrderAction" type="xsd:string" minOccurs="0" nxsd:style="terminated"
nxsd:terminatedBy="," nxsd:quotedBy="""/>
<xsd:element name="Route" type="xsd:int" minOccurs="0" nxsd:style="terminated"
nxsd:terminatedBy="${eol}" nxsd:quotedBy="""/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="Lines" nxsd:conditionValue="BOD">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="RecordAction" type="xsd:string" minOccurs="0" nxsd:style="terminated"
nxsd:terminatedBy="," nxsd:quotedBy="""/>
<xsd:element name="OrderCode" type="xsd:string" minOccurs="0" nxsd:style="terminated"
nxsd:terminatedBy="," nxsd:quotedBy="""/>
<xsd:element name="ShippingUnitNumber" type="xsd:int" minOccurs="0" nxsd:style="terminated"
nxsd:terminatedBy="," nxsd:quotedBy="""/>
<xsd:element name="ProdOptDesc" type="xsd:string" minOccurs="0" nxsd:style="terminated"
nxsd:terminatedBy="${eol}" nxsd:quotedBy="""/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
So the approach we followed is as below:
1) Design two DB tables. One to put the header records in Header table
2) Put the detail records in Trailer table.
3) Poll from these two tables to trigger next business requirements.
Hope this helps.
Thanks,
Deepak. -
How to Split Large Files?
I've got a large 4GB+ file that I want to transfer onto my USB stick, but because it's a FAT32 format, it won't allow transferring over 4GBs.
How can I split the file into two 2GB files then reattach them after unzipping?Good observations but maybe I miss the part where the OP says imovie is involved.
I used Split&Concat when I was transferring files from a PC to a Mac when I had .mov files that were larger than the flash drive capacity. The flash drive was FAT format so this post specifically rang a bell. I am trying to remember what I used on the PC side but Split&Concat used the same file splitting format which was cross-platform. -
OS level command to split the file
Hi
I am processing large file.. I am using OS level command to split the file file i have given the following command to split the file
my file is /update/inbound/test/file.txt
i have given the following command in OS level command option
split -l 2000 /update/inbound/test/file.txt...
but i didnt see any splited files under this directory
How to write a command to split the file
Regards
SowmyaHi,
Have you tried with split /update/inbound/test/file.txt
Split can take a second filename on the command line.
Refer the exact syntax
http://publib.boulder.ibm.com/infocenter/systems/index.jsp?topic=/com.ibm.aix.cmds/doc/aixcmds5/split.htm
Before applying it check , that if it works with your FTP, as this is Linux based command.
Thanks
Swarup -
I'm Starting in Java programing and need some help.
Based in the information of txt file, I need to split a file.txt into "n" .txt files, depending of the blocks thats the file containt. It's delimited by """".
And put the name between "UZ0RN0" the second field
Example:
"01APR02","UZ0RN0","******************************************
EMHA PNR.UZ0RN0 CR01APR 0419Z MEX BY GS BT
MEX GS BT 01APR 0421Z 385310 MX
"01APR02","TSCS44","******************************************
etc.
My question is how do I split a file into parts eg split test.txt into UZ0RN0.txt, TSCS44.txt, etc.
Pls help. Where do I start? I just need help with the the manage of the java.nio.channels.FileChannel to generate several files
Thanks a lot.Ok Thats is the final code:
This program divide a file.txt in "n" files.txt's according of the block's that the file.txt contain and catch the name of the second tokent to name the new file.txt
import java.io.*;
import java.nio.*;
import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;
public class FileCopy {
public static void main(String[] args) {
if(args.length==0) {
System.out.println("No existe archivo a copiar. Application usage is: \n" +
"java -classpath. Filecopy \" filepath\"" );
System.exit(1);
File fromFile = new File(args[0]);
if(!fromFile.exists()) {
System.out.println("Archivo a copiar. " + fromFile.getAbsolutePath()
+ ", no existe.");
System.exit(1);
FileInputStream inFile = null;
try{
inFile = new FileInputStream(fromFile);
} catch(FileNotFoundException e) {
e.printStackTrace(System.err);
//assert false;
FileChannel inChannel = inFile.getChannel();
try{
int SizeFile = (int)inChannel.size();
ByteBuffer buf = ByteBuffer.allocate(SizeFile);
int length = 0;
int lengthArch = 0;
int NoArch = 0;
int NoComilla = 0;
String str = new String("");
try{
while ((length = inChannel.read(buf)) != -1 ) {
buf.rewind();
for (int i=0; i<length; i++) {
lengthArch++;
byte b = buf.get();
//Delimita caracter. Cada bloque tiene 6 "'s
if ( b == 34 ) {
NoArch++;
NoComilla++;
//Definir nombre del archivo
if (NoComilla==3) {
if ( b!=34) {
str += (char)b;
//Imprime archivo
if (NoComilla==6) {
fromFile = fromFile.getAbsoluteFile(); //Asegura una ruta absoluta
File parentDir = new File(fromFile.getParent()); //Obtiene el directorio
File bFile = new File(parentDir,str + ".txt"); //Genera nuevo archivo
str = ("");
File toFile1 = createFile(bFile);
FileOutputStream outFile1 = null;
try{
outFile1 = new FileOutputStream(toFile1);
} catch(FileNotFoundException e) {
e.printStackTrace(System.err);
//assert false;
FileChannel outChannel1 = outFile1.getChannel();
// Write the files
try {
inChannel.transferTo(((i + 1) - lengthArch),lengthArch,outChannel1);
outFile1.close(); // Close the output stream & the channel
System.out.println("Archivo " + (NoArch/6) +": " + ((i +1) - lengthArch) + " long " + lengthArch);
} catch(IOException e) {
e.printStackTrace(System.err);
System.exit(1);
lengthArch = 0;
NoComilla = 0;
//System.out.print((char)b);
buf.clear();
System.out.println("Tamano del archivo de Origen " + SizeFile);
System.out.println("EOF " + (NoArch/6) + " Archivos copiados.");
catch(IOException e) {
e.printStackTrace(System.err);
System.exit(1);
inFile.close();
} catch(IOException e) {
e.printStackTrace(System.err);
System.exit(1);
System.exit(0);
// Metodo para crear un achivo y en caso de que exista hacer *+_backup.*
public static File createFile(File aFile) {
aFile = aFile.getAbsoluteFile(); //Asegura una ruta absoluta
File parentDir = new File(aFile.getParent()); //Obtiene el directorio
String name = aFile.getName(); //Obtiene el nombre del archivo
int period = name.indexOf('.'); //Busca el separador de la extension
if(period == -1) //Si no es
period = name.length(); //Lo coloca al final del String
String nameAdd = "_backup"; //Agrega "Backup" al nombre
//Crea el objeto archivo que es unico
File backup = new File(name.substring(0,period)
+ name.substring(period));
while (backup.exists()) { //Si el nombre ya existe....
name = backup.getName(); //Obtiene el nombre actual del archivo
period += nameAdd.length(); //Agrega el separador
backup = new File(parentDir, name.substring(0,period) //agrega backup de nuevo
+ nameAdd + name.substring(period));
return backup;
This is the example of the file with 2 blocks
"01APR02","UZ0RN0","******************************************
EMHA PNR.UZ0RN0 CR01APR 0419Z MEX BY GS BT
385310 MX
***1.ALCANTARA/JORGEALBERTO
FONE-MEX/N000
RCVD-PAX
TKT -T/OK
1 MX 7M 01APR MEXMTY HK 1 650A 815A
AB * FLT 7 7A
RCVD-PAX
MEX GS BT 01APR 0419Z 385310 MX
AB | FLT 7 7A
RCVD-PAX
MEX GS BT 01APR 0421Z 385310 MX
"01APR02","TSCS44","******************************************
.... PNR.TSCS44 CR25MAR 1834Z HDQ BY RM 1S
***1.1BRAVO/OCTAVIO
FONE-MTY1-81503300*A/A528
RLOC-HDQ1SJOXMWV/D4C2/86511574/MTY/1S/T/MX
/MXN
G FX-OSI YY 86511574 / VILLATOURS CENTRO P
CC D4C2
OSI MX TKNA 13235822315830
SSRSEATMXHS1MTYMEX0070K28MAR.16B
SSRSEATMXHS1MEXMTY0007K01APR.09B
1 MX 70K 28MAR MTYMEX HK 1 645A 815A
2 MX 7K 01APR MEXMTY HK 1 650A 815A
X3 SSRSEATMXNN1MTYMEX0070K28MAR.16B
RCVD-
HDQ RM 1S 25MAR 2205Z
X3 SSRSEATMXNN1MEXMTY0007K01APR.09B
RCVD-
HDQ RM 1S 25MAR 2231Z
X3 SSRSEATMXKK1MTYMEX0070K28MAR.16BN
X3 SSRSEATMXKK1MEXMTY0007K01APR.09BN
RCHDQ1SJOXMWV/D4C2/86511574/MTY/1S/T/MX
/MXN
HDQ RM 1S 26MAR 0055Z
Chao/Bye -
Can anyone please let me know how do I split PDF Files by bookmark using Java Script.
I am making a Visual Basic utility to read the bookmarks in PDF Files and split them based on the bookmarks. I am able to split the PDF Files by using Arts PDF Split Pro. However since I am already using Adobe Standard, I would like to do it with Adobe itself.
Thus, I pay license for only one software and not two.
Thanks
RahulI couldn't find much information online about this myself, but hammered away until it worked. You should easily be able to adjust it for your needs.
My sources:
Adobe IAC Developer Guide
Adobe IAC API Reference
Adobe JS API Reference
Adobe Acrobat and VBA – An Introduction | Karl Heinz Kremer's Ramblings
UtterAccess Discussion Forums > Splitting Pdf Files
Private Sub extractBookmark()
Dim AcroApp As AcroApp, AVDoc As AcroAVDoc, PDDoc As AcroPDDoc, PDBookmark As AcroPDBookmark, AVPageView As AcroAVPageView
Dim newPDF As AcroPDDoc, mergePDF As AcroPDDoc
Dim jso As Object, BookMarkRoot As Object
Dim masterPath As String, testName As String, i As Variant, bookmark As Variant
Dim startN As Integer, endN As Integer, nPages As Integer, totalP As Integer
Set AcroApp = CreateObject("AcroExch.App")
Set AVDoc = CreateObject("AcroExch.AVDoc")
Set PDDoc = CreateObject("AcroExch.PDDoc")
Set PDBookmark = CreateObject("AcroExch.PDBookmark")
masterPath = ActiveWorkbook.Path & "\MasterDocument.pdf" 'Path of the PDF containing the bookmarks to be extracted
AVDoc.Open masterPath, vbNull
Set AVPageView = AVDoc.GetAVPageView
Set PDDoc = AVDoc.GetPDDoc
Set jso = PDDoc.GetJSObject
Set BookMarkRoot = jso.BookMarkRoot
bookmark = jso.BookMarkRoot.Children
totalP = PDDoc.GetNumPages
'Loop through the 10 bookmarks in MasterDocument.pdf and get the starting page # of each. This # has to be changed to the # of bookmarks in your pdf. Or write something to count the bookmarks and use that variable. "productName" is a global variable for my specific project... You'll need to revise this for your purpose.
For i = 0 To 9
If bookmark(i).Name = productName Then
PDBookmark.GetByTitle PDDoc, bookmark(i).Name
PDBookmark.Perform AVDoc
AcroApp.Exit
startN = AVPageView.GetPageNum
If i < 9 Then
PDBookmark.GetByTitle PDDoc, bookmark(i + 1).Name
PDBookmark.Perform AVDoc
AcroApp.Exit
endN = AVPageView.GetPageNum
nPages = endN - startN
Else
nPages = totalP - startN
End If
End If
Next
PDDoc.Close
'This part will also need to be modified. I am inserting the bookmarks into an already made PDF (global variable for me "fName"). You'll want to create a new pdf.
Set newPDF = CreateObject("AcroExch.PDDoc")
Set mergePDF = CreateObject("AcroExch.PDDoc")
newPDF.Open fName & ".pdf" 'This line needs changing for your purpose. Probably could be.... newPDF.Create
mergePDF.Open masterPath
newPDF.InsertPages 0, mergePDF, startN, nPages, 0
newPDF.Save PDSaveFull, fName & ".pdf"
newPDF.Close
mergePDF.Close
End Sub -
Script to Split PDF files on Bookmarks
I'm totally new to Java scripting. What I'm looking for is a script I can run from batch processing with professional that will look at a collection files in s directory and split ech one of them on their bookmarks into smaller files.
The bookmarks are all based on the page so it is possible to use the bookmark object's "execute" method to execute the bookmark action and pickup the page number.
I read that last part somewhere. If someone can give me a reference to a thread or just some code to get me started that would help. Thanks,
Josh5 years later... hopefully this helps someone out there.
I couldn't find much information online about this myself, but hammered away until it worked. My code is for a slightly different purpose, but you should easily be able to adjust it for your needs.
My sources:
Adobe IAC Developer Guide
Adobe IAC API Reference
Adobe JS API Reference
Adobe Acrobat and VBA – An Introduction | Karl Heinz Kremer's Ramblings
UtterAccess Discussion Forums > Splitting Pdf Files
Private Sub extractBookmark()
Dim AcroApp As AcroApp, AVDoc As AcroAVDoc, PDDoc As AcroPDDoc, PDBookmark As AcroPDBookmark, AVPageView As AcroAVPageView
Dim newPDF As AcroPDDoc, mergePDF As AcroPDDoc
Dim jso As Object, BookMarkRoot As Object
Dim masterPath As String, testName As String, i As Variant, bookmark As Variant
Dim startN As Integer, endN As Integer, nPages As Integer, totalP As Integer
Set AcroApp = CreateObject("AcroExch.App")
Set AVDoc = CreateObject("AcroExch.AVDoc")
Set PDDoc = CreateObject("AcroExch.PDDoc")
Set PDBookmark = CreateObject("AcroExch.PDBookmark")
masterPath = ActiveWorkbook.Path & "\MasterDocument.pdf" 'Path of the PDF containing the bookmarks to be extracted
AVDoc.Open masterPath, vbNull
Set AVPageView = AVDoc.GetAVPageView
Set PDDoc = AVDoc.GetPDDoc
Set jso = PDDoc.GetJSObject
Set BookMarkRoot = jso.BookMarkRoot
bookmark = jso.BookMarkRoot.Children
totalP = PDDoc.GetNumPages
'Loop through the 10 bookmarks in MasterDocument.pdf and get the starting page # of each. This # has to be changed to the # of bookmarks in your pdf. Or write something to count the bookmarks and use that variable. "productName" is a global variable for my specific project... You'll need to revise this for your purpose.
For i = 0 To 9
If bookmark(i).Name = productName Then
PDBookmark.GetByTitle PDDoc, bookmark(i).Name
PDBookmark.Perform AVDoc
AcroApp.Exit
startN = AVPageView.GetPageNum
If i < 9 Then
PDBookmark.GetByTitle PDDoc, bookmark(i + 1).Name
PDBookmark.Perform AVDoc
AcroApp.Exit
endN = AVPageView.GetPageNum
nPages = endN - startN
Else
nPages = totalP - startN
End If
End If
Next
PDDoc.Close
'This part will also need to be modified. I am inserting the bookmarks into an already made PDF (global variable for me "fName"). You'll want to create a new pdf.
Set newPDF = CreateObject("AcroExch.PDDoc")
Set mergePDF = CreateObject("AcroExch.PDDoc")
newPDF.Open fName & ".pdf" 'This line needs changing for your purpose. Probably could be.... newPDF.Create
mergePDF.Open masterPath
newPDF.InsertPages 0, mergePDF, startN, nPages, 0
newPDF.Save PDSaveFull, fName & ".pdf"
newPDF.Close
mergePDF.Close
End Sub -
Splitting a file based on the payload field - multimapping
HI Everyone,
I have a requirement of splitting a file based on the field .
e.g When I am a file as :
row1 David US
row2 Cindra US
row3 Peeru CA
row4 Jay CA
Then, I have to split the file into two files, one file with the US rows and another file with the CA rows.
There can be many countries in the input file, so number of target files need to be generated is not fixed.
I have gone through the below links :
/people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible ( in the blog we know that there are two receivers but in my case I dont know that )
https://bond.newellco.com/irj/scn/,DanaInfo=www.sdn.sap.com,SSL+thread?messageID=6449801#6449801
( Everyone is providing JAVA mapping as a solution....)
Is Java mapping the only option to resolve the problem case I have ?
Thx
PEERU INHi Peeru,
I don't have access to the any FTP or file server of XI to check the file adapter as i am travelling right now(I am 100% sure that the file adapter splitting will work as i have done this for one of my requirement).
Coming to your requirement:
I wrote an java map which will read the XML file and create the multiple recordset based on number of different country exists in the file, then i am printing the final structure in an multi mapping layout (please see the attached input file Country.xml and out put file which the java map generated Final.XML) if we do this i think the file adapter will create the different files based on the number of recordset we have as you can see the output file is generated with the 3 recordset (<Country>) tag each country tag has its own records, now if i give the filename in variable substuition pointing to region then i think i should get 3 files with names
us.xml
us01.xml
us02.xml
i think by using the multi mapping i can generate 3 files and by using the variable substution i can give the 3 different names from the payload of each file and also can add the timestamp for each of the file, again i didn't have access to the file adapter in the project i am working on so i couldn't verify in XI server, but if you still looking for solution then let me know i will give the map details.
Input File: Country.xml
<?xml version="1.0"?>
<check>
<order>
<name>Nisar1</name>
<region>US</region>
</order>
<order>
<name>Nisar2</name>
<region>US</region>
</order>
<order>
<name>Nisar3</name>
<region>US</region>
</order>
<order>
<name>Nisar4</name>
<region>US01</region>
</order>
<order>
<name>Nisar5</name>
<region>US01</region>
</order>
<order>
<name>Nisar6</name>
<region>US01</region>
</order>
<order>
<name>Nisar7</name>
<region>US</region>
</order>
<order>
<name>Nisar8</name>
<region>US</region>
</order>
<order>
<name>Nisar8</name>
<region>US02</region>
</order>
</check>
Output File : Final.XML
<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
<ns0:Message1>
<country>
<Order>
<name>Nisar1</name>
<region>US</region>
</Order>
<Order>
<name>Nisar2</name>
<region>US</region>
</Order>
<Order>
<name>Nisar3</name>
<region>US</region>
</Order>
<Order>
<name>Nisar7</name>
<region>US</region>
</Order>
<Order>
<name>Nisar8</name>
<region>US</region>
</Order>
</country>
<country>
<Order>
<name>Nisar4</name>
<region>US01</region>
</Order>
<Order>
<name>Nisar5</name>
<region>US01</region>
</Order>
<Order>
<name>Nisar6</name>
<region>US01</region>
</Order>
</country>
<country>
<Order>
<name>Nisar8</name>
<region>US02</region>
</Order>
</country>
</ns0:Message1>
</ns0:Messages>
regards
Nisar Khan -
A how-To guide about splitting import files exists?
Hi All,
in his Webinar https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/409e4529-adbc-2a10-4d9b-e8fade570414
Klaus David said a "A how-To guide about splitting import files exists" (Page 20).
Can anybody tell me where to find this guide?
Please mail to becker.roman ( at ) web . de
Best regards
RomanI found the link here, if you are still looking.
I didnot check the contents yet but the title says
MDM 5.5 SP06 - IT Scenario Configuration Guide -
https://websmp202.sap-ag.de/~sapidb/011000358700001119482007E
Thanks
Satya
Maybe you are looking for
-
MacBook Pro + Snow Leopard + SIL3131 1.1.11 driver still no go! Help
Folks I have a unibody MacBook Pro (with access to the battery), Snow Leopard fully updated, a Rosewill RC-605 2 port eSATA II Express Card, and the latest [air quotes] working SIL3132 1.1.11 driver and I still get kernel panics. I've ried other driv
-
Advantages of using ejb vs java objects for pipeline components?
hi, one of our applications is a fairly simple application. for simplicity sake, we are considering using java objects (accessing database tables) instead of ejbs for our pipeline components. before flying with this decision, we'd like to be sure we
-
Help, cannot download software updates after HD erased!
Hello community, Back story: I'm an ISM major, so I'm typically pretty good with computers. I've also played with some torrents and I understand the risks that come with them but I'm someone who does my research before downloading. Well, I have Leopa
-
Applications not being stored with other media.
I have an iPad and phone with apps for both. I recently moved to a new machine with an SSD so I put my music library on a secondary drive. That worked fine but now my applications I have for the pad and phone are being stored on the SSD with itunes i
-
I have been having a lot of issues with my mac mini recently. The problems started a while ago, when it would not mount .dmg files. Seeing as I never really install stuff, I just got on with it. And i've fixed that issue now anyway:). Since then, I h