Jim, Thank you very much for your assistance. Thank you also for letting me know I was off topic. We ended up figuring it out, went into the library code and added a line dealing with stdout (I don't recall the syntax).
Thanks again Jeff On Sun, Nov 8, 2020 at 1:40 PM Jim DeLaHunt <[email protected]> wrote: > On 2020-11-08 08:42, Jeff England wrote: > > > …Developing code in a Linux / Python environment, using Pydub and ffmpeg > to > > play .mp3 sound. > > I would like to "quiet" the response from ffmpeg. I've found a number of > > posts along the lines of > > ffmpeg -hide_banner -loglevel panic. I'm having difficulty knowing > exactly > > where to place > > the ffmpeg -hide_banner -loglevel panic (or the like) command. I've > tried > > it following the > > import AudioSegment > > from pydub.playback statement and in the programming where the sound is > > actually called. > > > > Any thoughts or guidance is appreciated. > > Hello, Jeff, and welcome to the FFmpeg users list. You ask an > interesting question. > > It sounds like you are using the Python module Pydub[1] to do audio > editing. Pydub offers an API of audio editing actions, it uses Python > code for the logic to convert those editing actions into calls to FFmpeg > or libav, and it can call FFmpeg behind the scenes to actually > manipulate the audio data. It sounds like the FFmpeg invocations > generate more text on its stdout than you want, and you want to reduce > the amount of text which FFmpeg puts to its stdout. > > I don't know Pydub, but I do know Python and FFmepg, and I have written > Python code which calls FFmpeg behind the scenes to actually manipulate > the video data. > > An important thing to bear in mind is that Pydub exists in a Python > environment, and FFmpeg exists outside that environment. You need to be > clear what is happening in which environment. > > In reading the Pydub API docs[2], I see no way to manipulate FFmpeg > directly. The AudioSegment(…).export() call[3] does have a `parameters` > keyword argument, which is a list of options for Pydub to include in the > FFmpeg invocation. The docs says, "These are added to the end of the > call (in the output file section)." It doesn't say there is a way to put > those parameters somewhere else. I don't see any other places in the API > which lets the caller send parameters to the FFmpeg invocation. And of > course, the Pydub API docs might not be complete. > > So, the first question is, which Pydub API call are you using? > > Second, in what way do you see the FFmpeg output to its stdout? Does > Pydub return this to you? I don't see a mention of this in the API > docs. You should describe how you are calling Pydub, and what results > you see, and what results you would like to see. > > Third, be aware that Pydub might not give you the control you are after. > > Fourth, be aware that Pydub is a bit off-topic for this list. Anything > about Pydub and the way it creates an invocation of FFmpeg are > off-topic. Questions you can phrase in terms of a command-line > invocation of FFmpeg are where you start to be on-topic for this list. > Nevertheless, you might still get a bit of help with the Pydub and > Python parts of your situation. > > [1] http://pydub.com/ > > [2] https://github.com/jiaaro/pydub/blob/master/API.markdown > > [3] > https://github.com/jiaaro/pydub/blob/master/API.markdown#audiosegmentexport > > Hope this helps, > —Jim DeLaHunt, software engineer, Vancouver, Canada > > > _______________________________________________ > ffmpeg-user mailing list > [email protected] > https://ffmpeg.org/mailman/listinfo/ffmpeg-user > > To unsubscribe, visit link above, or email > [email protected] with subject "unsubscribe". _______________________________________________ ffmpeg-user mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
