[haiku-bugs] Re: [Haiku] #9616: MediaConverter doesn't convert to OGG or MP3 and converts to WAV with video

  • From: "pulkomandy" <trac@xxxxxxxxxxxx>
  • Date: Mon, 05 Jan 2015 15:49:25 -0000

#9616: MediaConverter doesn't convert to OGG or MP3 and converts to WAV with 
video
------------------------------------+----------------------------
   Reporter:  Kev                   |      Owner:  nobody
       Type:  enhancement           |     Status:  new
   Priority:  normal                |  Milestone:  Unscheduled
  Component:  Audio & Video/Codecs  |    Version:  R1/Development
 Resolution:                        |   Keywords:
 Blocked By:                        |   Blocking:  10722
Has a Patch:  0                     |   Platform:  All
------------------------------------+----------------------------
Changes (by pulkomandy):

 * milestone:  R1/beta1 => Unscheduled


Comment:

 This should be fixed for good in hrev48552 and hrev48554.

 hrev48552 fixed the issue of truncating the end of the sound. This was a
 bug in MediaConverter only, Media Kit was not at fault. Now files will be
 converted completely and removed from the list when processing is
 finished.

 The bulk of the fixes is in http://cgit.haiku-
 os.org/haiku/commit/?id=5e0e16894d67e220b4684809b154b85db4229381 . The
 problem was that libavcodec only accepts some input formats when encoding.
 The set of formats depends on the encoder used. We were ignoring this, and
 we forced ffmpeg to use a format it was unable to handle. Now the ffmpeg
 media plug-in will notice this and adjust the format for media kit
 negotiation. This got several more formats working, including AAC and AC3,
 which are lossy formats similar to Vorbis and MP3.

 To make this work, there is an extra change in MediaConverter: http://cgit
 .haiku-os.org/haiku/commit/?id=974595bc4673e6e443ae7b6c775cf9461ff2f23d
 What we do here is tell the decoder about the constraints of the encoder
 on the audio format. The decoder is able to perform the required format
 conversion, so it outputs data in the correct format for the encoder.
 Other applications using the media kit may need to be adjusted in a
 similar way.

 Finally, I tweaked the format families a bit so only some working
 combinations are possible. Matroska (MKV) seems to be the most reliable
 container and can hold all supported formats: flac, aac, ac3, and raw
 audio. Other containers (avi, dv, mpeg, ogg, wav) can only use some of the
 formats.

 I'm leaving this ticket open as there is still no Vorbis or MP3 output,
 however it works well enough for Beta1 so I'm moving out of the milestone.

--
Ticket URL: <https://dev.haiku-os.org/ticket/9616#comment:33>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: