I have tried to transcode a radio stream with ffmpeg to g722. I get the stream to work and im able to listen to the stream. The problem is that the output stream have faster speed than the input stream. so the result is not good. I have tried to slow down the speed with atempo without any luck.
like:
size= 241kB time=00:00:28.67 bitrate= 68.8kbits/s speed= 1.4x
this varies from 1.x to 15.x
Console output:
c:\ffmpeg\bin>ffmpeg -i http://lyd.nrk.no/nrk_radio_mp3_mp3_l -ac 1 -acodec g722 -f rtp -ab 64k -ar 16k rtp://192.168.0.99:555
ffmpeg version N-85750-ga75ef15 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 6.3.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zlib
libavutil 55. 61.100 / 55. 61.100
libavcodec 57. 93.100 / 57. 93.100
libavformat 57. 72.101 / 57. 72.101
libavdevice 57. 7.100 / 57. 7.100
libavfilter 6. 88.100 / 6. 88.100
libswscale 4. 7.101 / 4. 7.101
libswresample 2. 8.100 / 2. 8.100
libpostproc 54. 6.100 / 54. 6.100
Input #0, mp3, from 'http://lyd.nrk.no/nrk_radio_mp3_mp3_l':
Metadata:
icy-name : NRK mP3
icy-pub : 1
Duration: N/A, start: 0.000000, bitrate: 96 kb/s
Stream #0:0: Audio: mp3, 48000 Hz, stereo, s16p, 96 kb/s
[udp @ 000000000244bec0] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
[udp @ 00000000024781a0] 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
Stream mapping:
Stream #0:0 -> #0:0 (mp3 (native) -> adpcm_g722 (g722))
Press [q] to stop, [?] for help
Output #0, rtp, to 'rtp://192.168.0.99:555':
Metadata:
icy-name : NRK mP3
icy-pub : 1
encoder : Lavf57.72.101
Stream #0:0: Audio: adpcm_g722 (g722), 16000 Hz, mono, s16, 64 kb/s
Metadata:
encoder : Lavc57.93.100 g722
SDP:
v=0
o=- 0 0 IN IP4 127.0.0.1
s=No Name
c=IN IP4 192.168.0.99
t=0 0
a=tool:libavformat 57.72.101
m=audio 555 RTP/AVP 9
b=AS:64
size= 413kB time=00:00:49.17 bitrate= 68.8kbits/s speed=1.43x
Does anyone know what im doing wrong? Thanks