File: mp3-frame.sh

package info (click to toggle)
fq 0.9.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 106,624 kB
  • sloc: xml: 2,835; makefile: 250; sh: 241; exp: 57; ansic: 21
file content (15 lines) | stat: -rw-r--r-- 610 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh

# 8 16 24 32 40 48 56 64 80 96 112 128 144 160 256 320
for br in 8000 128000 320000; do
    for ch in 1 2; do
        # 48000 44100 32000 22050 24000 16000 11025 12000 8000
        for hz in 48000 44100 8000; do
            f="mp3-frame-${br}br-${ch}ch-${hz}hz"
            ffmpeg -y -f lavfi -i sine -ar $hz -b:a $br -ac $ch -t 1s -id3v2_version 0 -write_xing 0 -f mp3 $f.temp
            fq -d bytes '[limit(3; match([0xff,0xfb],[0xff,0xe3]; "g").offset)] as $o | .[$o[1]:$o[2]]' $f.temp >$f
            rm $f.temp
            echo "\$ fq -d mp3_frame dv $f" >$f.fqtest
        done
    done
done