Using OGG/Vorbis, is there a way to continue to record to an existing audio file?












5














I am using Vorbis/ogg to record audio (using arecord and then pipping to oggenc). I have downloaded oggvideotools, which gave me oggCat, which will let me join two previously recorded audio files into one file. But, my problem is this:



The device I am working on is known to have the "plug pulled", but it is recording while the power is on (swapping out batteries etc.). Once the device is powered back on, I need to continue to record to the previous file (automated recording).



Right now, I can use arecord to record two separate files, and then once the recording is done, I can oggCat the two, but that doesn't get me what I want 100%, I need to be able to continue recording where the first file got cut off.



I need python and busybox solutions. Unfortunately, other solutions outside Python and Busybox are not available to me - furthermore, downloading additional packages/programs is also not available, I have oggenc, arecord, and oggvideotools.



Any advise on where to look? Can I somehow pipe arecord data from a temp file to oggCat? Like:



oggCat NewFile.ogg File1.ogg (arecord file2.ogg ...)


Where (arecord file2.ogg ...)is the file currently being recorded and simultaneously being appended to Newfile.ogg?



PS. The audio files will have the exact same parameters - i.e. same channels, rates, etc.










share|improve this question





























    5














    I am using Vorbis/ogg to record audio (using arecord and then pipping to oggenc). I have downloaded oggvideotools, which gave me oggCat, which will let me join two previously recorded audio files into one file. But, my problem is this:



    The device I am working on is known to have the "plug pulled", but it is recording while the power is on (swapping out batteries etc.). Once the device is powered back on, I need to continue to record to the previous file (automated recording).



    Right now, I can use arecord to record two separate files, and then once the recording is done, I can oggCat the two, but that doesn't get me what I want 100%, I need to be able to continue recording where the first file got cut off.



    I need python and busybox solutions. Unfortunately, other solutions outside Python and Busybox are not available to me - furthermore, downloading additional packages/programs is also not available, I have oggenc, arecord, and oggvideotools.



    Any advise on where to look? Can I somehow pipe arecord data from a temp file to oggCat? Like:



    oggCat NewFile.ogg File1.ogg (arecord file2.ogg ...)


    Where (arecord file2.ogg ...)is the file currently being recorded and simultaneously being appended to Newfile.ogg?



    PS. The audio files will have the exact same parameters - i.e. same channels, rates, etc.










    share|improve this question



























      5












      5








      5


      2





      I am using Vorbis/ogg to record audio (using arecord and then pipping to oggenc). I have downloaded oggvideotools, which gave me oggCat, which will let me join two previously recorded audio files into one file. But, my problem is this:



      The device I am working on is known to have the "plug pulled", but it is recording while the power is on (swapping out batteries etc.). Once the device is powered back on, I need to continue to record to the previous file (automated recording).



      Right now, I can use arecord to record two separate files, and then once the recording is done, I can oggCat the two, but that doesn't get me what I want 100%, I need to be able to continue recording where the first file got cut off.



      I need python and busybox solutions. Unfortunately, other solutions outside Python and Busybox are not available to me - furthermore, downloading additional packages/programs is also not available, I have oggenc, arecord, and oggvideotools.



      Any advise on where to look? Can I somehow pipe arecord data from a temp file to oggCat? Like:



      oggCat NewFile.ogg File1.ogg (arecord file2.ogg ...)


      Where (arecord file2.ogg ...)is the file currently being recorded and simultaneously being appended to Newfile.ogg?



      PS. The audio files will have the exact same parameters - i.e. same channels, rates, etc.










      share|improve this question















      I am using Vorbis/ogg to record audio (using arecord and then pipping to oggenc). I have downloaded oggvideotools, which gave me oggCat, which will let me join two previously recorded audio files into one file. But, my problem is this:



      The device I am working on is known to have the "plug pulled", but it is recording while the power is on (swapping out batteries etc.). Once the device is powered back on, I need to continue to record to the previous file (automated recording).



      Right now, I can use arecord to record two separate files, and then once the recording is done, I can oggCat the two, but that doesn't get me what I want 100%, I need to be able to continue recording where the first file got cut off.



      I need python and busybox solutions. Unfortunately, other solutions outside Python and Busybox are not available to me - furthermore, downloading additional packages/programs is also not available, I have oggenc, arecord, and oggvideotools.



      Any advise on where to look? Can I somehow pipe arecord data from a temp file to oggCat? Like:



      oggCat NewFile.ogg File1.ogg (arecord file2.ogg ...)


      Where (arecord file2.ogg ...)is the file currently being recorded and simultaneously being appended to Newfile.ogg?



      PS. The audio files will have the exact same parameters - i.e. same channels, rates, etc.







      audio python busybox ogg






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 47 mins ago









      Rui F Ribeiro

      39.2k1479130




      39.2k1479130










      asked Oct 19 '12 at 14:15









      Justin

      261




      261






















          1 Answer
          1






          active

          oldest

          votes


















          1














          I haven't tested it but consider using process substitution. This will take the standard output of one program and provide it to another program via a pipe.



          oggCat NewFile.ogg File1.ogg <(arecord)


          If I am correct this would append the new recording to audio.ogg. The biggest problem I see is that arecord appears outputs to output a wav by default so you may need to encode it as an ogg.



          Sorry, I don't have a mic to test it out. But I answered anyway because I felt that this is the bit you were looking for and can figure the rest out yourself.






          share|improve this answer























          • Busybox ash does not support this syntax, as far as I know.
            – Chris Down
            Oct 1 '13 at 3:20











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "106"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f52323%2fusing-ogg-vorbis-is-there-a-way-to-continue-to-record-to-an-existing-audio-file%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          I haven't tested it but consider using process substitution. This will take the standard output of one program and provide it to another program via a pipe.



          oggCat NewFile.ogg File1.ogg <(arecord)


          If I am correct this would append the new recording to audio.ogg. The biggest problem I see is that arecord appears outputs to output a wav by default so you may need to encode it as an ogg.



          Sorry, I don't have a mic to test it out. But I answered anyway because I felt that this is the bit you were looking for and can figure the rest out yourself.






          share|improve this answer























          • Busybox ash does not support this syntax, as far as I know.
            – Chris Down
            Oct 1 '13 at 3:20
















          1














          I haven't tested it but consider using process substitution. This will take the standard output of one program and provide it to another program via a pipe.



          oggCat NewFile.ogg File1.ogg <(arecord)


          If I am correct this would append the new recording to audio.ogg. The biggest problem I see is that arecord appears outputs to output a wav by default so you may need to encode it as an ogg.



          Sorry, I don't have a mic to test it out. But I answered anyway because I felt that this is the bit you were looking for and can figure the rest out yourself.






          share|improve this answer























          • Busybox ash does not support this syntax, as far as I know.
            – Chris Down
            Oct 1 '13 at 3:20














          1












          1








          1






          I haven't tested it but consider using process substitution. This will take the standard output of one program and provide it to another program via a pipe.



          oggCat NewFile.ogg File1.ogg <(arecord)


          If I am correct this would append the new recording to audio.ogg. The biggest problem I see is that arecord appears outputs to output a wav by default so you may need to encode it as an ogg.



          Sorry, I don't have a mic to test it out. But I answered anyway because I felt that this is the bit you were looking for and can figure the rest out yourself.






          share|improve this answer














          I haven't tested it but consider using process substitution. This will take the standard output of one program and provide it to another program via a pipe.



          oggCat NewFile.ogg File1.ogg <(arecord)


          If I am correct this would append the new recording to audio.ogg. The biggest problem I see is that arecord appears outputs to output a wav by default so you may need to encode it as an ogg.



          Sorry, I don't have a mic to test it out. But I answered anyway because I felt that this is the bit you were looking for and can figure the rest out yourself.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Dec 1 '12 at 6:06

























          answered Nov 30 '12 at 17:18









          Kevin Cox

          490411




          490411












          • Busybox ash does not support this syntax, as far as I know.
            – Chris Down
            Oct 1 '13 at 3:20


















          • Busybox ash does not support this syntax, as far as I know.
            – Chris Down
            Oct 1 '13 at 3:20
















          Busybox ash does not support this syntax, as far as I know.
          – Chris Down
          Oct 1 '13 at 3:20




          Busybox ash does not support this syntax, as far as I know.
          – Chris Down
          Oct 1 '13 at 3:20


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Unix & Linux Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f52323%2fusing-ogg-vorbis-is-there-a-way-to-continue-to-record-to-an-existing-audio-file%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          宮崎県

          濃尾地震

          シテ島