[Asterisk-video] Record 3GP files (only with AMRNB)

Sergio Garcia Murillo sergio.garcia at fontventa.com
Tue Jun 10 14:14:30 CDT 2008


Hi Borja,

I think than forzing 3gpp compliance would bring us more troubles than 
problems it would solve.
How many emails asking, "why can't I record a video with pcmu? please 
help" ;)

BR
Sergio

Borja SIXTO escribió:
> Hi Sergio,
>
> Here a new path.
> 3GP is a strict format (not allow linear codecs).
> We can lock the audio codec to AMRNB (for the .3gp files) in the mp4save 
> application with :
>
>     /* Lock module */
>     u = ast_module_user_add(chan);
>
>        int length = strlen(data);
>        if (!strcmp(&data[length - 4], ".3gp"))
>        {
>      if (ast_set_read_format(chan, AST_FORMAT_AMRNB))
>         ast_log(LOG_WARNING, "mp4_save: Unable to set read format to 
> AMRNB!\n");
>        }
>        else
>        {
>      if (ast_set_read_format(chan, 
> AST_FORMAT_ULAW|AST_FORMAT_ALAW|AST_FORMAT_AMRNB))
>         ast_log(LOG_WARNING, "mp4_save: Unable to set read format to 
> ULAW|ALAW|AMRNB!\n");
>        }    
>
>     /* Send video update */
>     ast_indicate(chan, AST_CONTROL_VIDUPDATE);
>
> The permisive format can be mp4 extension.
>
> Regards,
>
>
> Tech from i6net
>
>
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
>
> asterisk-video mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-video
>   





More information about the asterisk-video mailing list