How do I extract only certain parts of ffmpeg's standard output as it processes a file?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












0















I want to enter a command that only shows these two lines of ffmpeg's output and I want to see it as it processes a file:



from 'input_file.mkv':
frame=172534 fps=4622 q=-1.0 Lsize= 8319963kB time=01:59:56.17 bitrate=9471.3kbits/s speed= 193x


This command gives the output I want but frame, fps, etc. only displays after the process has completed.



ffmpeg -i input_file.mkv output.mp4 2>&1 >/dev/null | grep -E -o '(from .*)|((frame=).*)'


How can I display the info I want (and only that info) while it's processing?



Background



That's as far as I've gotten by digging online. I don't see any ffmpeg options to filter out as much as I want and the other questions I'm seeing don't seem to fit what I'm looking for. (Most of what I'm seeing are questions about extracting info from a video file or controlling output in a python script that does other things)










share|improve this question






















  • some flavors of grep have a --line-buffered option among other ways of fiddling with that

    – thrig
    Feb 18 at 19:04






  • 1





    See -progress option.

    – Gyan
    Feb 18 at 19:36















0















I want to enter a command that only shows these two lines of ffmpeg's output and I want to see it as it processes a file:



from 'input_file.mkv':
frame=172534 fps=4622 q=-1.0 Lsize= 8319963kB time=01:59:56.17 bitrate=9471.3kbits/s speed= 193x


This command gives the output I want but frame, fps, etc. only displays after the process has completed.



ffmpeg -i input_file.mkv output.mp4 2>&1 >/dev/null | grep -E -o '(from .*)|((frame=).*)'


How can I display the info I want (and only that info) while it's processing?



Background



That's as far as I've gotten by digging online. I don't see any ffmpeg options to filter out as much as I want and the other questions I'm seeing don't seem to fit what I'm looking for. (Most of what I'm seeing are questions about extracting info from a video file or controlling output in a python script that does other things)










share|improve this question






















  • some flavors of grep have a --line-buffered option among other ways of fiddling with that

    – thrig
    Feb 18 at 19:04






  • 1





    See -progress option.

    – Gyan
    Feb 18 at 19:36













0












0








0








I want to enter a command that only shows these two lines of ffmpeg's output and I want to see it as it processes a file:



from 'input_file.mkv':
frame=172534 fps=4622 q=-1.0 Lsize= 8319963kB time=01:59:56.17 bitrate=9471.3kbits/s speed= 193x


This command gives the output I want but frame, fps, etc. only displays after the process has completed.



ffmpeg -i input_file.mkv output.mp4 2>&1 >/dev/null | grep -E -o '(from .*)|((frame=).*)'


How can I display the info I want (and only that info) while it's processing?



Background



That's as far as I've gotten by digging online. I don't see any ffmpeg options to filter out as much as I want and the other questions I'm seeing don't seem to fit what I'm looking for. (Most of what I'm seeing are questions about extracting info from a video file or controlling output in a python script that does other things)










share|improve this question














I want to enter a command that only shows these two lines of ffmpeg's output and I want to see it as it processes a file:



from 'input_file.mkv':
frame=172534 fps=4622 q=-1.0 Lsize= 8319963kB time=01:59:56.17 bitrate=9471.3kbits/s speed= 193x


This command gives the output I want but frame, fps, etc. only displays after the process has completed.



ffmpeg -i input_file.mkv output.mp4 2>&1 >/dev/null | grep -E -o '(from .*)|((frame=).*)'


How can I display the info I want (and only that info) while it's processing?



Background



That's as far as I've gotten by digging online. I don't see any ffmpeg options to filter out as much as I want and the other questions I'm seeing don't seem to fit what I'm looking for. (Most of what I'm seeing are questions about extracting info from a video file or controlling output in a python script that does other things)







sed grep terminal osx ffmpeg






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Feb 18 at 19:01









mrgnwmrgnw

161118




161118












  • some flavors of grep have a --line-buffered option among other ways of fiddling with that

    – thrig
    Feb 18 at 19:04






  • 1





    See -progress option.

    – Gyan
    Feb 18 at 19:36

















  • some flavors of grep have a --line-buffered option among other ways of fiddling with that

    – thrig
    Feb 18 at 19:04






  • 1





    See -progress option.

    – Gyan
    Feb 18 at 19:36
















some flavors of grep have a --line-buffered option among other ways of fiddling with that

– thrig
Feb 18 at 19:04





some flavors of grep have a --line-buffered option among other ways of fiddling with that

– thrig
Feb 18 at 19:04




1




1





See -progress option.

– Gyan
Feb 18 at 19:36





See -progress option.

– Gyan
Feb 18 at 19:36










0






active

oldest

votes











Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
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: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
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
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f501429%2fhow-do-i-extract-only-certain-parts-of-ffmpegs-standard-output-as-it-processes%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • 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.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f501429%2fhow-do-i-extract-only-certain-parts-of-ffmpegs-standard-output-as-it-processes%23new-answer', 'question_page');

);

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






Popular posts from this blog

How to check contact read email or not when send email to Individual?

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay