Florent Le Coz
fdcb2873e1
Fix the mime types for MPEG and MPEG-TS formats
...
As per the RFCs:
http://tools.ietf.org/html/rfc3555#page-38
http://tools.ietf.org/html/rfc3003
11 years ago
Michael Niedermayer
fab50573bb
avformat/mp3enc: switch to AVFMT_FLAG_BITEXACT
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
eccec20397
avformat/mp3enc: drop redundant and uninitialized variable
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
617a1a98a6
mp3enc: Properly write bitrate value in XING header
...
Instead of using a fixed bitrate_idx, calculate a matching bitrate for
the XING header.
Using a fixed bitrate_idx causes tools such as file(1) and mediainfo(1)
to report wrong bitrate and bitrate mode when using CBR.
Bug-Id: https://bugs.debian.org/736088
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
11 years ago
Michael Niedermayer
d003a0cd2e
avformat/mp3enc: use av_copy_packet()
...
Fixes double free
Fixes Ticket3476
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
James Darnley
0de03fd6a1
lavf/id3v2enc: use metadata_header_padding
...
As with the change to flacenc this allows the user to control the amount
of padding they want added to the file.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Anton Khirnov
33018907bd
mp3enc: allow omitting the id3v2 header with -id3v2_version 0
11 years ago
Anton Khirnov
f9cc6883a4
mp3enc: add an option for disabling the Xing frame.
11 years ago
Michael Niedermayer
49515cb840
avformat: remove duplicate includes
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Vittorio Giovara
c0779a67e8
mp3: add .mpa extension
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
11 years ago
Anton Khirnov
1afddbe59e
avpacket: use AVBuffer to allow refcounting the packets.
...
This will allow us to avoid copying the packets in many cases.
This breaks ABI.
12 years ago
Clément Bœsch
2dd0da787c
lavf/mp3enc: make sure the header is valid before writing audio pkt.
...
An invalid header can lead avpriv_mpegaudio_decode_header() to overread
and/or div by zero.
12 years ago
Michael Niedermayer
cb65b32c97
mp3enc: remove unneeded null ptr check
...
Fixes: CID733746
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
d31098113f
mp3enc: fix signed C99 overflow
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
744e4429cf
mp3enc: merge mp2/mp3_write_trailer
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
197bbcf44c
mp3enc: move mp3_update_xing() down
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
7040c9fac2
mp3enc: write Xing TOC
...
Based on the code by:
Peter Belkner <pbelkner@snafu.de>,
Michael Niedermayer <michaelni@gmx.at>,
Clément Bœsch <clement.boesch@smartjog.com>,
Reimar Döffinger <Reimar.Doeffinger@gmx.de>, and
Tobias Rapp <t.rapp@noa-audio.com>
Alex Converse <alex.converse@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
12 years ago
Clément Bœsch
ca8e39dd0d
mp3enc: support MPEG-2 and MPEG-2.5 in Xing header.
12 years ago
Reimar Döffinger
6365e4db79
mp3enc: downgrade some errors in writing Xing frame to warnings
...
Also clarify the meaning of the log message.
12 years ago
Carl Eugen Hoyos
407eeb3474
mp2 muxer: mark as AVFMT_NOTIMESTAMPS.
...
Signed-off-by: Alex Converse <alex.converse@gmail.com>
12 years ago
Martin Storsjö
e6153f173a
avopt: Store defaults for AV_OPT_TYPE_INT in the i64 union member
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Michael Niedermayer
370bb893d2
mp3enc: fix const correctness
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
bd6ece4609
mp3enc: fix CODEC_ID/CodecID that leaked in from older patch
...
Found-by: jamal <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
7fd467f708
mp3/mp2: identify the video codecs as APIC through query_codec.
...
Fixes Ticket1408
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
12 years ago
Diego Biurrun
0177b7d23a
Improve descriptiveness of a number of codec and container long names
12 years ago
Michael Niedermayer
57d5a224ce
mp3enc: add lame tag with start padding info
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Clément Bœsch
ca297513f0
lavf/mp3enc: support MPEG-2 and MPEG-2.5 sample rates when writing Xing header.
13 years ago
Michael Niedermayer
f14f3bae6b
mp3enc: avoid ifdef
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Tobias Rapp
8da0a6cda1
mp3enc: Fix Xing tag identification string for CBR files
...
Fixes the Xing tag identification string to be "Info" for MP3 files with
constant bitrate. The previous "Xing" caused some decoders to recognize the
file as VBR.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Reimar Döffinger
4c53c66a21
mp3enc: clarify meaning of "Unsupported" messages.
...
They will only cause us to skip writing the Xing header,
not cause any serious breakage.
Related to trac issue #1027 .
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
13 years ago
Martin Storsjö
20234a4bd7
cosmetics: Align muxer/demuxer declarations
...
Also add missing trailing commas, break long codec_tag lines and
add spaces in codec_tag declarations.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Anton Khirnov
2dfea12058
mp3enc: write attached pictures (APIC).
13 years ago
Anton Khirnov
c68148b1ea
mp3enc: move mp3_write_xing() further up in the file.
...
It will be need by new functions called from mp3_write_trailer().
13 years ago
Anton Khirnov
411225aabc
id3v2enc: split ff_id3v2_write().
...
This will allow writing the tag in several steps, needed for writing
attached pictures.
13 years ago
Michael Niedermayer
4dbdd3ec6f
mp3enc: fix "warning: best_bitrate_idx may be used uninitialized in this function"
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Clément Bœsch
e1a8164d62
mp3enc: fix playback with mp3 encoded files on some devices.
...
This partially reverts 1fea432b; header variable needs to keep its value
in case it triggers "if (needed <= c.frame_size)".
13 years ago
Paul B Mahol
73ba2c1e62
mp3enc: remove unused variable
13 years ago
Michael Niedermayer
40176fc314
mp3enc: Try to use a matching bitrate in the xing header.
...
Might Fix Ticket431
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
1fea432b7a
mp3enc: simplify mp3_write_xing()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Reimar Döffinger
bb3244dee2
Replace all usage of strcasecmp/strncasecmp
...
All current usages of it are incompatible with localization.
For example strcasecmp("i", "I") != 0 is possible, but would
break many of the places where it is used.
Instead use our own implementations that always treat the data
as ASCII.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Reimar Döffinger
96949dafcc
Replace all strcasecmp/strncasecmp usages.
...
All current usages of it are incompatible with localization.
For example strcasecmp("i", "I") != 0 is possible, but would
break many of the places where it is used.
Instead use our own implementations that always treat the data
as ASCII.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
13 years ago
Tobias Rapp
0f39fa0279
mp3enc: avoid truncating id3v1 tags by one byte
...
Avoid writing the trailing null-byte for id3v1 tags if length reaches max length.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Karcher
16ad77b357
Move id3v2 tag writing to a separate file.
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
13 years ago
Anton Khirnov
82ab61f901
lavc: use avpriv_ prefix for some mpegaudio symbols used in lavf.
...
Specifically, ff_mpa_freq_tab, ff_mpa_bitrate_tab, ff_mpa_decode_header,
ff_mpegaudio_decode_header.
13 years ago
Anton Khirnov
145f741e11
AVOptions: rename FF_OPT_TYPE_* => AV_OPT_TYPE_*
13 years ago
Carl Eugen Hoyos
262ab1c59a
Do not assume timestamps for mp2 format.
13 years ago
Diogo Franco
f1f298cd32
Do not write ID3v1 tags by default
...
ID3v1 are legacy tags with several limitations; furthermore
avconv/ffmpeg writes the tags in UTF-8 which probably has near-0
software support.
Add a -write_id3v1 option to be able to turn it on; disabled by default.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
13 years ago
Anton Khirnov
dfc2c4d900
lavf: use designated initialisers for all (de)muxers.
...
It's more readable and less prone to breakage.
14 years ago
Anton Khirnov
bda168d2b0
mp3enc: write a xing frame containing number of frames in the file
14 years ago