<p>FFmpeg won't provide this information in compact form. At most, you can get the result of <code>aselect</code>'s per-frame evaluation by switching to debug log level.</p>
<pre><code>ffmpeg -v debug -i audio.wav -af &quot;aselect=not(between(t,0,30)), asetpts=N/SR/TB&quot; output.wav
</code></pre>
<p>The log will contain lines of the form</p>
<pre><code>[Parsed_aselect_0 @ 000001ce36d7c440] n:107.000000 pts:219136.000000 t:9.938141 key:1 samples_n:2048 consumed_samples_n:nan -&gt; select:1.000000 select_out:0
[Parsed_aselect_0 @ 000001ce36d7c440] n:108.000000 pts:221184.000000 t:10.031020 key:1 samples_n:2048 consumed_samples_n:nan -&gt; select:0.000000 select_out:-1
</code></pre>
<p><code>select:1.000000</code> means the frame was selected, and <code>0.000000</code> means it was dropped. The <code>t:</code> on the same line is the timestamp.</p>
<p>So, locate the first <code>select:1.000000</code> and then the <code>select:0.000000</code> following that. The corresponding timestamps form the selected range. Repeat till end.</p>

CC BY-SA 4.0
2021-06-03T15:13:12.507Z
Is there a way to see this same information without having to produce another output wav file? I just want to see the information on the 'audio.wav' file after doing selecting which frames I want. Or do you happen to know a programming technique to where I can just compute the intervals myself? Eg: Intervals Not Selected -- [0,34], [67,100], program produces the intervals [35,66], [101, 400].
africanxmamba
CC BY-SA 4.0
2021-06-03T15:17:53.567Z
Without generating a file: `ffmpeg -v debug -i audio.wav -af "aselect=not(between(t,0,30))" -vn -f null -`
Gyan
CC BY-SA 4.0
2021-06-03T16:37:56.983Z
Thank you for this, however, the issue with this is how long it takes to produce the output considering prints every single frame that was used in selection.
africanxmamba
CC BY-SA 4.0
2021-06-03T17:37:07.647Z
Yes. No way around that,
Gyan
CC BY-SA 4.0
2021-06-03T07:49:37.287Z
2021-06-03T07:49:37.287Z
Gyan
<p>I have been working to remove certain intervals in audio using FFMPEG and was wondering if there is a command or certain technique to only display certain intervals selected.</p>
<p>For example, say I have an audio file (audio.wav) of duration 400 sec, and I run a command to only select the intervals from 30 sec and beyond as such:</p>
<pre><code>ffmpeg -i audio.wav -af &quot;aselect=not(between(t,0,30)), asetps=N/SR/TB&quot; output.wav
</code></pre>
<p>The command above produces an audio file output that does not include the first 30 seconds, however, my goal is to know what intervals that it did include. I am looking for something to display some output like:</p>
<pre><code>start_time: 30 sec, end_time: 400 sec
</code></pre>
<p>I do not want to hardcode these values which is why I am looking for some type of way for FFMPEG or technique to produce it based on the intervals not included in the original audio. If anyone could please share with me any command, technique it would be greatly appreciated!</p>

<ffmpeg><audio>
Display only Intervals Selected using FFMPEG command
africanxmamba
# Display only Intervals Selected using FFMPEG command

(Asked by: username_0 on 2021-06-03)

I have been working to remove certain intervals in audio using FFMPEG and was wondering if there is a command or certain technique to only display certain intervals selected.
For example, say I have an audio file (audio.wav) of duration 400 sec, and I run a command to only select the intervals from 30 sec and beyond as such:
ffmpeg -i audio.wav -af "aselect=not(between(t,0,30)), asetps=N/SR/TB" output.wav

The command above produces an audio file output that does not include the first 30 seconds, however, my goal is to know what intervals that it did include. I am looking for something to display some output like:
start_time: 30 sec, end_time: 400 sec

I do not want to hardcode these values which is why I am looking for some type of way for FFMPEG or technique to produce it based on the intervals not included in the original audio. If anyone could please share with me any command, technique it would be greatly appreciated!

**Tags:** ffmpeg, audio


---

## 1 answers

### Answer by username_1 on 2021-06-03. Score: 0 | Accepted answer

FFmpeg won't provide this information in compact form. At most, you can get the result of aselect's per-frame evaluation by switching to debug log level.
ffmpeg -v debug -i audio.wav -af "aselect=not(between(t,0,30)), asetpts=N/SR/TB" output.wav

The log will contain lines of the form
[Parsed_aselect_0 @ 000001ce36d7c440] n:107.000000 pts:219136.000000 t:9.938141 key:1 samples_n:2048 consumed_samples_n:nan -> select:1.000000 select_out:0
[Parsed_aselect_0 @ 000001ce36d7c440] n:108.000000 pts:221184.000000 t:10.031020 key:1 samples_n:2048 consumed_samples_n:nan -> select:0.000000 select_out:-1

select:1.000000 means the frame was selected, and 0.000000 means it was dropped. The t: on the same line is the timestamp.
So, locate the first select:1.000000 and then the select:0.000000 following that. The corresponding timestamps form the selected range. Repeat till end.

> **Comments:**
> **username_0**: Is there a way to see this same information without having to produce another output wav file? I just want to see the information on the 'audio.wav' file after doing selecting which frames I want. Or do you happen to know a programming technique to where I can just compute the intervals myself? Eg: Intervals Not Selected -- [0,34], [67,100], program produces the intervals [35,66], [101, 400].  
> **username_1**: Without generating a file: `ffmpeg -v debug -i audio.wav -af "aselect=not(between(t,0,30))" -vn -f null -`  
> **username_0**: Thank you for this, however, the issue with this is how long it takes to produce the output considering prints every single frame that was used in selection.  
> **username_1**: Yes. No way around that,  

---

