Opened 12 years ago

Closed 12 years ago

#1704 closed defect (invalid)

ffplay plays at double speed with "-ac 2"

Reported by: Roger Pack Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
How to reproduce:

play attached file like
$ ffplay -ac 2 yo10.wav

ffmpeg -i yo.wav -t 10 yo10.wav
ffmpeg version N-44016-gbebef40 Copyright (c) 2000-2012 the FFmpeg developers
  built on Aug 30 2012 15:26:06 with gcc 4.7.1 (GCC)
  configuration: --enable-memalign-hack --arch=x86 --enable-gpl --enable-libx264 --enable-avisynth --enable-libxvid --target-os=mingw32 --cross-prefix=/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/mingw-w64-i686/bin/i686-w64-mingw32- --pkg-config=pkg-config --enable-libmp3lame --enable-version3 --enable-libvo-aacenc --enable-libvpx --extra-libs=-lws2_32 --extra-libs=-lpthread --enable-zlib --extra-libs=-lwinmm --extra-libs=-lgdi32 --enable-librtmp --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libopenjpeg --enable-gnutls --enable-libgsm --enable-libfreetype --disable-optimizations --enable-mmx --disable-postproc --enable-runtime-cpudetect
  libavutil      51. 70.100 / 51. 70.100
  libavcodec     54. 54.100 / 54. 54.100
  libavformat    54. 25.104 / 54. 25.104
  libavdevice    54.  2.100 / 54.  2.100
  libavfilter     3. 14.100 /  3. 14.100
  libswscale      2.  1.101 /  2.  1.101
  libswresample   0. 15.100 /  0. 15.100
[wav @ 020D7BE0] max_analyze_duration 5000000 reached at 5034667
Guessed Channel Layout for  Input Stream #0.0 : mono
Input #0, wav, from 'yo.wav':
  Duration: 00:00:53.29, bitrate: 768 kb/s
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, mono, s16, 768 kb/s
Output #0, wav, to 'yo10.wav':
  Metadata:
    encoder         : Lavf54.25.104
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, mono, s16, 768 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (pcm_s16le -> pcm_s16le)
Press [q] to stop, [?] for help
size=     940kB time=00:00:10.02 bitrate= 768.0kbits/s
video:0kB audio:940kB subtitle:0 global headers:0kB muxing overhead 0.004779%

c:\vids>ffplay -ac 2 yo10.wav
ffplay version N-43886-g5ac603d Copyright (c) 2003-2012 the FFmpeg developers
  built on Aug 29 2012 06:12:51 with gcc 4.7.1 (GCC)
  configuration: --enable-memalign-hack --arch=x86 --enable-gpl --enable-libx264 --enable-avisynth --enable-libxvid --target-os=mingw32 --cross-prefix=/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/mingw-w64-i686/bin/i686-w64-mingw32- --pkg-config=pkg-config --enable-libmp3lame --enable-version3 --enable-libvo-aacenc --enable-libvpx --extra-libs=-lws2_32 --extra-libs=-lpthread --enable-zlib --extra-libs=-lwinmm --extra-libs=-lgdi32 --enable-librtmp --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libopenjpeg --enable-gnutls --enable-libgsm --enable-libfreetype --enable-runtime-cpudetect
  libavutil      51. 70.100 / 51. 70.100
  libavcodec     54. 54.100 / 54. 54.100
  libavformat    54. 25.104 / 54. 25.104
  libavdevice    54.  2.100 / 54.  2.100
  libavfilter     3. 13.101 /  3. 13.101
  libswscale      2.  1.101 /  2.  1.101
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100
Input #0, wav, from 'yo10.wav':
  Duration: 00:00:10.02, bitrate: 768 kb/s
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, 2 channels, s16, 1536 kb/s
   5.33 A-V:  0.000 fd=   0 aq=    0KB vq=    0KB sq=    0B f=0/0

Attachments (1)

yo10.wav (940.0 KB ) - added by Roger Pack 12 years ago.

Download all attachments as: .zip

Change History (5)

by Roger Pack, 12 years ago

Attachment: yo10.wav added

comment:1 by Roger Pack, 12 years ago

seems reproducible in linux this one.

comment:2 by Marton Balint, 12 years ago

Correct me if I am wrong, but as far as I know -ac 2 is used to override the detected audio channel count, and not to specify the requested channel count.

You may use

SDL_AUDIO_CHANNELS=2 ffplay yo10.wav

if you want to force ffplay to open audio output with two channels and upmix the sound properly.

May I close this as invalid then?

comment:3 by Roger Pack, 12 years ago

I suppose, though it still strikes me as odd that using ffmpeg's "normal way" to mix to 2 channels would cause it to play at double speed :)

comment:4 by Marton Balint, 12 years ago

Resolution: invalid
Status: newclosed

I guess for ffmpeg you set the codec options of the output stream, therefore it does the necessary conversion between the input stream and the output stream.

Closing as invalid.

Note: See TracTickets for help on using tickets.