Opened 4 months ago

Closed 4 months ago

#6607 closed defect (invalid)

ffplay has difficulty decoding 4.0 PCM

Reported by: kieranjol Owned by:
Priority: normal Component: ffplay
Version: git-master Keywords:
Cc: cus Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
ffplay and VLC have issues playing 4.0 PCM audio, whether in WAV, MOV or MKV containers. When making sine waves with lavfi, ffplay produces silence for 4.0, though 2, 5, 6 channel audio is played back OK. VLC produces throbbing, distoreted audio but that's outside of the scope of this issue I guess.
How to reproduce:
Generate a sine wave with ffmpeg and then play it back with ffplay.

./ffmpeg -f lavfi -i "sine=frequency=1000:duration=5:sample_rate=48000" -ac 4 -c:a pcm_s24le test.wav
ffmpeg version N-87034-geca2a49 Copyright (c) 2000-2017 the FFmpeg developers
  built with Apple LLVM version 7.3.0 (clang-703.0.31)
  configuration: 
  libavutil      55. 74.100 / 55. 74.100
  libavcodec     57.103.100 / 57.103.100
  libavformat    57. 76.100 / 57. 76.100
  libavdevice    57.  7.101 / 57.  7.101
  libavfilter     6.100.100 /  6.100.100
  libswscale      4.  7.102 /  4.  7.102
  libswresample   2.  8.100 /  2.  8.100
Input #0, lavfi, from 'sine=frequency=1000:duration=5:sample_rate=48000':
  Duration: N/A, start: 0.000000, bitrate: 768 kb/s
    Stream #0:0: Audio: pcm_s16le, 48000 Hz, mono, s16, 768 kb/s
File 'test.wav' already exists. Overwrite ? [y/N] y
Stream mapping:
  Stream #0:0 -> #0:0 (pcm_s16le (native) -> pcm_s24le (native))
Press [q] to stop, [?] for help
Output #0, wav, to 'test.wav':
  Metadata:
    ISFT            : Lavf57.76.100
    Stream #0:0: Audio: pcm_s24le ([1][0][0][0] / 0x0001), 48000 Hz, 4.0, s32, 4608 kb/s
    Metadata:
      encoder         : Lavc57.103.100 pcm_s24le
size=    2813kB time=00:00:05.00 bitrate=4608.2kbits/s speed= 432x    
video:0kB audio:2812kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.003542%

./ffplay test.wav
ffplay version N-87034-geca2a49 Copyright (c) 2003-2017 the FFmpeg developers
  built with Apple LLVM version 7.3.0 (clang-703.0.31)
  configuration: 
  libavutil      55. 74.100 / 55. 74.100
  libavcodec     57.103.100 / 57.103.100
  libavformat    57. 76.100 / 57. 76.100
  libavdevice    57.  7.101 / 57.  7.101
  libavfilter     6.100.100 /  6.100.100
  libswscale      4.  7.102 /  4.  7.102
  libswresample   2.  8.100 /  2.  8.100
Input #0, wav, from 'test.wav':
  Metadata:
    encoder         : Lavf57.76.100
  Duration: 00:00:05.00, bitrate: 4608 kb/s
    Stream #0:0: Audio: pcm_s24le ([1][0][0][0] / 0x0001), 48000 Hz, 4.0, s32 (24 bit), 4608 kb/s
   3.46 M-A: -0.000 fd=   0 aq=  577KB vq=    0KB sq=    0B f=0/0   

Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.

Change History (4)

comment:1 Changed 4 months ago by kieranjol

  • Version changed from unspecified to git-master

comment:2 Changed 4 months ago by cus

Have you checked all channels of your 5.1 setup? Your are generating a mono sound, then create 4 channels from it, so only center will contain a sound in test.wav, therefore when played, center will contain the sine wave, not front left or front right.

comment:3 Changed 4 months ago by cus

  • Cc cus added

comment:4 Changed 4 months ago by cus

  • Resolution set to invalid
  • Status changed from new to closed

Reopen if you still think there is an issue.

Note: See TracTickets for help on using tickets.