Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FFMPEG - Could not find tag for codec pcm_s16le in stream #0, codec not currently supported in container

I'm using the following command to extract part of a mono 44K .M4A audio file;

 ffmpeg -ss 00:00:01 -i input.m4a -t 00:00:03 -c:a copy output.m4a 

But I'm getting the following error;

  Trailing option(s) found in the command: may be ignored.
  Guessed Channel Layout for Input Stream #0.0 : mono
  Input #0, wav, from 'input.m4a':
  Duration: 00:00:01.95, bitrate: 705 kb/s
  Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, mono, s16, 705 kb/s
  [ipod @ 00000222e439ca00] Could not find tag for codec pcm_s16le in stream #0, 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 --
  Stream mapping:
  Stream #0:0 -> #0:0 (copy)

I notice that FFMPEG guesses that my file is wav but this is strange as I thought it was .M4A . So is FFMPEG incorrectly guessing that my input is a wav file and hence creating an error?

like image 884
Meggy Avatar asked Sep 12 '25 18:09

Meggy


1 Answers

This seems to be the solution;

  ffmpeg -ss 00:00:01 -i input.m4a -t 00:00:03 -c:a aac output.m4a 

But I'm still wondering why my .m4a file is detected as wav.

like image 189
Meggy Avatar answered Sep 14 '25 18:09

Meggy