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 8532019
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T09:37:03+00:00 2026-06-11T09:37:03+00:00

i am doing the following $output = shell_exec(‘/usr/local/bin/ffmpeg -i intro.mp3 2>&1’); echo <pre>$output</pre>; This

  • 0

i am doing the following

$output = shell_exec('/usr/local/bin/ffmpeg -i intro.mp3 2>&1'); 
echo "<pre>$output</pre>";

This outputs

ffmpeg version 0.8.5, Copyright (c) 2000-2011 the FFmpeg developers
  built on Aug 20 2012 09:28:43 with clang 3.1 (tags/Apple/clang-318.0.61)
  configuration: --enable-nonfree --enable-gpl --enable-version3 --enable-postproc --enable-swscale --enable-avfilter --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libfaac --enable-libxvid --enable-libx264 --enable-libvpx --enable-hardcoded-tables --enable-shared --enable-pthreads --disable-indevs --cc=clang
  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
[mp3 @ 0x7f9481807c00] max_analyze_duration 5000000 reached at 5015510
Input #0, mp3, from 'intro.mp3':
  Metadata:
    album           : Frank 
    artist          : Amy Winehouse
    genre           : R&B
    title           : [Intro] Stronger Than Me
    track           : 01
    date            : 2008
  Duration: 00:03:54.71, start: 0.000000, bitrate: 230 kb/s
    Stream #0.0: Audio: mp3, 44100 Hz, stereo, s16, 160 kb/s
At least one output file must be specified

i want to get the information to insert into a database album,artist,genre,title etc

But all seperately

i can get them by doing the following

$output = shell_exec('/usr/local/bin/ffmpeg -i intro.mp3 2>&1'); 

$edit = explode('  ', $output);
$edit = implode("@", $edit);
$edit = explode(':', $output);
echo "<pre>";
print_r($edit);
echo "</pre>";

then running

<?php echo $edit[9]; ?>

etc

but this seems like a really bad way and annoying way to get values and sometimes the output is slightly different which messes with the outputs.

Whats the best way to do this or am i stuck doing this?

  • 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-06-11T09:37:05+00:00Added an answer on June 11, 2026 at 9:37 am

    There is a better way to retrieve metadata using ffmpeg.

    1. Create a new ffmpeg_movie object e.g

    $movie = new ffmpeg_movie(String path_to_media, boolean persistent);
    

    2. Start getting metada like so:

    $movie->getAuthor();
    $movie->getGenre();
    $movie->getAlbum();
    

    List of what’s available at ffmpeg-php API documentation.

    3. Celebrate good times.

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

Sidebar

Related Questions

I need help doing the following: a preprocessor macro label(x) shall output #x, e.g.,
I'm doing the following in Objective-C and expecting 180 as the output but I'm
after doing the command in the terminal: forever list i get the following output:
Antlr3 produces the following output to System.out , while doing everything else correctly: line
Hope everyone is doing well. I have the following output... +---------+--------------+--------------+-----------+---------+----------+ | ord_num |
Whilst doing git svn clone -s https://svn.example.com/repo/ I received the following output: r3073 =
I my index lets say I have field field named full_name. I'm doing following
While doing the following simple example, I found the following difficulties As the title
After doing the following test: for( i = 0; i < 3000000; i++ )
I'm currently doing the following to compensate for boolean's not mapping well to radio

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.