<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://dev1galaxy.org/extern.php?action=feed&amp;tid=5744&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / ffmpeg split file using -segment_times]]></title>
		<link>http://dev1galaxy.org/viewtopic.php?id=5744</link>
		<description><![CDATA[The most recent posts in ffmpeg split file using -segment_times.]]></description>
		<lastBuildDate>Sat, 10 Jun 2023 22:31:36 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: ffmpeg split file using -segment_times]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=42513#p42513</link>
			<description><![CDATA[<div class="quotebox"><cite>rbit wrote:</cite><blockquote><div><div class="quotebox"><blockquote><div><p>segment_times times</p><p>&#160; &#160; Specify a list of split points. times contains a list of comma separated duration specifications, in increasing order. See also the segment_time option.</p></div></blockquote></div><p>It doesn&#039;t seem that -segment_times takes a filename argument.&#160; You could try <span class="bbc">-segment_times $(cat /media/split)</span> and see if that works</p></div></blockquote></div><p>hmm, that didn&#039;t occur to me...</p><p>here is the output</p><div class="codebox"><pre><code>ffmpeg -i &quot;/media/input.mp3&quot; -vn -map 0 -f segment -segment_times $(cat /media/split) &quot;output%03d.mp3&quot;
Automatic encoder selection failed for output stream #0:0. Default encoder for format segment (codec none) is probably disabled. Please choose an encoder manually.
Error selecting an encoder for stream 0:0</code></pre></div><p>with the &#039;-c copy&#039; option</p><div class="codebox"><pre><code>ffmpeg -i &quot;/media/input.mp3&quot; -vn -c copy -map 0 -f segment -segment_times $(cat /media/split) &quot;output%03d.mp3&quot;
[segment @ 0x586a4de6f240] Invalid time duration specification &#039;duration&#039; in times list duration
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Stream mapping:
  Stream #0:0 -&gt; #0:0 (copy)
  Stream #0:1 -&gt; #1:0 (mjpeg (native) -&gt; png (native))
  Stream #0:0 -&gt; #1:1 (mp3 (mp3float) -&gt; mp3 (libmp3lame))
    Last message repeated 1 times</code></pre></div><p>adding the &#039;-c copy&#039; option produced one empty text file</p><div class="codebox"><pre><code>ll
total 0
-rw-r--r-- 1 vb vb 0 Jun 11 01:15 output%03d.mp3</code></pre></div><p>interestingly, renaming the &#039;/media/split&#039; file as &#039;.csv&#039; automagically turned it into</p><div class="codebox"><pre><code>cat /media/split.csv
duration 00:23:19, 00:33:15</code></pre></div><p>and the output was</p><div class="codebox"><pre><code>ffmpeg -i &quot;/media/input.mp3&quot; -vn -c copy -map 0 -f segment -segment_times $(cat /media/split.csv) &quot;output%03d.mp3&quot;
[NULL @ 0x650df004aa40] Unable to find a suitable output format for &#039;00:33:15&#039;
00:33:15: Invalid argument</code></pre></div><p>thank you, rbit!</p>]]></description>
			<author><![CDATA[dummy@example.com (amaro)]]></author>
			<pubDate>Sat, 10 Jun 2023 22:31:36 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=42513#p42513</guid>
		</item>
		<item>
			<title><![CDATA[Re: ffmpeg split file using -segment_times]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=42510#p42510</link>
			<description><![CDATA[<div class="quotebox"><blockquote><div><p>segment_times times</p><p>&#160; &#160; Specify a list of split points. times contains a list of comma separated duration specifications, in increasing order. See also the segment_time option.</p></div></blockquote></div><p>It doesn&#039;t seem that -segment_times takes a filename argument.&#160; You could try <span class="bbc">-segment_times $(cat /media/split)</span> and see if that works</p>]]></description>
			<author><![CDATA[dummy@example.com (rbit)]]></author>
			<pubDate>Sat, 10 Jun 2023 01:20:07 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=42510#p42510</guid>
		</item>
		<item>
			<title><![CDATA[Re: ffmpeg split file using -segment_times]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=42509#p42509</link>
			<description><![CDATA[<div class="quotebox"><cite>ralph.ronnquist wrote:</cite><blockquote><div><p>NI web search result: <span class="bbc"><a href="https://ffmpeg.org/ffmpeg-formats.html#segment_002c-stream_005fsegment_002c" rel="nofollow">https://ffmpeg.org/ffmpeg-formats.html# … gment_002c</a></span></p><p>enjoy.</p></div></blockquote></div><p>although I am sure the author(s) of that page believe(s) everything is explained clearly, regarding that issue it seems useless as long as there are only examples of putting the times directly in the command and there are no examples of how the file should look like</p>]]></description>
			<author><![CDATA[dummy@example.com (amaro)]]></author>
			<pubDate>Sat, 10 Jun 2023 01:00:36 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=42509#p42509</guid>
		</item>
		<item>
			<title><![CDATA[Re: ffmpeg split file using -segment_times]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=42508#p42508</link>
			<description><![CDATA[<p>NI web search result: <span class="bbc"><a href="https://ffmpeg.org/ffmpeg-formats.html#segment_002c-stream_005fsegment_002c" rel="nofollow">https://ffmpeg.org/ffmpeg-formats.html# … gment_002c</a></span></p><p>enjoy.</p>]]></description>
			<author><![CDATA[dummy@example.com (ralph.ronnquist)]]></author>
			<pubDate>Sat, 10 Jun 2023 00:23:51 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=42508#p42508</guid>
		</item>
		<item>
			<title><![CDATA[ffmpeg split file using -segment_times]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=42507#p42507</link>
			<description><![CDATA[<p>Hello everybody!</p><p>Trying to split one file into parts based on its silence gaps. </p><p>Using the &#039;-segment_times&#039; option of &#039;ffmpeg&#039; with a file named &#039;/media/split&#039; containing the silence gaps times gives an error</p><div class="codebox"><pre><code>ffmpeg -i &quot;/media/input.mp3&quot; -vn -map 0 -f segment -segment_times /media/split &quot;output%03d.mp3&quot;
[segment @ 0x624777763a40] Invalid time duration specification &#039;/media/split&#039; in times list /media/split
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:0 -- 
Conversion failed!</code></pre></div><p>However, using the silence gaps times from that file directly works fine</p><div class="codebox"><pre><code>ffmpeg -i &quot;/media/input.mp3&quot; -vn -map 0 -f segment -segment_times 00:23:19,00:33:15 &quot;output%03d.mp3&quot;
ffmpeg version 4.3.5-0+deb11u1 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 10 (Debian 10.2.1-6)
  configuration: --prefix=/usr --extra-version=0+deb11u1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
Input #0, mp3, from &#039;/media/input.mp3&#039;:</code></pre></div><p>The file looks like this</p><div class="codebox"><pre><code>cat /media/split
00:23:19,00:33:15</code></pre></div><p>Checked the &#039;ffmpeg&#039; page here </p><div class="codebox"><pre><code>https://ffmpeg.org/ffmpeg-formats.html#segment</code></pre></div><p>and it says</p><div class="codebox"><pre><code>segment_times times

Specify a list of split points. times contains a list of comma separated duration specifications, in increasing order.</code></pre></div><p>How should that file look in order for the command to work?<br />Thank you!</p>]]></description>
			<author><![CDATA[dummy@example.com (amaro)]]></author>
			<pubDate>Fri, 09 Jun 2023 23:40:35 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=42507#p42507</guid>
		</item>
	</channel>
</rss>
