Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FFMPEG configured to always copy audio, audio format not always supported in MP4 container #1061

Closed
JamesSwift opened this issue Feb 17, 2021 · 4 comments
Assignees
Labels
enhancement Optimization, improvement or maintenance task released Available in the stable release video Video Formats, Transcoding, FFmpeg, Streaming & Co

Comments

@JamesSwift
Copy link

JamesSwift commented Feb 17, 2021

So I have been getting some failed transcodes and tracked it back to the log:

Could not find tag for codec wmav2 in stream #1, codec not currently supported in container\nCould not write header for output file #0 (incorrect codec parameters ?): Invalid argument\nError initializing output stream 0:0 -- \nConversion failed!

According to this, it's because PP is configured to always copy the audio stream, but wma is not supported in mp4 container:

I'm no expert, but I believe just removing this line will let ffmpeg decide for itself whether to copy or transcode the audio stream.

#1060

Edit: This doesn't just affect wma, here's a very old video phone clip failing:
Could not find tag for codec pcm_u8 in stream #1, codec not currently supported in container\nCould not write header for output file #0 (incorrect codec parameters ?): Invalid argument

@lastzero
Copy link
Member

Kept it as not all ffmpeg versions have aac support for copyright reasons, so not sure if that causes errors then. Could you do a bit of research for this?

@JamesSwift
Copy link
Author

JamesSwift commented Feb 17, 2021

Hmm, I wasn't aware of the aac issue. I have ran some tests with ffmpeg inside the PP container, and it converts fine when you explicitly tell it to use aac, or simply don't specify the audio codec. So there wouldn't be an issue for the docker version. I also tested it with the latest ffmpeg build. It's GPLv3 licensed, and seems to include the aac encoder.

What specific scenarios are you worried about?

(You could check if the file has an aac stream we can simply copy like so and setup ffmpeg in the appropriate way, but not sure if it's really needed)

@lastzero
Copy link
Member

Seems we have aac support, so I've passed it as encoder.

@lastzero lastzero self-assigned this Feb 17, 2021
@lastzero lastzero added enhancement Optimization, improvement or maintenance task please-test Ready for acceptance test labels Feb 17, 2021
@JamesSwift
Copy link
Author

Thanks, great work. Tested and confirmed working.

@lastzero lastzero added released Available in the stable release and removed please-test Ready for acceptance test labels Feb 17, 2021
@lastzero lastzero added the video Video Formats, Transcoding, FFmpeg, Streaming & Co label Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Optimization, improvement or maintenance task released Available in the stable release video Video Formats, Transcoding, FFmpeg, Streaming & Co
Projects
Status: Release 🌈
Development

No branches or pull requests

2 participants