{"id":653,"date":"2016-01-31T15:19:00","date_gmt":"2016-01-31T14:19:00","guid":{"rendered":"http:\/\/hannes.enjoys.it\/blog\/?p=653"},"modified":"2016-10-01T12:53:04","modified_gmt":"2016-10-01T10:53:04","slug":"properly-splitting-a-file-at-specific-intervals-with-ffmpeg","status":"publish","type":"post","link":"https:\/\/hannes.enjoys.it\/blog\/2016\/01\/properly-splitting-a-file-at-specific-intervals-with-ffmpeg\/","title":{"rendered":"Properly splitting a file at specific intervals with ffmpeg"},"content":{"rendered":"<p>Ever wanted to split a media file (video, audio, both) into segments of 10 minutes or something like that? The internet is full of terrible hacks and shitty Stack Overflow answers for this. So here is how you easily, properly split a file into same-length segments with ffmpeg.<\/p>\n<pre lang=\"bash\">-f segment -segment_time SECONDS fileprefix%04d.ext<\/pre>\n<p>Done. segment_time takes seconds as argument. For example:<\/p>\n<pre lang=\"bash\">ffmpeg -i recording.opus -c:a libvorbis -f segment -segment_time 3600 recording_%04d.ogg<\/pre>\n<p>or<\/p>\n<pre lang=\"bash\">ffmpeg -i huge.wav -c:a copy -f segment -segment_time 600 huge-%04d.flac<\/pre>\n<p>Not so hard, is it?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ever wanted to split a media file (video, audio, both) into segments of 10 minutes or something like that? The internet is full of terrible hacks and shitty Stack Overflow answers for this. So here is how you easily, properly split a file into same-length segments with ffmpeg. -f segment -segment_time SECONDS fileprefix%04d.ext Done. segment_time [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22,3],"tags":[],"class_list":["post-653","post","type-post","status-publish","format-standard","hentry","category-commandline","category-guide"],"_links":{"self":[{"href":"https:\/\/hannes.enjoys.it\/blog\/wp-json\/wp\/v2\/posts\/653","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hannes.enjoys.it\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hannes.enjoys.it\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hannes.enjoys.it\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hannes.enjoys.it\/blog\/wp-json\/wp\/v2\/comments?post=653"}],"version-history":[{"count":4,"href":"https:\/\/hannes.enjoys.it\/blog\/wp-json\/wp\/v2\/posts\/653\/revisions"}],"predecessor-version":[{"id":697,"href":"https:\/\/hannes.enjoys.it\/blog\/wp-json\/wp\/v2\/posts\/653\/revisions\/697"}],"wp:attachment":[{"href":"https:\/\/hannes.enjoys.it\/blog\/wp-json\/wp\/v2\/media?parent=653"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hannes.enjoys.it\/blog\/wp-json\/wp\/v2\/categories?post=653"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hannes.enjoys.it\/blog\/wp-json\/wp\/v2\/tags?post=653"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}