ffprobe - How to omit stream disposition info from output?
ffprobe - For a given audio file, I want to get stream info (specifically, sample rate, duration, bit rate, channel count) and all metadata tags (e.g. id3), but nothing else. After quite a bit of research, I have come up with the following ffprobe command:
./ffprobe -v error -show_streams -show_format -select_streams a:0
-show_entries "stream=codec_name,bit_rate,channels,sample_rate : format=duration"
-of default=noprint_wrappers=1 Song.mp3
With this command, you can see in the show_entries arg value, I'm only including codec_name, bit_rate, channels, and sample_rate.
However, the output (see below) includes this unwanted DISPOSITION=xyz crap that I did not ask for in my "show_entries" argument. What set of options/args will exclude this DISPOSITION=xyz stuff from my output ?
I have read through the ffprobe documentation, but it is not very easy to understand, and couldn't find what I wanted.
NOTE - I'm aware that I can pipe this command output to grep -v, but that is not an option for me, since I will be running this command as a child process from within my app, and need this to be efficient - grep means starting another process ... not an option.
In other words, I need to do this with ffprobe and ffprobe only.
codec_name=vorbis
sample_rate=44100
channels=2
bit_rate=240000
DISPOSITION:default=0 // DON'T WANT THIS :(
DISPOSITION:dub=0 // DON'T WANT THIS :(
...
DISPOSITION:timed_thumbnails=0 // DON'T WANT THIS :(
TAG:ALBUM=Healing Music for Reiki 1
TAG:ARTIST=Aeoliah
TAG:DATE=1995
TAG:FMPS_PLAYCOUNT=1
TAG:FMPS_RATING_AMAROK_SCORE=0.235
TAG:GENRE=New Age
TAG:TITLE=Souls In Ecstacy
TAG:track=2
duration=1682.506667
ffmpeg
add a comment |
ffprobe - For a given audio file, I want to get stream info (specifically, sample rate, duration, bit rate, channel count) and all metadata tags (e.g. id3), but nothing else. After quite a bit of research, I have come up with the following ffprobe command:
./ffprobe -v error -show_streams -show_format -select_streams a:0
-show_entries "stream=codec_name,bit_rate,channels,sample_rate : format=duration"
-of default=noprint_wrappers=1 Song.mp3
With this command, you can see in the show_entries arg value, I'm only including codec_name, bit_rate, channels, and sample_rate.
However, the output (see below) includes this unwanted DISPOSITION=xyz crap that I did not ask for in my "show_entries" argument. What set of options/args will exclude this DISPOSITION=xyz stuff from my output ?
I have read through the ffprobe documentation, but it is not very easy to understand, and couldn't find what I wanted.
NOTE - I'm aware that I can pipe this command output to grep -v, but that is not an option for me, since I will be running this command as a child process from within my app, and need this to be efficient - grep means starting another process ... not an option.
In other words, I need to do this with ffprobe and ffprobe only.
codec_name=vorbis
sample_rate=44100
channels=2
bit_rate=240000
DISPOSITION:default=0 // DON'T WANT THIS :(
DISPOSITION:dub=0 // DON'T WANT THIS :(
...
DISPOSITION:timed_thumbnails=0 // DON'T WANT THIS :(
TAG:ALBUM=Healing Music for Reiki 1
TAG:ARTIST=Aeoliah
TAG:DATE=1995
TAG:FMPS_PLAYCOUNT=1
TAG:FMPS_RATING_AMAROK_SCORE=0.235
TAG:GENRE=New Age
TAG:TITLE=Souls In Ecstacy
TAG:track=2
duration=1682.506667
ffmpeg
add a comment |
ffprobe - For a given audio file, I want to get stream info (specifically, sample rate, duration, bit rate, channel count) and all metadata tags (e.g. id3), but nothing else. After quite a bit of research, I have come up with the following ffprobe command:
./ffprobe -v error -show_streams -show_format -select_streams a:0
-show_entries "stream=codec_name,bit_rate,channels,sample_rate : format=duration"
-of default=noprint_wrappers=1 Song.mp3
With this command, you can see in the show_entries arg value, I'm only including codec_name, bit_rate, channels, and sample_rate.
However, the output (see below) includes this unwanted DISPOSITION=xyz crap that I did not ask for in my "show_entries" argument. What set of options/args will exclude this DISPOSITION=xyz stuff from my output ?
I have read through the ffprobe documentation, but it is not very easy to understand, and couldn't find what I wanted.
NOTE - I'm aware that I can pipe this command output to grep -v, but that is not an option for me, since I will be running this command as a child process from within my app, and need this to be efficient - grep means starting another process ... not an option.
In other words, I need to do this with ffprobe and ffprobe only.
codec_name=vorbis
sample_rate=44100
channels=2
bit_rate=240000
DISPOSITION:default=0 // DON'T WANT THIS :(
DISPOSITION:dub=0 // DON'T WANT THIS :(
...
DISPOSITION:timed_thumbnails=0 // DON'T WANT THIS :(
TAG:ALBUM=Healing Music for Reiki 1
TAG:ARTIST=Aeoliah
TAG:DATE=1995
TAG:FMPS_PLAYCOUNT=1
TAG:FMPS_RATING_AMAROK_SCORE=0.235
TAG:GENRE=New Age
TAG:TITLE=Souls In Ecstacy
TAG:track=2
duration=1682.506667
ffmpeg
ffprobe - For a given audio file, I want to get stream info (specifically, sample rate, duration, bit rate, channel count) and all metadata tags (e.g. id3), but nothing else. After quite a bit of research, I have come up with the following ffprobe command:
./ffprobe -v error -show_streams -show_format -select_streams a:0
-show_entries "stream=codec_name,bit_rate,channels,sample_rate : format=duration"
-of default=noprint_wrappers=1 Song.mp3
With this command, you can see in the show_entries arg value, I'm only including codec_name, bit_rate, channels, and sample_rate.
However, the output (see below) includes this unwanted DISPOSITION=xyz crap that I did not ask for in my "show_entries" argument. What set of options/args will exclude this DISPOSITION=xyz stuff from my output ?
I have read through the ffprobe documentation, but it is not very easy to understand, and couldn't find what I wanted.
NOTE - I'm aware that I can pipe this command output to grep -v, but that is not an option for me, since I will be running this command as a child process from within my app, and need this to be efficient - grep means starting another process ... not an option.
In other words, I need to do this with ffprobe and ffprobe only.
codec_name=vorbis
sample_rate=44100
channels=2
bit_rate=240000
DISPOSITION:default=0 // DON'T WANT THIS :(
DISPOSITION:dub=0 // DON'T WANT THIS :(
...
DISPOSITION:timed_thumbnails=0 // DON'T WANT THIS :(
TAG:ALBUM=Healing Music for Reiki 1
TAG:ARTIST=Aeoliah
TAG:DATE=1995
TAG:FMPS_PLAYCOUNT=1
TAG:FMPS_RATING_AMAROK_SCORE=0.235
TAG:GENRE=New Age
TAG:TITLE=Souls In Ecstacy
TAG:track=2
duration=1682.506667
ffmpeg
ffmpeg
asked Dec 21 '18 at 0:52
waldenCalms
205
205
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
It's because you have -show_streams
in there. Also, to show tags, you don't need -show_format
.
Use
./ffprobe -v error -select_streams a:0
-show_entries "stream=codec_name,bit_rate,channels,sample_rate : format=duration : format_tags : stream_tags"
-of default=noprint_wrappers=1 Song.mp3
Yes Sir ! That's exactly it ... worked like a charm ! Thanks again :) I did read the ffmpeg docs but didn't understand what they meant by "format tags" or "stream tags".
– waldenCalms
Dec 21 '18 at 6:44
BTW, I noticed that format_tags doesn't always give me the tags. In some files, stream_tags has the tags I'm looking for. So, to get all tags, it's best to include both format_tags and stream_tags, right ? If you agree, could you please edit your answer ? Or should I edit your answer ? Thanks.
– waldenCalms
Dec 21 '18 at 7:15
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1386482%2fffprobe-how-to-omit-stream-disposition-info-from-output%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
It's because you have -show_streams
in there. Also, to show tags, you don't need -show_format
.
Use
./ffprobe -v error -select_streams a:0
-show_entries "stream=codec_name,bit_rate,channels,sample_rate : format=duration : format_tags : stream_tags"
-of default=noprint_wrappers=1 Song.mp3
Yes Sir ! That's exactly it ... worked like a charm ! Thanks again :) I did read the ffmpeg docs but didn't understand what they meant by "format tags" or "stream tags".
– waldenCalms
Dec 21 '18 at 6:44
BTW, I noticed that format_tags doesn't always give me the tags. In some files, stream_tags has the tags I'm looking for. So, to get all tags, it's best to include both format_tags and stream_tags, right ? If you agree, could you please edit your answer ? Or should I edit your answer ? Thanks.
– waldenCalms
Dec 21 '18 at 7:15
add a comment |
It's because you have -show_streams
in there. Also, to show tags, you don't need -show_format
.
Use
./ffprobe -v error -select_streams a:0
-show_entries "stream=codec_name,bit_rate,channels,sample_rate : format=duration : format_tags : stream_tags"
-of default=noprint_wrappers=1 Song.mp3
Yes Sir ! That's exactly it ... worked like a charm ! Thanks again :) I did read the ffmpeg docs but didn't understand what they meant by "format tags" or "stream tags".
– waldenCalms
Dec 21 '18 at 6:44
BTW, I noticed that format_tags doesn't always give me the tags. In some files, stream_tags has the tags I'm looking for. So, to get all tags, it's best to include both format_tags and stream_tags, right ? If you agree, could you please edit your answer ? Or should I edit your answer ? Thanks.
– waldenCalms
Dec 21 '18 at 7:15
add a comment |
It's because you have -show_streams
in there. Also, to show tags, you don't need -show_format
.
Use
./ffprobe -v error -select_streams a:0
-show_entries "stream=codec_name,bit_rate,channels,sample_rate : format=duration : format_tags : stream_tags"
-of default=noprint_wrappers=1 Song.mp3
It's because you have -show_streams
in there. Also, to show tags, you don't need -show_format
.
Use
./ffprobe -v error -select_streams a:0
-show_entries "stream=codec_name,bit_rate,channels,sample_rate : format=duration : format_tags : stream_tags"
-of default=noprint_wrappers=1 Song.mp3
edited Dec 21 '18 at 8:28
answered Dec 21 '18 at 5:15
Gyan
14.6k21745
14.6k21745
Yes Sir ! That's exactly it ... worked like a charm ! Thanks again :) I did read the ffmpeg docs but didn't understand what they meant by "format tags" or "stream tags".
– waldenCalms
Dec 21 '18 at 6:44
BTW, I noticed that format_tags doesn't always give me the tags. In some files, stream_tags has the tags I'm looking for. So, to get all tags, it's best to include both format_tags and stream_tags, right ? If you agree, could you please edit your answer ? Or should I edit your answer ? Thanks.
– waldenCalms
Dec 21 '18 at 7:15
add a comment |
Yes Sir ! That's exactly it ... worked like a charm ! Thanks again :) I did read the ffmpeg docs but didn't understand what they meant by "format tags" or "stream tags".
– waldenCalms
Dec 21 '18 at 6:44
BTW, I noticed that format_tags doesn't always give me the tags. In some files, stream_tags has the tags I'm looking for. So, to get all tags, it's best to include both format_tags and stream_tags, right ? If you agree, could you please edit your answer ? Or should I edit your answer ? Thanks.
– waldenCalms
Dec 21 '18 at 7:15
Yes Sir ! That's exactly it ... worked like a charm ! Thanks again :) I did read the ffmpeg docs but didn't understand what they meant by "format tags" or "stream tags".
– waldenCalms
Dec 21 '18 at 6:44
Yes Sir ! That's exactly it ... worked like a charm ! Thanks again :) I did read the ffmpeg docs but didn't understand what they meant by "format tags" or "stream tags".
– waldenCalms
Dec 21 '18 at 6:44
BTW, I noticed that format_tags doesn't always give me the tags. In some files, stream_tags has the tags I'm looking for. So, to get all tags, it's best to include both format_tags and stream_tags, right ? If you agree, could you please edit your answer ? Or should I edit your answer ? Thanks.
– waldenCalms
Dec 21 '18 at 7:15
BTW, I noticed that format_tags doesn't always give me the tags. In some files, stream_tags has the tags I'm looking for. So, to get all tags, it's best to include both format_tags and stream_tags, right ? If you agree, could you please edit your answer ? Or should I edit your answer ? Thanks.
– waldenCalms
Dec 21 '18 at 7:15
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1386482%2fffprobe-how-to-omit-stream-disposition-info-from-output%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown