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

  • From: "ttcoder" <trac@xxxxxxxxxxxx>
  • Date: Tue, 21 Oct 2014 20:42:55 -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:  R1/alpha5
  Component:  Audio & Video/Codecs  |    Version:  R1/Development
 Resolution:                        |   Keywords:
 Blocked By:                        |   Blocking:  10722
Has a Patch:  0                     |   Platform:  All
------------------------------------+----------------------------

Comment (by ttcoder):

 Very clear picture of the situation, allowed me to dig into this. Not
 going to tackle the input decoding right now (naïve idea: maybe it's just
 mis-handling of B_LAST_BUFFER status code?), but focused on the encoders
 still.

 It seems the fault is indeed with the gcc2 build of ffmpeg 0.x itself,
 independantly of the "glue" code that ties it into the Media Kit.

 Indeed, using it stand-alone from the command-line I got nothing but
 errors, failures, and one crash (in malloc()) for these attempts:
 {{{
 ffmpeg -i 01breakin_benjamin__so_cold.mp3  01breakin_benjamin__so_cold.aac
 ffmpeg -i 01breakin_benjamin__so_cold.mp3  01breakin_benjamin__so_cold.ac3
 ffmpeg -i 01breakin_benjamin__so_cold.mp3
 01breakin_benjamin__so_cold.alac
 ffmpeg -i 01breakin_benjamin__so_cold.mp3  01breakin_benjamin__so_cold.ogg
 ffmpeg -i 01breakin_benjamin__so_cold.mp3
 01breakin_benjamin__so_cold.vorbis
 ffmpeg -i 01breakin_benjamin__so_cold.mp3  -acodec vorbis
 01breakin_benjamin__so_cold.ogg
 ffmpeg -i 01breakin_benjamin__so_cold.mp3  -acodec vorbis -aq 100
 01breakin_benjamin__so_cold.ogg
 }}}

 This one, however, is pure gold:
 {{{
 ffmpeg -i 01breakin_benjamin__so_cold.mp3  01breakin_benjamin__so_cold.mp2
 }}}

 Tried that encoding ('''mpeg layer 2''') on a few files.. It outputs the
 same size and audio quality as lame, but where lame takes e.g. 11 seconds
 to create an .mp3, ffmpeg creates an .mp2 in less than 2 seconds (!).
 Awesome.

 Question...

 Could that be the base of a media-kit encoder, technically ? I guess so.
 As to the "lawyer" side of the equation, I know Haiku can't pay the $$ fee
 to enable this out of the box, but could it be made an optional build
 feature, so that some of us can just "jam -q {add-ons,add-
 ons/x86}/media/plugins/ffmpeg" and use it with the mp2 capability ?

 Otherwise I'll ask about the feasibility of using the recent ffmpeg 2.x in
 a gcc4 or gcc4h build of Haiku :-)  I suppose the best place to start
 would be to look for a recipe for those on Haikuports.

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

Other related posts: