Mplayer only flushing every 256kKeep screen ratio while maximizing mplayerUsing a named pipe as...

Changing JPEG to RAW to use on Lightroom?

Open subspaces of CW complexes

Why did my folder names end up like this, and how can I fix this using a script?

Stuck on a puzzle

How to prevent a hosting company from accessing a VM's encryption keys?

Is it legal for source code containing undefined behavior to crash the compiler?

Is it unusual for a math department not to have a mail/web server?

74S vs 74LS ICs

Is the Amazon rainforest the "world's lungs"?

If I said I had $100 when asked, but I actually had $200, would I be lying by omission?

How were medieval castles built in swamps or marshes without draining them?

What is the loud noise of a helicopter when the rotors are not yet moving?

Notice period 60 days but I need to join in 45 days

Who was the most successful German spy against Great Britain in WWII, from the contemporary German perspective?

Why did Lucius make a deal out of Buckbeak in "The Prisoner of Askaban" but not about Draco being turned into a ferret in "The Goblet of Fire"?

Generating negative voltage rail using 7805

Why is sh (not bash) complaining about functions defined in my .bashrc?

Does a Mace of Disruption's Frightened effect override some undead's immunity to the Frightened condition?

What's the point of fighting monsters in Zelda BoTW?

How many birds in the bush?

Should open strings on guitar be tuned to the key of the song played?

Weird corners with cline

Can you board the plane when your passport is valid less than 3 months?

How can I draw lines between cells from two different tabulars to indicate correlation?



Mplayer only flushing every 256k


Keep screen ratio while maximizing mplayerUsing a named pipe as ffmpeg/avconv's input for streamingmplayer2 playing pictures from mp3mplayer not sending the correct user-agentSaving output of mplayerCUDA Context for NVENC not found after system suspendmplayer: relocation errorMplayer/ SMPlayer general playing speed in Ubuntu






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







1















I am recording audio in a script in order to play it back later with a time shift.



The script regularly checks if the stream is still active. Sometimes live radio streams get interrupted. In that case I want to restart the recording in a new dump file.



Actual recording is done with mplayer:



/usr/bin/mplayer -novideo -dumpaudio      http://194.232.200.147:8000 -dumpfile orf_salzburg_1566868130-1566868130.mp3


I check whether the stream is still active by checking the file size periodically. When it does not increase anymore, I restart the recording.



That worked fine on an older Debian machine, using this mplayer version:



MPlayer svn r34540 (Debian), built with gcc-4.7 (C) 2000-2012 MPlayer Team


Now as it happens I am developing on a new machine, using this version:



MPlayer 1.3.0 (Debian), built with gcc-6.2.1 (C) 2000-2016 MPlayer Team


The old version writes the file instantly. When I query the written file every 100ms I see the file size increasing every 100ms.



However, using the new mplayer version, the file is written in chunks of 256kbyte. That can take up to 16 seconds before the file size increase is visible.



Strangely enough, even the new mplayer reports in the command line an continuously number of bytes being written. But in reality it is only in chunks op 256k.



I believe this behaviour is due to using the ffmpeg lib in mplayer. Ffmpeg flushes every 256kbyte. But there is an option in ffmpeg to flush the output. It is not in mplayer as it seems.



It is easy enough to change the period in my script to check the file size growth. But, when I change it to 20-30 seconds, I loose a lot of audio when the stream in interrupted.



Any suggestions as how to revert mplayer to its old behaviour?










share|improve this question

























  • Why not use ffmpeg? If you can't, can you pipe to ffmpeg and set -flush_packets 1.

    – Gyan
    1 hour ago


















1















I am recording audio in a script in order to play it back later with a time shift.



The script regularly checks if the stream is still active. Sometimes live radio streams get interrupted. In that case I want to restart the recording in a new dump file.



Actual recording is done with mplayer:



/usr/bin/mplayer -novideo -dumpaudio      http://194.232.200.147:8000 -dumpfile orf_salzburg_1566868130-1566868130.mp3


I check whether the stream is still active by checking the file size periodically. When it does not increase anymore, I restart the recording.



That worked fine on an older Debian machine, using this mplayer version:



MPlayer svn r34540 (Debian), built with gcc-4.7 (C) 2000-2012 MPlayer Team


Now as it happens I am developing on a new machine, using this version:



MPlayer 1.3.0 (Debian), built with gcc-6.2.1 (C) 2000-2016 MPlayer Team


The old version writes the file instantly. When I query the written file every 100ms I see the file size increasing every 100ms.



However, using the new mplayer version, the file is written in chunks of 256kbyte. That can take up to 16 seconds before the file size increase is visible.



Strangely enough, even the new mplayer reports in the command line an continuously number of bytes being written. But in reality it is only in chunks op 256k.



