Opened 12 years ago

Closed 12 years ago

#3471 closed defect (worksforme)

nuvexport - wrong audio bitrate with ffmpeg

Reported by: anonymous Owned by: xris
Priority: minor Milestone: unknown
Component: perl / nuvexport Version: unknown
Severity: low Keywords: nuvexport ffmpeg
Cc: Ticket locked: no


When i use nuvexport with ffmpeg for Xvid export, nuvexport produces Xvid files that seem incorrect (for approx. 2 months). These files can be played with no error with mplayer, but if i try to play them with a hardware player (based on EM8511 chip, such as Tvix), the sound is broken, fastforward is impossible, and the player can hang. I don't think this is a bug of the harware player, because, file information on the generated files (by a 'ffmpeg -i') gives the following:

  Duration: 00:41:15.3, start: 0.000000, bitrate: 1471 kb/s
  Stream #0.0: Video: mpeg4, yuv420p, 640x480, 25.00 fps(r)
  Stream #0.1: Audio: mp3, 48000 Hz, stereo, 0 kb/s

Did you notice the last line : Audio 0 kb/s?

ffmpeg has recently changed some command line arguments (I use ffmpeg 20070329 on Debian Testing). According to the ffmpeg's doc and examples ( (...) -ab 128k (...)), the '-ab' (audio bitrate) flag must be followed by a bitrate and a 'k' (or another unit, of course), whereas nuvexport does not use this 'k'. export/ffmpeg/ contains, line 182 (SVN version):

     .' -ab '.$self->{'a_bitrate'}

If i add a simple 'k' like this:

     .' -ab '.$self->{'a_bitrate'}.'k'

generated Xvid files are Ok, and 'ffmpeg -i' gives the following info:

  Duration: 00:41:15.3, start: 0.000000, bitrate: 1439 kb/s
  Stream #0.0: Video: mpeg4, yuv420p, 640x480, 25.00 fps(r)
  Stream #0.1: Audio: mp3, 48000 Hz, stereo, 96 kb/s

There is no more '0 kb/s' and the file works perfectly on my player. Note that the '-ab' flag is used in each file in 'export/ffmpeg', so the problem can arise with other formats.

Perhaps this bug could explain some other problems with nuvexport/ffmpeg such as (nuvexport - drastic quality difference)?

I suppose this change does not work with old versions of ffmpeg (before March/April? 07?). I know that nuvexport checks the ffmpeg version (export/, line 70) but since I don't know which version introduces new command-line arguments, I don't know how to use version checking (and I must admit my knowledge of Perl is very limited!).

Hope this will help.


Change History (1)

comment:1 Changed 12 years ago by xris

Resolution: worksforme
Status: newclosed

This should have been fixed in July or earlier.

Note: See TracTickets for help on using tickets.