Jump to content

Invalid audio stream error transcoding music files


wickedlemon

Recommended Posts

wickedlemon

Playing music files if transcoding is required I'm getting the following error:

 
[flac @ 0x7f19d0] Invalid audio stream. Exactly one FLAC audio stream is required.
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
 
 
Here's an example ffmpeg command: 
/bin/ffmpeg -y -f ogg -i "/data/PI/Music/The Aquabats!/The Aquabats! 2011 Hi-Five Soup!/01 The Shark Fighter!.opus" -map 0:0 -vn -sn -c:a:0 copy -ar:a:0 48000 -ac:a:0 2 "/config/transcoding-temp/X86029F.flac"

 

I just end up with a zero size file in the transcoding temp directory.
 
If I remove flac as a direct stream codec from the profile to force transcoding it will transcode flac to flac with no problems and it creates a temp file ok. It just won't convert to a different codec. FLAC -> MP3 and OPUS - >MP3 also gave a similar error.
 
I've tried running the ffmpeg command on my PC directly and get the same error. If I remove"-c:a:0 copy" from the string transcoding works ok.
 
I'm not an expert with Ffmpeg, so does anyone know how I can fix this error in Emby?
 
Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...
  • 1 month later...

@wickedlemon it's trying to convert to flac because that's what you put in your transcodingprofiles. try replacing it with this:

<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" minSegments="0" segmentLength="0" breakOnNonKeyFrames="false" />

That will set it back to the default of mp3 and then it should work.

Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...

@wickedlemon with Emby Server 4.6 I would suggest removing your custom profile and letting the server detect the supported formats of the device. It should just work now. Thanks.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...