I believe this behaviour is due to using the ffmpeg lib in mplayer. Ffmpeg flushes every 256kbyte. But there is an option in ffmpeg to flush the output. It is not in mplayer as it seems.



It is easy enough to change the period in my script to check the file size growth. But, when I change it to 20-30 seconds, I loose a lot of audio when the stream in interrupted.



Any suggestions as how to revert mplayer to its old behaviour?










share|improve this question

























  • Why not use ffmpeg? If you can't, can you pipe to ffmpeg and set -flush_packets 1.

    – Gyan
    1 hour ago














1












1








1








I am recording audio in a script in order to play it back later with a time shift.



The script regularly checks if the stream is still active. Sometimes live radio streams get interrupted. In that case I want to restart the recording in a new dump file.



Actual recording is done with mplayer:



/usr/bin/mplayer -novideo -dumpaudio      http://194.232.200.147:8000 -dumpfile orf_salzburg_1566868130-1566868130.mp3


I check whether the stream is still active by checking the file size periodically. When it does not increase anymore, I restart the recording.



That worked fine on an older Debian machine, using this mplayer version:



MPlayer svn r34540 (Debian), built with gcc-4.7 (C) 2000-2012 MPlayer Team


Now as it happens I am developing on a new machine, using this version:



MPlayer 1.3.0 (Debian), built with gcc-6.2.1 (C) 2000-2016 MPlayer Team


The old version writes the file instantly. When I query the written file every 100ms I see the file size increasing every 100ms.



However, using the new mplayer version, the file is written in chunks of 256kbyte. That can take up to 16 seconds before the file size increase is visible.



Strangely enough, even the new mplayer reports in the command line an continuously number of bytes being written. But in reality it is only in chunks op 256k.



I believe this behaviour is due to using the ffmpeg lib in mplayer. Ffmpeg flushes every 256kbyte. But there is an option in ffmpeg to flush the output. It is not in mplayer as it seems.



It is easy enough to change the period in my script to check the file size growth. But, when I change it to 20-30 seconds, I loose a lot of audio when the stream in interrupted.



Any suggestions as how to revert mplayer to its old behaviour?










share|improve this question














I am recording audio in a script in order to play it back later with a time shift.



The script regularly checks if the stream is still active. Sometimes live radio streams get interrupted. In that case I want to restart the recording in a new dump file.



Actual recording is done with mplayer:



/usr/bin/mplayer -novideo -dumpaudio      http://194.232.200.147:8000 -dumpfile orf_salzburg_1566868130-1566868130.mp3


I check whether the stream is still active by checking the file size periodically. When it does not increase anymore, I restart the recording.



That worked fine on an older Debian machine, using this mplayer version:



MPlayer svn r34540 (Debian), built with gcc-4.7 (C) 2000-2012 MPlayer Team


Now as it happens I am developing on a new machine, using this version:



MPlayer 1.3.0 (Debian), built with gcc-6.2.1 (C) 2000-2016 MPlayer Team


The old version writes the file instantly. When I query the written file every 100ms I see the file size increasing every 100ms.



However, using the new mplayer version, the file is written in chunks of 256kbyte. That can take up to 16 seconds before the file size increase is visible.



Strangely enough, even the new mplayer reports in the command line an continuously number of bytes being written. But in reality it is only in chunks op 256k.



I believe this behaviour is due to using the ffmpeg lib in mplayer. Ffmpeg flushes every 256kbyte. But there is an option in ffmpeg to flush the output. It is not in mplayer as it seems.



It is easy enough to change the period in my script to check the file size growth. But, when I change it to 20-30 seconds, I loose a lot of audio when the stream in interrupted.



Any suggestions as how to revert mplayer to its old behaviour?







ffmpeg cache mplayer






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 4 hours ago









Hans LinkelsHans Linkels

1022 bronze badges




1022 bronze badges
















  • Why not use ffmpeg? If you can't, can you pipe to ffmpeg and set -flush_packets 1.

    – Gyan
    1 hour ago



















  • Why not use ffmpeg? If you can't, can you pipe to ffmpeg and set -flush_packets 1.

    – Gyan
    1 hour ago

















Why not use ffmpeg? If you can't, can you pipe to ffmpeg and set -flush_packets 1.

– Gyan
1 hour ago





Why not use ffmpeg? If you can't, can you pipe to ffmpeg and set -flush_packets 1.

– Gyan
1 hour ago










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%2f537569%2fmplayer-only-flushing-every-256k%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%2f537569%2fmplayer-only-flushing-every-256k%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

Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

Nicolae Petrescu-Găină Cuprins Biografie | Opera | In memoriam | Varia | Controverse, incertitudini...