Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6850513
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:08:02+00:00 2026-05-27T01:08:02+00:00

This is my first project in Java. I’m creating batch FTP video uploader applet

  • 0

This is my first project in Java.
I’m creating batch FTP video uploader applet in Java.

Before I start uploading videos I need to read the video duration and video bitrate from the video files.

I did some research on Google but I only found some third party libraries (jffmpeg, xugler etc..)

Is there any easier way to get this information using Java?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T01:08:02+00:00Added an answer on May 27, 2026 at 1:08 am

    You’ll need to use a 3rd party tool, like Xuggle or shell out directly to FFmpeg. There is no ‘native’ way in Java to do this. (Java attempts at “media stuff”, like JMF, have never really paned out.) Writing your own media file parser is going to be difficult and time consuming–and that is an understatement.

    It doen’t take much effort to shell out to FFmpeg and parse the output. My app does it, although it is only interested in the durration. Here is a simple CLI example:

    manoa:~ stu$ ffmpeg -i test.flv 
    ffmpeg version 0.8.6, Copyright (c) 2000-2011 the FFmpeg developers
      built on Nov 21 2011 15:43:35 with gcc 4.2.1 (Apple Inc. build 5664)
      configuration: --prefix=/opt/xtendx/local --enable-gpl --enable-pthreads --enable-version3 --enable-nonfree --disable-decoder=prores_lgpl --enable-libvpx --enable-libvorbis --enable-libfaac --enable-libmp3lame --enable-libx264 --enable-libxvid --disable-decoder=libvpx --enable-avfilter --enable-filters --arch=x86_64 --enable-runtime-cpudetect --extra-cflags=-I/opt/xtendx/local/include --extra-ldflags=-L/opt/xtendx/local/lib --enable-hwaccel=mpeg2_vaapi --enable-hwaccel=mpeg4_vaapi --enable-hwaccel=h263_vaapi --enable-hwaccel=wmv3_vaapi
      libavutil    51.  9. 1 / 51.  9. 1
      libavcodec   53.  7. 0 / 53.  7. 0
      libavformat  53.  4. 0 / 53.  4. 0
      libavdevice  53.  1. 1 / 53.  1. 1
      libavfilter   2. 23. 0 /  2. 23. 0
      libswscale    2.  0. 0 /  2.  0. 0
      libpostproc  51.  2. 0 / 51.  2. 0
    [flv @ 0x101807c00] Estimating duration from bitrate, this may be inaccurate
    
    Seems stream 0 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 23.98 (24000/1001)
    Input #0, flv, from 'trailer_flash.flv':
      Metadata:
        duration        : 125
        width           : 640
        height          : 340
        videodatarate   : 500
        framerate       : 24
        videocodecid    : 4
        audiodatarate   : 128
        audiodelay      : 0
        audiocodecid    : 2
        canSeekToEnd    : true
      Duration: 00:02:04.88, start: 0.000000, bitrate: 640 kb/s
        Stream #0.0: Video: vp6f, yuv420p, 640x340, 512 kb/s, 23.98 tbr, 1k tbn, 1k tbc
        Stream #0.1: Audio: mp3, 44100 Hz, stereo, s16, 128 kb/s
    At least one output file must be specified
    

    So, you’ll just need to parse this line-by-line and find this line:

    Duration: 00:02:04.88, start: 0.000000, bitrate: 640 kb/s
    

    Then chop that up and you are good to go!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is the first time I'm creating an open-source project, and I've decided (based
This is my first time doing this sort of project so apologies if the
I'm starting a new personal project on the side, so this is the first
Just recently I dove into the VideoLAN open source project. This was my first
This project is the probable first step in migrating a large CMS from Classic
Imagine this as the code from build.xml: <project name=test project> <target name=first> <echo>first</echo> </target>
I have been working on my first Java project with the 'Drools Planner' package,
I'm new to Java, but not new to programming, so as my first project
I am working on a Java project using Netbeans for the first time. I
I am a java beginner and for my first project I started building a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.