[FFmpeg-user] I can't mux pcm into mka with FFmpeg.

bat guano batguano999 at hotmail.com
Mon Jul 18 17:45:15 CEST 2011


Hi
I have a problem when muxing pcm audio in mka.

If I record system sound it's OK with these commands:-

ffmpeg -y -f alsa -ac 2 -i pulse -acodec pcm_s16le audio1.wav
ffmpeg -y -f alsa -ac 2 -i pulse -acodec flac audio2.mka

But if I try to put pcm into mka it gives "non monotonically increasing dts" errors:-
ffmpeg -y -f alsa -ac 2 -i pulse -acodec pcm_s16le audio3.mka

This also causes problems when muxing pcm with x264 in mkv for screencasts-
ffmpeg -f alsa -ac 2 -i pulse -f x11grab -r 15 -s 1024x768 -i :0.0 -acodec pcm_s16le -vcodec libx264 -vpre lossless_ultrafast video.mkv

I must use acodec flac instead of pcm_s16le.


I'm using Ubuntu 10.04.
Is there something wrong with FFmpeg, or is it a problem with my system?


********************************************************************
Bad result using mka:-

ron at ubuntu:~$ ffmpeg -y -f alsa -ac 2 -i pulse -acodec pcm_s16le audio3.mka
ffmpeg version N-31556-g3c3daf4, Copyright (c) 2000-2011 the FFmpeg developers
  built on Jul 18 2011 16:18:44 with gcc 4.4.3
  configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab --disable-encoder=vorbis --enable-libvo-amrwbenc --enable-libvo-aacenc
  libavutil    51. 11. 0 / 51. 11. 0
  libavcodec   53.  8. 0 / 53.  8. 0
  libavformat  53.  6. 0 / 53.  6. 0
  libavdevice  53.  2. 0 / 53.  2. 0
  libavfilter   2. 27. 0 /  2. 27. 0
  libswscale    2.  0. 0 /  2.  0. 0
  libpostproc  51.  2. 0 / 51.  2. 0
[alsa @ 0xa03b380] Estimating duration from bitrate, this may be inaccurate
Input #0, alsa, from 'pulse':
  Duration: N/A, start: 1311002693.496999, bitrate: N/A
    Stream #0.0: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
Output #0, matroska, to 'audio3.mka':
  Metadata:
    encoder         : Lavf53.6.0
    Stream #0.0: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
Press [q] to stop, [?] for help
[matroska @ 0xa04fd20] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 1 >= 1
av_interleaved_write_frame(): Invalid argument


********************************************************************
Good result using wav:-

ron at ubuntu:~$ ffmpeg -y -f alsa -ac 2 -i pulse -acodec pcm_s16le audio1.wav
ffmpeg version N-31556-g3c3daf4, Copyright (c) 2000-2011 the FFmpeg developers
  built on Jul 18 2011 16:18:44 with gcc 4.4.3
  configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab --disable-encoder=vorbis --enable-libvo-amrwbenc --enable-libvo-aacenc
  libavutil    51. 11. 0 / 51. 11. 0
  libavcodec   53.  8. 0 / 53.  8. 0
  libavformat  53.  6. 0 / 53.  6. 0
  libavdevice  53.  2. 0 / 53.  2. 0
  libavfilter   2. 27. 0 /  2. 27. 0
  libswscale    2.  0. 0 /  2.  0. 0
  libpostproc  51.  2. 0 / 51.  2. 0
[alsa @ 0xa667380] Estimating duration from bitrate, this may be inaccurate
Input #0, alsa, from 'pulse':
  Duration: N/A, start: 1311002922.604172, bitrate: N/A
    Stream #0.0: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
Output #0, wav, to 'audio1.wav':
  Metadata:
    encoder         : Lavf53.6.0
    Stream #0.0: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
Press [q] to stop, [?] for help
size=    3402kB time=00:00:18.14 bitrate=1536.0kbits/s    
video:0kB audio:3402kB global headers:0kB muxing overhead 0.001263%
Received signal 2: terminating.


 		 	   		  


More information about the ffmpeg-user mailing list