Skip to content

MP4Box GUI Using Java

August 21, 2013

Using MP4Box to convert FLV files to MP4 is the fastest I know. If I compare by time, a conversion software would take a 120 min flv file in more than an hour whereas using MP4Box would take about 15 minutes of conversion. The time may not be accurate but you get the point. I don't know why the developers of those conversion software doesn't incorporate the same method like MP4Box but they should.

I have made a GUI here to create a file that the MP4Box needs to start the conversion like the following below.

mp4box.exe -add “filename.264:fps=23.976” -add “filename.aac” “filename_output.mp4”

the code above must be inside a bat file and located in the same directory as the MP4Box executable.

REQUIREMENTS:

  1. FLV Extract
  2. MP4Box-0.4.5
  3. MP4Box GUI
  4. install java to compile and run java files

Step by step instruction for the GUI to work:

1. You must change the directory code in the “MP4GUI_main.java”. (“MP4GUI_main.java” is located in the “package” folder of the  MP4Box GUI folder)

2. Replace the “USERNAME” in line 6 and  18  with your USERNAME of you in your computer:

3. The MP4Box-0.4.5 directory must be located on the desktop. (or you can change the directory in line 18)

  1. public void writeToFile() throws FileNotFoundException
  2. {
  3. String str, fpsStr;
  4. String cdStr = “CD ..”;
  5. outFile = new PrintWriter(“C:\Users\USERNAME\Desktop\outFile.bat”);
  6. outFile.println(cdStr);
  7. outFile.println(cdStr);
  8. outFile.println(cdStr);
  9. outFile.println(cdStr);
  10. outFile.println(cdStr);
  11. outFile.println();
  12. for (int ctr = 0; ctr < inputArray.length; ctr++)
  13. {
  14. str = inputArray[ctr].getText();
  15. fpsStr = fpsArray[ctr].getText();
  16. outFile.println(“CD Users\USERNAME\Documents\desktop\MP4Box-0.4.5″);
  17. outFile.printf(“mp4box.exe -add “%s.264:fps=%s” -add “%s.aac” “%s.mp4″”, str, fpsStr, str, str);
  18. outFile.println();
  19. outFile.println();
  20. }
  21. outFile.close();
  22. }

4. Compile MP4GUI_main.java.

Step by step Instruction to covert to mp4 file:

1. Run FLV Extract.

Drag the flv file here to demux the video and audio file

Drag the flv file here to demux the video and audio file

2. After this window appear, there will be two new files located in the same directory as the flv, the .264 and .aac files.

finish extracting

3. Drag those two file to the same directory as the MP4Box-0.4.5. Then compile MP4GUI.java file located in the MP4Box GUI Folder (or Create a Jar File). A window will pop up like the one below. Enter the number of flv to be converted.

Input the no. of flv file to convert

Input the no. of flv files to convert

4 Enter the  name of the flv and the fps where you can locate at the “true frame rate” section of the FLV Extract Status.

inputStr

5. then press Enter. A bat file will appear in the desktop. run the Bat file to execute the convertion. the output will be located at the same directory as the MP4Box executable.

Download link

Visit this page for more Info.

Advertisements
Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

TurtleAndRobot.com

Children's Book Reviews

Malav Shah

official Web Site

My Road to Programming

The journey of how I taught myself to program.

paritoshmishra

Look at what's brewing up guys! we all are work in progress. So don't meander, lets micromesh everything and have candid conversation about every problem related to C, C++ and JAVA. We can rejuvenate the crinkled faces.

ProgramThat;

A simple guide to programming...

ITechonology

Information Techonology

Rahul's Work

My Work Tips and Tutorial on Various Tech.

Turnip Farmers

Kingdom Scans

Gigaom

Technology news, trends and analysis covering mobile, big data, cloud, science, energy and media

The Neighborhood

society online's social conscious

HarsH ReaLiTy

A Good Blog is Hard to Find

VentureBeat

News About Tech, Money and Innovation

retireediary

The Diary of a Retiree

50 Year Project

My challenge to visit 192 countries, read 1,001 books, and watch the top 100 movies

[BTW] : Ben Trube, Writer

Writer, Programmer, Singer

My Arch Walkthrough

Arch linux made easy

Don Charisma

because anything is possible with Charisma

SutoCom Solutions

Success & Satisfaction with the Cloud

%d bloggers like this: