Opened 4 months ago

Closed 4 months ago

Last modified 4 months ago

#11077 closed defect (invalid)

ffplay uses the -ac option to play pcm and reports an error 'ac': Option not found

Reported by: marszuo Owned by:
Priority: normal Component: ffplay
Version: 7.0 Keywords: Option not found
Cc: MasterQuestionable Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

ffplay -ar 16000 -ac 1 -f s16le output.pcm

Using ffplay 7.0 to play pcm audio file, with -ac option, the playback always fails with the following obvious errors:

Failed to set value '1' for option 'ac': Option not found

Change History (3)

comment:1 by Zhai Can, 4 months ago

I can confirm this.

/tmp/tmp.gPGJmDvjqV ❯ ~/bin/ffplay-n5.1 -hide_banner -f s16le -ac 2 -ar 44100 -i raw                                                                                                       08:52:56
[s16le @ 0x7f53dc000c80] Estimating duration from bitrate, this may be inaccurate
Input #0, s16le, from 'raw':
  Duration: 00:03:31.77, bitrate: 1411 kb/s
  Stream #0:0: Audio: pcm_s16le, 44100 Hz, 2 channels, s16, 1411 kb/s
   2.29 M-A:  0.000 fd=   0 aq=  175KB vq=    0KB sq=    0B f=0/0
/tmp/tmp.gPGJmDvjqV ❯ ffplay -hide_banner -f s16le -ac 2 -ar 44100 -i raw                                                                                                                  08:53:03
Failed to set value '2' for option 'ac': Option not found

n5.1 version works well.

However ffmpeg n7.0 is also an okay:

/tmp/tmp.gPGJmDvjqV ❯ ffmpeg -hide_banner -f s16le -ac 2 -ar 44100 -i raw                                                                                                                  08:55:38
[s16le @ 0x55c65655a680] Estimating duration from bitrate, this may be inaccurate
[aist#0:0/pcm_s16le @ 0x55c6566337c0] Guessed Channel Layout: stereo
Input #0, s16le, from 'raw':
  Duration: 00:03:31.77, bitrate: 1411 kb/s
  Stream #0:0: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s
At least one output file must be specified

comment:2 by Marton Balint, 4 months ago

Resolution: invalid
Status: newclosed

ffplay no longer supports the -ac option. ffmpeg happens to have some workarounds for compatiblity, but ffplay has not.

I suggest checking the native demuxer options:

ffplay -help demuxer=s16le

They should work fine. E.g.

ffplay -f s16le -ch_layout mono -sample_rate 44100 -i raw

comment:3 by MasterQuestionable, 4 months ago

Cc: MasterQuestionable added

͏    I wonder the rationale for its deprecation:
͏    "-ch_layout" feels verbose, much unjustifiably.

Note: See TracTickets for help on using tickets.