From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS6130 216.105.38.0/24 X-Spam-Status: No, score=-3.4 required=3.0 tests=AWL,BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS,T_DKIM_INVALID shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 053E51F42E for ; Sun, 6 May 2018 11:54:19 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1fFIF2-0006uX-QA; Sun, 06 May 2018 11:54:12 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1fFIF1-0006uN-5e for sox-users@lists.sourceforge.net; Sun, 06 May 2018 11:54:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Type:Cc:To:Subject:Message-ID:Date:From: References:In-Reply-To:MIME-Version:Sender:Reply-To:Content-Transfer-Encoding :Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=1EH01wTvJ9Lla3Re2ldHqGLtXhiCchzMcrDJwg2Cux8=; b=LdRkyzzgiNk+gFjQHR65wh0Wan HbC5F50vzmirYVSzcxKmIc6l2BAijgeapMgXCm2doVneig9KDupDcR+z/lkCvBh1RCunDbTboawZb GEmu66mkUP8MzAeKNzhs4l7XtG+UyTQfzkrMIr4dKpAGvUzR7HUS12TAMz4uviSIaA4w=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Type:Cc:To:Subject:Message-ID:Date:From:References:In-Reply-To: MIME-Version:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=1EH01wTvJ9Lla3Re2ldHqGLtXhiCchzMcrDJwg2Cux8=; b=IMCTJeGfqEXqGrwKeixyo/iPx4 x4SkBssA50yyPGMDDSYQXdXr/FuLWtkKUqqhLRvf+MYLYx5KLHZq6dQ49c4amWAqgABOq5GISYPFo R3Sr3NJRu6YMy+iHiVOH8xEaC8LGHYO9d0bMH9+LEYUgFuDlQzyEOYHjz6X3BeqsOkR8=; Received: from mail-it0-f46.google.com ([209.85.214.46]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.90_1) id 1fFIEz-007ogF-Gy for sox-users@lists.sourceforge.net; Sun, 06 May 2018 11:54:11 +0000 Received: by mail-it0-f46.google.com with SMTP id 70-v6so8353259ity.2 for ; Sun, 06 May 2018 04:54:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=1EH01wTvJ9Lla3Re2ldHqGLtXhiCchzMcrDJwg2Cux8=; b=S9T6wfcgaVpZOeK2rKNSd+lkRxMLZ6hSibY6BUp9d8GZPRTtf52n5bmKYfsSu6gCG/ xhA18spdhMxmy+j9FeJKNZTZQAEdhsQiHkVBOIEAYvhNE7OqC3mJ+3s/wxALmopOjfY0 JmGqaNyPPXO4TOrNJ7V4h6I1A+3Sm2HSQjfJeM7r7PkKvHL7hVUi3aFW2cHDr3KonYG3 CCxmK6o3EMOhkOdeNH+lxnZqmOrQBQCavOty5uG2Sryiwt7hhe3RglqSF+19qUhrdi/T lTThPc38AlxCWrQcv7RYrAyacuva1qB6gYbKJtDSsaKUVs9WbvCMFXSPmPXDzqHvkoU4 22Tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=1EH01wTvJ9Lla3Re2ldHqGLtXhiCchzMcrDJwg2Cux8=; b=tYoEy9egjvPpgLLVUjDQFPi+h4VUHfheqYV4WUzSi1Fp17snLRO+lDHgnwq2/1Uz19 u2AhE3aE19tK7MBGV9L04IY0A93f3chTzo1ZuWkQsbsCXCzSxcnJhj1dP20FOGrtZPEn Qh1jfpn5AlGeylEdzPey1taIyQU0q1w7AnUTqNaBRUp349j/nk5NamPypMkSAXfNcbF4 NL/tTxlqlOySrzYr5E6oDXoQWdP2++sWFEB7EmtAsLgeA8ehLvZRX/DZlfZO2NBMEqZE Db07ozBKSTDPDlwGxStVKz2d5PeanM41ZD0pgc4g3a2zTk2etuuolvMZmKhvzmgxgwkg W5vg== X-Gm-Message-State: ALQs6tAqkjpyWBFSxFLKo23TZfCxqgestz1GlcIrriVkj3fh+tAwS/T/ 0kkIHQ8zT2XLDdWKpoFyDVhsMLPFz/96MUY3UireOg== X-Google-Smtp-Source: AB8JxZoNUWJXQD6bd8FchXj0HHfaOE3lvCssFa1YuNV1Zbq3Ev712svKS5+LwBQd4mYlBnZrhtmV/pFK23nQFLxvgoc= X-Received: by 2002:a24:35cd:: with SMTP id k196-v6mr35915114ita.98.1525607643643; Sun, 06 May 2018 04:54:03 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:4fcf:0:0:0:0:0 with HTTP; Sun, 6 May 2018 04:53:43 -0700 (PDT) In-Reply-To: References: From: Shailendra Paliwal Date: Sun, 6 May 2018 17:23:43 +0530 Message-ID: To: =?UTF-8?B?TcOlbnMgUnVsbGfDpXJk?= X-Headers-End: 1fFIEz-007ogF-Gy Subject: Re: Can I use sox to glitch images? X-BeenThere: sox-users@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: sox-users@lists.sourceforge.net Cc: sox-users@lists.sourceforge.net Content-Type: multipart/mixed; boundary="===============1698679436690874920==" Errors-To: sox-users-bounces@lists.sourceforge.net --===============1698679436690874920== Content-Type: multipart/alternative; boundary="000000000000aa8667056b883508" --000000000000aa8667056b883508 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, May 5, 2018 at 4:43 PM, M=C3=A5ns Rullg=C3=A5rd wr= ote: > Shailendra Paliwal writes: > > > Hello, > > > > I found sox as a command-line equivalent of Audacity. I was wondering h= ow > > can I glitch images like the way I can using Audacity. > > > > On audacity the usual modus operandi is, > > > > 1. Use Audacity > File > Import > Raw Data, to import a BMP image > file. > > 2. Set the encoding to U-Law or A-Law. > > 3. Apply audio effects to the track. > > 4. Export Audio, set Save As Type > Other Uncompressed Files > > 5. Header > RAW (header-less) and Encoding > whichever selected in (= 2) > > 6. Rename to BMP > > > > I was wondering if the same method can be used with sox. That way I can > > make shell scripts to glitch images or even thousands of frames in a > video. > > Yes, this can be done. Try something like this: > > $ sox -t ul -c 1 -r 48k input -t ul output effects... > This seems to corrupt the header of the file too and then I cannot open it at all. Usually in Audacity, I would not touch the first 5% of the track assuming it contains the header information that should be left untouched. So, I thought if I can split the header and the file contents into two file. That would be easy to run through sox. I tried $ sox -t ul -c 1 -r 48k water.bmp -t ul water_out trim 0 15 : newfile : restart This should work because new headers aren't created while spitting and I checked this by merging these files back (I'm on windows) $ type water_out* > water_databent.bmp This get me the image again. However, I processed one chunk with an audio effect and the file size reduced drastically from ~700KB to ~2KB. Would you know why did that happen? I did $ sox -t ul -c 1 -r 48k water_out002 -t ul water_out002 echo 0.8 0.7 45 0.3= 1 Now the files don't stitch back to the image either. > -- > M=C3=A5ns Rullg=C3=A5rd > --000000000000aa8667056b883508 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Sat, May 5, 2018 at 4:43 PM, M=C3=A5ns Rullg=C3=A5rd <mans@mansr.com> wrote:
Sha= ilendra Paliwal <beingshail= endra@gmail.com> writes:

