Essentially, when I try to save a short, 19 year old .avi clip with the following properties:
=====================================================
Video
=====================================================
Codec 4CC: MJPG
Image Size: 320 x 240
Aspect Ratio: 1:1 (1:1)
Frame Rate: 15.000 fps
Average Bitrate: 2194 kbps
Total Duration: 00:00:30.799
=====================================================
Video Codec Extradata
=====================================================
Size: 0
=====================================================
Audio (1 active track)
=====================================================
Codec: PCM
Channels: Mono
Bitrate: 11024 Bps / 88 kbps
Frequency: 11024 Hz
Total Duration: 00:00:30.800
...using the following parameters...
Video Output - Mpeg4 AVC (x264)
Audio Output - MP3 (lame)
Output Format - MP4 Muxer
Active Video Filter - Rotate
...I receive the following "error" messages:
Audio
Cannot setup audio encoder, make sure your stream is compatible with audio encoder (number of channels, bitrate, format)
Failed
File .mp4 was NOT saved correctly.
Thanks for any guidance!
I think ADM doesn't like clips with 1-channel audio streams. Not sure if it likes PCM audio either. One solution is to convert the audio part of the avi to 2-channel AAC first in FFMPEG:
ffmpeg -i old_file.avi -c:v copy -c:a aac -ac 2 clip_with_2ch_aac.mkv
I don't think mp3 audio is a good idea inside an MP4 container. AAC is the standard audio format. You should just be able in ADM to copy the already converted AAC audio when muxing it into an MP4.
Here's an old avi from a fujifilm camera with mono pcm audio:
Guessed Channel Layout for Input Stream #0.1 : mono
Input #0, avi, from 'Dream World 038.avi':
Duration: 00:00:16.00, start: 0.000000, bitrate: 9357 kb/s
Stream #0:0: Video: mjpeg (Baseline) (MJPG / 0x47504A4D), yuvj422p(pc, bt470bg/unknown/unknown), 640x480, 9235 kb/s, 30 fps, 30 tbr, 30 tbn
Metadata:
Make : FUJIFILM
Model : FinePix S5600
DateTime : 2006:01:08 11:23:10
JPEGInterchangeFormat: 438
JPEGInterchangeFormatLength: 8830
Copyright :
DateTimeOriginal: 2006:01:08 11:23:10
DateTimeDigitized: 2006:01:08 11:23:10
MakerNote :
: 70, 85, 74, 73, 70, 73, 76, 77, 12, 0, 0, 0, 15, 0, 0, 0
: 7, 0, 4, 0, 0, 0, 48, 49, 51, 48, 0, 16, 2, 0, 8, 0
: 0, 0, 198, 0, 0, 0, 1, 16, 3, 0, 1, 0, 0, 0, 3, 0
: 0, 0, 2, 16, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 16, 16
: 3, 0, 1, 0, 0, 0, 2, 0, 0, 0, 17, 16, 10, 0, 1, 0
: 0, 0, 206, 0, 0, 0, 32, 16, 3, 0, 1, 0, 0, 0, 0, 0
: 0, 0, 33, 16, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 48, 16
: 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 49, 16, 3, 0, 1, 0
: 0, 0, 0, 0, 0, 0, 0, 17, 3, 0, 1, 0, 0, 0, 0, 0
: 0, 0, 0, 18, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 19
: 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 19, 3, 0, 1, 0
: 0, 0, 0, 0, 0, 0, 2, 19, 3, 0, 1, 0, 0, 0, 0, 0
: 0, 0, 0, 0, 0, 0, 78, 79, 82, 77, 65, 76, 32, 0, 0, 0
: 0, 0, 100, 0, 0, 0
title : FUJIFILM AVI STREAM 0100
Stream #0:1: Audio: pcm_u8 ([1][0][0][0] / 0x0001), 16000 Hz, mono, u8, 128 kb/s
And here's the same clip after the conversion I described:
Input #0, matroska,webm, from 'mono_to_stereo.mkv':
Metadata:
ENCODER : Lavf59.17.101
Duration: 00:00:16.06, start: 0.000000, bitrate: 9281 kb/s
Stream #0:0: Video: mjpeg (Baseline), yuvj422p(pc, bt470bg/unknown/unknown), 640x480, 30 fps, 30 tbr, 1k tbn
Metadata:
title : FUJIFILM AVI STREAM 0100
MAKE : FUJIFILM
MODEL : FinePix S5600
DATETIME : 2006:01:08 11:23:10
JPEGINTERCHANGEFORMAT: 438
JPEGINTERCHANGEFORMATLENGTH: 8830
COPYRIGHT :
DATETIMEORIGINAL: 2006:01:08 11:23:10
DATETIMEDIGITIZED: 2006:01:08 11:23:10
MAKERNOTE :
: 70, 85, 74, 73, 70, 73, 76, 77, 12, 0, 0, 0, 15, 0, 0, 0
: 7, 0, 4, 0, 0, 0, 48, 49, 51, 48, 0, 16, 2, 0, 8, 0
: 0, 0, 198, 0, 0, 0, 1, 16, 3, 0, 1, 0, 0, 0, 3, 0
: 0, 0, 2, 16, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 16, 16
: 3, 0, 1, 0, 0, 0, 2, 0, 0, 0, 17, 16, 10, 0, 1, 0
: 0, 0, 206, 0, 0, 0, 32, 16, 3, 0, 1, 0, 0, 0, 0, 0
: 0, 0, 33, 16, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 48, 16
: 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 49, 16, 3, 0, 1, 0
: 0, 0, 0, 0, 0, 0, 0, 17, 3, 0, 1, 0, 0, 0, 0, 0
: 0, 0, 0, 18, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 19
: 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 19, 3, 0, 1, 0
: 0, 0, 0, 0, 0, 0, 2, 19, 3, 0, 1, 0, 0, 0, 0, 0
: 0, 0, 0, 0, 0, 0, 78, 79, 82, 77, 65, 76, 32, 0, 0, 0
: 0, 0, 100, 0, 0, 0
DURATION : 00:00:16.064000000
Stream #0:1: Audio: aac (LC), 16000 Hz, stereo, fltp
Metadata:
ENCODER : Lavc59.20.100 aac
DURATION : 00:00:16.064000000
Dan.
BTW, when I tried that fujifilm avi, with its mono pcm audio, in the ADM v2.81 25JAN2022 nightly, it loaded fine and allowed me to create an MP4 with an AVC video stream and a mp3-format mono audio stream.
Quote from: maclenin on March 05, 2022, 06:37:02 PMBitrate: 11024 Bps / 88 kbps
Frequency: 11024 Hz
1-bit recording?? Can Avidemux play this audio track at all?
Anyway, libavformat (the MP4 muxer) won't accept audio tracks with non-standard, low sampling frequency. You need to insert a resampler e.g. to 22050 Hz which should work then.