GNOME Bugzilla – Bug 539847
G.726 coding/decoding doesn't work
Last modified: 2008-06-24 06:04:23 UTC
This command: $ gst-launch --gst-debug=1 audiotestsrc ! ffenc_g726 bitrate=16000 ! ffdec_g726 ! alsasink should produce sound in the speakers but it only produces such an output on the screen: Setting pipeline to PAUSED ... Pipeline is PREROLLING ... 0:00:00.211707444 9753 0x8194ba0 ERROR ffmpeg :0:: G726: unsupported audio format 0:00:00.212208150 9753 0x8194ba0 ERROR ffmpeg :0:: G726: unsupported audio format (...) 0:00:00.429526944 9753 0x8194ba0 ERROR ffmpeg :0:: G726: unsupported audio format 0:00:00.429924160 9753 0x8194ba0 ERROR ffmpeg :0:: G726: unsupported audio format Caught interrupt -- 0:00:00.434271630 9753 0x8194ba0 ERROR ffmpeg :0:: G726: unsupported audio format 0:00:00.434819205 9753 0x8194ba0 ERROR ffmpeg :0:: G726: unsupported audio format (...) 0:00:00.456279516 9753 0x8194ba0 ERROR ffmpeg :0:: G726: unsupported audio format 0:00:00.456680324 9753 0x8194ba0 ERROR ffmpeg :0:: G726: unsupported audio format handling interrupt. Interrupt: Stopping pipeline ... ERROR: pipeline doesn't want to preroll. Setting pipeline to NULL ... 0:00:00.460869541 9753 0x8194ba0 ERROR ffmpeg :0:: G726: unsupported audio format I tried setting bit_rate, channels, codec_id and sample_rate in code. I got rid of errors but I get only silence in my speakers. The weird thing is that frame_size is always 0.
This looks much like a duplicate of bug #532422. Quoting libavcodec/g726.c: if (avctx->channels != 1 || (avctx->bit_rate != 16000 && avctx->bit_rate != 24000 && avctx->bit_rate != 32000 && avctx->bit_rate != 40000)) { av_log(avctx, AV_LOG_ERROR, "G726: unsupported audio format\n"); return -1; } if (avctx->sample_rate != 8000 && avctx->strict_std_compliance>FF_COMPLIANCE_INOFFICIAL) { av_log(avctx, AV_LOG_ERROR, "G726: unsupported audio format\n"); return -1; } These additional limitations should be exposed on the pad template caps. *** This bug has been marked as a duplicate of 532422 ***