News:

--

Main Menu

Crash when converting from 3gp to MPEG-4 AVC

Started by deanhill1971, November 24, 2011, 06:44:25 PM

Previous topic - Next topic

deanhill1971

I have a 3gp video from a Blackberry phone that I'm trying to convert to an m4v to play on an iPhone or in iTunes.
I'm using Avidemux 2.5.4 (r7200) under Windows 7 32-bit.

Using these settings gives me the error "[BuildChain] Encoder initialization failed. Not activated, make sure number of channels and bitrate are compatible with encoder!"
   Video MPEG-4 AVC
   Audio AAC (Faac)
   Format MP4

Suspecting the error was caused by the AAC conversion, I changed the audio setting to MP3 as follows.
With these settings, I get a "Crash. Press OK to build crash info." message. When I click OK, Avidemux hangs.
   Video MPEG-4 AVC
   Audio MP3 (lame)
   Format MP4

I was able to use a different tool (AVANTI) to convert directly from 3gp to m4v, but I thought you all might like to know about this Avidemux crash.

Here is the 3gp video info from MediaInfo.
General
Complete name                    : D:\Temp2\Sam\AVideo.3gp
Format                           : MPEG-4
Format profile                   : 3GPP Media Release 4
Codec ID                         : 3gp4
File size                        : 1.03 MiB
Duration                         : 27s 100ms
Overall bit rate                 : 319 Kbps
Encoded date                     : UTC 2009-11-07 21:31:02
Tagged date                      : UTC 2009-11-07 21:31:02

Video
ID                               : 1
Format                           : MPEG-4 Visual
Format profile                   : Simple@L3
Format settings, BVOP            : Yes
Format settings, QPel            : No
Format settings, GMC             : No warppoints
Format settings, Matrix          : Default (H.263)
Codec ID                         : 20
Duration                         : 26s 849ms
Bit rate mode                    : Constant
Bit rate                         : 302 Kbps
Nominal bit rate                 : 142 Kbps
Width                            : 240 pixels
Height                           : 180 pixels
Display aspect ratio             : 4:3
Frame rate mode                  : Variable
Frame rate                       : 11.248 fps
Minimum frame rate               : 7.519 fps
Maximum frame rate               : 166.667 fps
Color space                      : YUV
Bit depth                        : 8 bits
Scan type                        : Progressive
Compression mode                 : Lossy
Bits/(Pixel*Frame)               : 0.622
Stream size                      : 991 KiB (94%)
Encoded date                     : UTC 2009-11-07 21:31:02
Tagged date                      : UTC 2009-11-07 21:31:02

Audio
ID                               : 2
Format                           : AMR
Format/Info                      : Adaptive Multi-Rate
Format profile                   : Narrow band
Codec ID                         : samr
Duration                         : 27s 100ms
Bit rate mode                    : Constant
Bit rate                         : 12.8 Kbps
Channel(s)                       : 1 channel
Sampling rate                    : 8 000 Hz
Bit depth                        : 13 bits
Stream size                      : 42.3 KiB (4%)
Writing library                  : rimm
Encoded date                     : UTC 2009-11-07 21:31:02
Tagged date                      : UTC 2009-11-07 21:31:02

Agent_007

Try Stereo filter and set resample Hz to 24 000.
I am away between 15th of May - 15th of June. (yes, I am playing D3)

deanhill1971

Thanks Agent_007.

Changing to stereo and the setting the resampling rate worked perfectly when going directly to m4v:
   Video MPEG-4 AVC
   Audio AAC (Faac)
   Format MP4

Two questions:
   Why does specifying stereo and a resampling rate prevent the crash?
   Shouldn't some code changes be made to prevent the crash? At minimum, maybe the crash msg box should give some possible solutions (like setting stero and resampling rate).

I suppose the answer to the second question might be for me to work on the coding changes myself.  :-)
The compiling instructions on the Wiki look pretty complete.

styrol

#3
QuoteWhy does specifying stereo and a resampling rate prevent the crash?
I can't answer any of your questions directly, but I have some user experience in converting audio and video:

Never change the sampling rate, if you don't have to. And if you have to change the sampling rate, use common values (e.g. downsampling 44'100 Hz to 22'050 or to 11'025).
As 8'000 Hz (which is just adequate for human speech) is indeed standard for AMR (a widely spread audio codec in 3gp files), some programs (probably Avidemux too) seem to like only values derived from 44'100 Hz (CD) or 48'000 Hz (DVD). For example the sampling rate (24'000 Hz) suggested by Agent_007 is derived from 48'000 Hz. Maybe 11'025 Hz (derived from source sample rate 44'100 Hz) or rounded value of 11'000 Hz in drown-down menu would also work.

Agent_007

QuoteWhy does specifying stereo and a resampling rate prevent the crash?
Bug in AVIdemux.
Quote
   Shouldn't some code changes be made to prevent the crash? At minimum, maybe the crash msg box should give some possible solutions (like setting stero and resampling rate).
Yes, this can be fixed. But it is not very high on priority list.

QuoteI suppose the answer to the second question might be for me to work on the coding changes myself.  :-)
The compiling instructions on the Wiki look pretty complete.
If you are going to do fixes, please target the AVIdemux 2.6 versions.
I am away between 15th of May - 15th of June. (yes, I am playing D3)

vibes992000

Thanks .. Very helpful .. Solved my problem. I used 11000 Hz setting without changing any other attribute in the audio section.