> Hello,
>
> I found sox as a command-line equivalent of Audacity. I was wondering = how
> can I glitch images like the way I can using Audacity.
>
> On audacity the usual modus operandi is,
>
>=C2=A0 =C2=A0 1. Use Audacity > File > Import > Raw Dat= a, to import a BMP image file.
>=C2=A0 =C2=A0 2. Set the encoding to U-Law or A-Law.
>=C2=A0 =C2=A0 3. Apply audio effects to the track.
>=C2=A0 =C2=A0 4. Export Audio, set Save As Type > Other Uncompressed= Files
>=C2=A0 =C2=A0 5. Header > RAW (header-less) and Encoding > whiche= ver selected in (2)
>=C2=A0 =C2=A0 6. Rename to BMP
>
> I was wondering if the same method can be used with sox. That way I ca= n
> make shell scripts to glitch images or even thousands of frames in a v= ideo.

Yes, this can be done.=C2=A0 Try something like this:

$ sox -t ul -c 1 -r 48k input -t ul output effects...
= This seems to corrupt the header of the file too and then I cannot open it = at all. Usually in Audacity, I would not touch the first 5% of the track as= suming it contains the header information that should be left untouched.
So, I thought if I can split the header and the file conten= ts into two file. That would be easy to run through sox.

I tried
=
$ sox -t ul -c 1 -r 48k water.bmp -t ul water_out trim 0 15 : ne= wfile : restart

This should work because new h= eaders aren't created while spitting and I checked this by merging thes= e files back (I'm on windows)
$ type water_out* > wate= r_databent.bmp

This get me the image again.

However, I processed one chunk with an audio effect and the file size = reduced drastically from ~700KB to ~2KB. Would you know why did that happen= ? I did
$ sox -t ul -c 1 -r 48k water_out002 -t ul water_out0= 02 echo 0.8 0.7 45 0.31

Now the files don'= t stitch back to the image either.


--
M=C3=A5ns Rullg=C3=A5rd

--000000000000aa8667056b883508-- --===============1698679436690874920== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot --===============1698679436690874920== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Sox-users mailing list Sox-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sox-users --===============1698679436690874920==--