Results 1 to 4 of 4

Thread: incomplete playback of doubled .amr file on cellphone

  1. #1
    Join Date
    Apr 2008
    Location
    Free State, South Africa
    Beans
    57
    Distro
    Ubuntu

    incomplete playback of doubled .amr file on cellphone

    The following code produces a copy of an amr file that's double the length; the file seems to be played twice:
    Code:
    cp original.amr copy.amr
    cat copy.amr >>original.amr
    The workstation's media player plays what sounds like the original being played twice, which is the desired result. However, the Samsung GT-C3053 cellphone plays for the time of the original file and then stops with a FAILED message. This happens whether the original's length is 3 s or 3 minutes. Is there a way to tweak the amr file so that it's acceptable to the cell's media player and not only that of the Ubuntu box?

  2. #2
    Join Date
    Feb 2007
    Location
    West Hills CA
    Beans
    9,014
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: incomplete playback of doubled .amr file on cellphone

    The amr file format probably has a file header with the file length (in time or bytes) that the Samsung phone respects. It generates an error when the file time or size doesn't match what is in the header. So perhaps edit the amr header? A quick search for amr in the repositories brings up fadecut. Perhaps it can tag your files correctly. Otherwise sox or audacity.
    -------------------------------------
    Oooh Shiny: PopularPages

    Unumquodque potest reparantur. Patientia sit virtus.

  3. #3
    Join Date
    Apr 2008
    Location
    Free State, South Africa
    Beans
    57
    Distro
    Ubuntu

    Re: incomplete playback of doubled .amr file on cellphone

    Thanks for the handy tip, tgalati4.

    Some searching led me to the suggestion that the first 6 bytes be removed from copy.amr before concatenation with original.amr and how to remove those undesired bytes. (If curious, see http://stackoverflow.com/questions/1...matically?rq=1 and http://unix.stackexchange.com/questi...tart-of-a-file)

    Conclusion: modify #1's code to this

    Code:
    dd bs=6 skip=1 if=original.amr of=copy.amr
    cat copy.amr >>original.amr
    Play original .amr on the cell and it works!
    Last edited by blesbok; August 27th, 2013 at 08:35 PM. Reason: typographical errors

  4. #4
    Join Date
    Feb 2007
    Location
    West Hills CA
    Beans
    9,014
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: incomplete playback of doubled .amr file on cellphone

    The best fixes are the ones you discover yourself. Thanks for sharing.
    -------------------------------------
    Oooh Shiny: PopularPages

    Unumquodque potest reparantur. Patientia sit virtus.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •