[FFmpeg-trac] #10403(undetermined:closed): Audio sample rate adjustment for simple speed change (lossless)

FFmpeg trac at avcodec.org
Tue Jun 27 08:43:53 EEST 2023


#10403: Audio sample rate adjustment for simple speed change (lossless)
-------------------------------------+-------------------------------------
             Reporter:  Noitarud     |                    Owner:  (none)
                 Type:  defect       |                   Status:  closed
             Priority:  normal       |                Component:
                                     |  undetermined
              Version:  unspecified  |               Resolution:  invalid
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
Description changed by Noitarud:

Old description:

> I assume the audio is read at the sample rate speed, so if I somehow get
> the SR changed I should get a different audio playback speed (and this
> would be lossless), but with -c copy and -ar it appears to reencode
> (ignores -ar) and there is no speed change.
> Here is the string I used:
> "C:\Program Files\GPAC\ffmpeg" -i INPUT44100.mp3 -c copy -ar 22050
> E:\slow.mp3
>
> MP3: A little research gives me: sample rate is recorded on each frame,
> sample rates are specific steps, and this may only work per "version"
> (MPEG1 is 44.1/48/32k; V2 half of V1) if contents differ, such a
> conversion step (inside V1) may be expedient for some people, but not
> versitile enough for all (proper fractions of speed) even if between
> V1/2/2.5 were offered.
> http://mpgedit.org/mpgedit/mpeg_format/MP3Format.html
>
> I can only see OGG, AIFF, WAV supports arbitrary values, so no good for
> me.

New description:

 I assume the audio is read at the sample rate speed, so if I somehow get
 the SR changed I should get a different audio playback speed (and this
 would be lossless), but with -c copy and -ar it appears to reencode
 (ignores -ar) and there is no speed change.
 Here is the string I used:
 "C:\Program Files\GPAC\ffmpeg" -i INPUT44100.mp3 -c copy -ar 22050
 E:\slow.mp3

 MP3: A little research gives me: sample rate is recorded on each frame,
 sample rates are specific steps, and this may only work per "version"
 (MPEG1 is 44.1/48/32k; V2 half of V1) if contents differ, such a
 conversion step (inside V1) may be expedient for some people, but not
 versitile enough for all (proper fractions of speed) even if between
 V1/2/2.5 were offered.
 http://mpgedit.org/mpgedit/mpeg_format/MP3Format.html
 •Mp3 44100 to 48000 attempt same problem.

 I can only see OGG, AIFF, WAV supports arbitrary values, so no good for
 me.

--
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/10403#comment:4>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list