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

  • SEARCH
  • Home
  • 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 6838983
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:39:50+00:00 2026-05-26T23:39:50+00:00

Every time I try to get some information about my video files with ffmpeg,

  • 0

Every time I try to get some information about my video files with ffmpeg, it pukes a lot of useless information mixed with good things.

I’m using ffmpeg -i name_of_the_video.mpg.

There are any possibilities to get that in a friendly way? I mean JSON would be great (and even ugly XML is fine).

By now, I made my application parse the data with regex but there are lots of nasty corners that appear on some specific video files. I fixed all that I encountered, but there may be more.

I wanted something like:

{
  "Stream 0": {
     "type": "Video",
     "codec": "h264",
     "resolution": "720x480"
  },
  "Stream 1": {
     "type": "Audio",
     "bitrate": "128 kbps",
     "channels": 2
  }
}
  • 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-26T23:39:50+00:00Added an answer on May 26, 2026 at 11:39 pm

    A bit late, but perhaps still relevant to someone..

    ffprobe is indeed an excellent way to go. Note, though, that you need to tell ffprobe what information you want it to display (with the -show_format, -show_packets and -show_streams options) or it’ll just give you blank output (like you mention in one of your comments).

    For example, ffprobe -v quiet -print_format json -show_format -show_streams somefile.asf would yield something like the following:

    {
      "streams": [{
        "index": 0,
        "codec_name": "wmv3",
        "codec_long_name": "Windows Media Video 9",
        "codec_type": "video",
        "codec_time_base": "1/1000",
        "codec_tag_string": "WMV3",
        "codec_tag": "0x33564d57",
        "width": 320,
        "height": 240,
        "has_b_frames": 0,
        "pix_fmt": "yuv420p",
        "level": -99,
        "r_frame_rate": "30000/1001",
        "avg_frame_rate": "0/0",
        "time_base": "1/1000",
        "start_time": "0.000",
        "duration": "300.066",
        "tags": {
            "language": "eng"
        }
      }],
      "format": {
        "filename": "somefile.asf",
        "nb_streams": 1,
        "format_name": "asf",
        "format_long_name": "ASF format",
        "start_time": "0.000",
        "duration": "300.066",
        "tags": {
            "WMFSDKVersion": "10.00.00.3646",
            "WMFSDKNeeded": "0.0.0.0000",
            "IsVBR": "0"
        }
      }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For some reason every time I try to count the number of rows in
Every time try to set the value of any variable in my model object,
Every time I try to run a small application that uses a Derby DB
Every time I try to do something seemingly-simple in CSS, it doesn't work. I
Every time I try to post to twitter in my rails app, the first
I am getting a conversion error every time I try to submit a date
I have one particular FLA that is crashing every time I try to compile
I'm using VS2008 (with windows XP). Every time I try to run a unit
I have a Visual Studio 2005 solution. Every time I try to run the
Following this post which I posted some time ago, I now get the same

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.