Small fix for (new) Runcam 5 Orange Camera to work with superview
dangr0 opened this issue · 5 comments
Description: When running Superview.exe with an Runcam 5 Orange mp4 file as source, the program just exits/crashes with "exit code 1".
Analysis: When starting ffmpeg like superview does, the following error is printed:
[mp4 @ 000001a3a6666bc0] Could not find tag for codec pcm_s16le in stream #1, codec not currently supported in container
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:0 --
Conversion failed!
Probable cause/solution:
It seems Runcam 5 Orange uses an audio codec that is not supported for MP4-ouput in ffmpeg.
In superview.go line 116 commenting out the following parameters in the ffmpeg command-call fixes the issue for me: "-c:a", "copy",
As I understand this, omitting the parameter lets ffmpeg choose the best fitting audio-codec by itself.
I attached version 0.3 with the "fix" included.
Do you have a small sample (can be just a few seconds) of the RC5 Orange video so I can check? I can leave out the audio copy flag, but I think that always forces the audio to be re-encoded (which is not ideal).
Hey, I attached a short raw example clip wrapped in a ZIP file where I knocked on the camera for some noise, so you can also verify that sound doesnt get lost after processing the file :)
RC_0002_2003021037.zip
Thanks for providing the video!
Very weird that the RC5 Orange encodes the audio in PCM instead of AAC. I did some tests with -c:a copy
vs -c:a aac
, but if the source video is already in AAC format those are identical (no re-encode is taken place). So it's safe to enforce AAC for audio output, I'll commit the change now. Thanks for the help!
@all-contributors please add @dangr0 for bug reports
I've put up a pull request to add @dangr0! 🎉