Opened 4 years ago

Closed 4 years ago

#4267 closed defect (fixed)

mp3 with small sample rate cannot be muxed into mp4

Reported by: mino87.san Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: mov
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Hi,
i'm a begginer in ffmpeg.
I wrote some code that creates a video from a cutout of another video.
I used this code many times but today, with a new input video, I took this error:
'Could not write header for output file #0 (incorrect codec parameters ?): Error number -22 occurred'

this is mine ffmpeg parameters '-y -ss 00:05:45 -i C:\Users\minaris\Desktop\RitaglioVideo?\jovi.avi -t 00:00:05 -c copy -avoid_negative_ts 1 ATTACCHI.1.1.mp4'

and this is the ouput:


ffmpeg version N-67250-g5b86447 Copyright (c) 2000-2014 the FFmpeg developers

built on Oct 28 2014 22:12:29 with gcc 4.9.1 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-zlib
libavutil 54. 11.100 / 54. 11.100
libavcodec 56. 10.100 / 56. 10.100
libavformat 56. 11.100 / 56. 11.100
libavdevice 56. 2.100 / 56. 2.100
libavfilter 5. 2.100 / 5. 2.100
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100

Input #0, avi, from 'C:\Users\minaris\Desktop\RitaglioVideo?\jovi.avi':

Metadata:

encoder : Lavf54.63.104

Duration: 00:24:00.56, start: 0.000000, bitrate: 1538 kb/s

Stream #0:0: Video: mpeg4 (Simple Profile) (xvid / 0x64697678), yuv420p, 640x360 [SAR 1:1 DAR 16:9], 1497 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc
Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 12000 Hz, mono, s16p, 32 kb/s

[mp4 @ 0000000005201de0] track 1: muxing mp3 at 12000hz is not supported
Output #0, mp4, to 'ATTACCHI.1.1.mp4':

Metadata:

encoder : Lavf56.11.100
Stream #0:0: Video: mpeg4 ( [0][0][0] / 0x0020), yuv420p, 640x360 [SAR 1:1 DAR 16:9], q=2-31, 1497 kb/s, 25 fps, 12800 tbn, 25 tbc
Stream #0:1: Audio: mp3 (i[0][0][0] / 0x0069), 12000 Hz, mono, 32 kb/s

Stream mapping:

Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)

Could not write header for output file #0 (incorrect codec parameters ?): Error number -22 occurred


Can someone help me?!?

Attachments (1)

out8000.mp4 (342.9 KB) - added by cehoyos 4 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 4 years ago by michael

Where can the input video be found?

comment:2 Changed 4 years ago by michael

  • Resolution set to needs_more_info
  • Status changed from new to closed

Cant reproduce without the input video
please reopen once all information to reproduce is available

comment:3 Changed 4 years ago by cehoyos

  • Resolution needs_more_info deleted
  • Status changed from closed to reopened

Changed 4 years ago by cehoyos

comment:4 Changed 4 years ago by mino87.san

Sorry but is a big video i posted on this site: http://file-post.net/en/fp8/d1/1422442513_53604968_120/?id=vJ2qQA9IbI6f

Please care about that file will be deleted in 5Day(s)(02/02/2015, 11:55(MEZ)).

comment:5 Changed 4 years ago by michael

  • Reproduced by developer set
  • Resolution set to fixed
  • Status changed from reopened to closed

comment:6 Changed 4 years ago by cehoyos

  • Component changed from ffmpeg to avformat
  • Keywords mov added
  • Priority changed from important to normal
  • Resolution fixed deleted
  • Status changed from closed to reopened
  • Summary changed from Error number -22 occurred to mp3 with small sample rate cannot be muxed into mp4
  • Version changed from unspecified to git-master

The title was arguably useless but the issue is still reproducible.

comment:7 Changed 4 years ago by michael

  • Resolution set to fixed
  • Status changed from reopened to closed

Fixed in 023040ed0d26339d39151d4850eff6dde1716b6d
you need "-strict -1" now to put <16khz mp3 in mp4

Note: See TracTickets for help on using tickets.