Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#2304 closed enhancement (duplicate)

Support PCM_S16BE in WAVE

Reported by: DJX 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:
It appears FFmpeg does not support PCM signed 16-bit big endian in WAVE. I believe this should be supported by the RIFX file format.

How to reproduce:

"Copy" Audio Codec from source

ffmpeg -i Bad.mpg -acodec copy Bad.wav
ffmpeg version N-50311-gbfcc38e Copyright (c) 2000-2013 the FFmpeg developers
  built on Feb 25 2013 18:40:51 with gcc 4.7.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libg
sm --enable-libilbc --enable-libmp3lame --enable-libopencore-amrnb --enable-libo
pencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-li
bschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-lib
twolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enabl
e-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil      52. 17.103 / 52. 17.103
  libavcodec     54. 92.100 / 54. 92.100
  libavformat    54. 63.100 / 54. 63.100
  libavdevice    54.  3.103 / 54.  3.103
  libavfilter     3. 41.100 /  3. 41.100
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
[mpeg @ 00000000025ba4c0] Format mpeg detected only with low score of 25, misdet
ection possible!
[mpeg @ 00000000025ba4c0] max_analyze_duration 5000000 reached at 5008211 micros
econds
Guessed Channel Layout for  Input Stream #0.1 : stereo
Input #0, mpeg, from 'Bad.mpg':
  Duration: 00:04:21.25, start: 0.017378, bitrate: 7386 kb/s
    Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p, 720x480 [SAR 8:9 DAR
4:3], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:1[0xa0]: Audio: pcm_s16be, 48000 Hz, stereo, s16, 1536 kb/s
[wav @ 0000000005170020] NONE codec not supported in WAVE format
Output #0, wav, to 'Bad.wav':
  Metadata:
    encoder         : Lavf54.63.100
    Stream #0:0: Audio: pcm_s16be, 48000 Hz, stereo, 1536 kb/s
Stream mapping:
  Stream #0:1 -> #0:0 (copy)
Could not write header for output file #0 (incorrect codec parameters ?): Operat
ion not permitted

Force PCM_S16BE

ffmpeg -i Bad.mpg -acodec pcm_s16be Bad.wav
ffmpeg version N-50311-gbfcc38e Copyright (c) 2000-2013 the FFmpeg developers
  built on Feb 25 2013 18:40:51 with gcc 4.7.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libg
sm --enable-libilbc --enable-libmp3lame --enable-libopencore-amrnb --enable-libo
pencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-li
bschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-lib
twolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enabl
e-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil      52. 17.103 / 52. 17.103
  libavcodec     54. 92.100 / 54. 92.100
  libavformat    54. 63.100 / 54. 63.100
  libavdevice    54.  3.103 / 54.  3.103
  libavfilter     3. 41.100 /  3. 41.100
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
[mpeg @ 000000000247a4c0] Format mpeg detected only with low score of 25, misdet
ection possible!
[mpeg @ 000000000247a4c0] max_analyze_duration 5000000 reached at 5008211 micros
econds
Guessed Channel Layout for  Input Stream #0.1 : stereo
Input #0, mpeg, from 'Bad.mpg':
  Duration: 00:04:21.25, start: 0.017378, bitrate: 7386 kb/s
    Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p, 720x480 [SAR 8:9 DAR
4:3], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:1[0xa0]: Audio: pcm_s16be, 48000 Hz, stereo, s16, 1536 kb/s
[wav @ 0000000005010020] pcm_s16be codec not supported in WAVE format
Output #0, wav, to 'Bad.wav':
  Metadata:
    encoder         : Lavf54.63.100
    Stream #0:0: Audio: pcm_s16be, 48000 Hz, stereo, s16, 1536 kb/s
Stream mapping:
  Stream #0:1 -> #0:0 (pcm_s16be -> pcm_s16be)
Could not write header for output file #0 (incorrect codec parameters ?): Operat
ion not permitted

Change History (8)

comment:1 Changed 4 years ago by cehoyos

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

Out of curiosity: On which work-flow would this feature help?

I am closing this as a duplicate of ticket #1978.

comment:2 follow-up: Changed 4 years ago by DJX

Okay, thanks.

These are Michael Jackson music videos that came on a bonus disc.
As a work around I just convert the audio to little endian.

comment:3 in reply to: ↑ 2 Changed 4 years ago by cehoyos

Replying to DJX:

These are Michael Jackson music videos that came on a bonus disc.

What I meant is: If above command line (with -acodec copy or -acodec pcm_s16be) would work, what would you do with the resulting rifx/wavx file?

Version 0, edited 4 years ago by cehoyos (next)

comment:4 follow-up: Changed 4 years ago by DJX

I was just going to play with them, nothing important.
First thing that comes to mind is: I was going to put them in a DAW and analyze to check if the audio truly is uncompressed as is (or if it was compressed before being sampled into its current format).

...prob nothing I couldn't do by converting it to little endian but I wanted to keep the audio stream untouched.

comment:5 in reply to: ↑ 4 Changed 4 years ago by cehoyos

Replying to DJX:

I was just going to play with them, nothing important.
First thing that comes to mind is: I was going to put them in a DAW and analyze to check if the audio truly is uncompressed as is (or if it was compressed before being sampled into its current format).

(Disclaimer: I don't know what a DAW is.)
I wanted to know why (or if) you expect that the software (or hardware) you want to use with the rifx wave files would be able to read such a very unusual format?

comment:6 follow-up: Changed 4 years ago by DJX

Oh, no problem.
I was going to mess with it in a digital audio workstation (DAW)/editor.

Hmm, guess I didn't think it was that unusual.
...now you got me wondering if, indeed, it would have worked...who knows.

comment:7 in reply to: ↑ 6 Changed 4 years ago by cehoyos

Replying to DJX:

...now you got me wondering if, indeed, it would have worked...who knows.

You can test with the file attached to ticket #1978.

comment:8 Changed 4 years ago by DJX

Ah, thanks man.
...and you're right, it does not work.

The only program I could get to play the file was Winamp.

Thanks.

Note: See TracTickets for help on using tickets.