audio


After transcoding using ffmpeg, I found audio bitrate is not the value I expected


I used ffmpeg to transcode some files into new format and with certain parameters. After transcoding, I found some output file's metadata is not what I expected, the output value is not the same with I set in the cmd line.
Before transcoding I check the media info of the inputfile:
ffmpeg -i dz2015082000010.mpg
ffmpeg version 3.2.4 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 4.8.3 (GCC) 20140911 (Red Hat 4.8.3-9)
configuration: --enable-static --enable-memalign-hack --enable-libx264
--enable-gpl --enable-pthreads --enable-version3 --enable-avisynth --enable-bzlib --enable-iconv --enable-zlib --enable-nonfree --extra-cflags=-I/usr/local/include/ --extra-ldflags=-L/usr/local/lib --enable-debug=3 --disable-optimizations --enable-nonfree --enable-libmp3lame libavutil 55. 34.101 / 55. 34.101 libavcodec 57. 64.101 / 57. 64.101 libavformat 57. 56.101 /
57. 56.101 libavdevice 57. 1.100 / 57. 1.100 libavfilter 6. 65.100 / 6. 65.100 libswscale 4. 2.100 / 4. 2.100 libswresample 2. 3.100 / 2. 3.100 libpostproc 54. 1.100 /
54. 1.100 Input #0, mpeg, from 'dz2015082000010.mpg': Duration: 00:01:49.30, start: 0.685389, bitrate: 15723 kb/s
Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, top first), 1920x1080 [SAR 1:1 DAR 16:9], 15000 kb/s, 25 fps, 25 tbr,
90k tbn, 50 tbc
Stream #0:1[0x1c0]: Audio: mp2, 48000 Hz, stereo, s16p, 384 kb/s At least one output file must be specified
Next, transcoding with the cmd line:
ffmpeg -i dz2015082000010.mpg -vcodec libx264 -b:v 4000k -s 1920x1080 -r 25 -g 25 -vprofile main -acodec aac -strict -2 -b:a 128k -ac 2 -ar 44100 -y output.ts
After transcoding, I check the media info of the output file:
ffmpeg -i output.ts
ffmpeg version 3.2.4 Copyright (c) 2000-2017 the FFmpeg developers built with gcc 4.8.3 (GCC) 20140911 (Red Hat
4.8.3-9) configuration: --enable-static --enable-memalign-hack --enable-libx264 --enable-gpl --enable-pthreads --enable-version3 --enable-avisynth --enable-bzlib --enable-iconv --enable-zlib --enable-nonfree --extra-cflags=-I/usr/local/include/ --extra-ldflags=-L/usr/local/lib --enable-debug=3 --disable-optimizations --enable-nonfree --enable-libmp3lame libavutil 55. 34.101 / 55. 34.101 libavcodec 57. 64.101
/ 57. 64.101 libavformat 57. 56.101 / 57. 56.101
libavdevice 57. 1.100 / 57. 1.100 libavfilter 6. 65.100
/ 6. 65.100 libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100 libpostproc 54. 1.100
/ 54. 1.100 Input #0, mpegts, from 'full-2.ts': Duration:
00:01:49.30, start: 1.456778, bitrate: 4455 kb/s Program 1
Metadata:
service_name : Service01
service_provider: FFmpeg
Stream #0:0[0x100]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr,
90k tbn, 50 tbc
Stream #0:1[0x101]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 4 kb/s At least one output file must be
specified
I don't know why the audio bitrate is changed to 4 kb/s after transcoding, I set the value with -b:a 128k before, anybody can help me? BTW, the output file sounds all right.
The native encoder won't waste bits on silent portions. And it doesn't do strict CBR. If you really need an output to be around the target bitrate, you can mix in a very low level of noise.

Related Links

gstreamer pipeline to mix three audio source?
Mute specified sections of an audio file using ffmpeg
How can I programmatically process audio files in a folder system? [closed]
Determining the 'amount' of speaking in a video
How to stream an audio file without be downloadable and hiding the original file name/address?
Stream audio from web browser
Will streaming .wav audio with Xamarin make any compression?
Voice authentication
Splitting review audio files into speech segments (sentences/phrases)
How do you open an audio file in mpv using the terminal without the album art opening along with it?
Web audio - How to call a function based on current Time?
What is the bitrate of my audio file based on ffmpeg output?
Control Video input/ Visualization with Volume and BPM
how do i implement creating mp3s on the fly?
Arduino and MP3 Shield not working simultaneously with information received from Pieszo sensor
Play a sound when download is ready

Categories

HOME
git
multidimensional-array
hardware
dfa
uwp-xaml
boost
servicestack
linuxmint
instagram-api
outlook-addin
android-animation
purescript
crystal-reports-xi
log4net
docbook
alexa-voice-service
affinity
xamarin.mac
cognos-10
jxmaps
sprite
greedy
react-apollo
mikrotik
cut
angle
structured-data
sandbox
navigation-drawer
biblatex
povray
induction
infowindow
uppercase
handbrake
gunicorn
each
r6
media-type
parasoft
ios6
burn
mosync
rt
subtitle
generated
equation
bubble-sort
greenlets
audio-player
launch-agent
turtle-rdf
ucp
mockery
dde
timedelta
nsolid
testdroid
lunrjs
grid-layout
yahoo-messenger
divider
pdl
mks-integrity
realbasic
7digital
avm2
bitarray
unexpectendoffile
certificatestore
cloudcontrol
agsxmpp
seeding
ttml
virtual-address-space
appcompat-v7-r22.1
fast-esp
option
n-tier
numpad
factoring
offlineapps
texmacs
stubs
craftyjs
hierarchyid
stackmob
struts2-tiles-plugin
wsimport
ios6.1
customer-support
memory-mapped-files
keymando
addr2line
sts-securitytokenservice
iphone-sdk-3.0
pasteboard
windows-explorer
xcode4.1
viewexpiredexception
rakefile
reverse-debugging
resource-cleanup
testing-strategies

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile