Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Split video into chunks of given size with ffmpeg?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
peter4
Guru
Guru


Joined: 19 Jul 2005
Posts: 359
Location: Wroclaw, Poland

PostPosted: Sun May 27, 2012 11:56 am    Post subject: Split video into chunks of given size with ffmpeg? Reply with quote

Hi,

is there a way to use ffmpeg to split a video file into chunks of given file size? I have a lot of big .mkv files and I need to turn them into .mp4 files no bigger than 4GB. ffmpeg takes care of remuxing, but I'd like to also split them in one step. Currently I use mkvmerge to split them first and then remux with ffmpeg, which takes twice as long time as it needs. Any ideas?
Back to top
View user's profile Send private message
avx
Advocate
Advocate


Joined: 21 Jun 2004
Posts: 2152

PostPosted: Sun May 27, 2012 2:28 pm    Post subject: Reply with quote

Code:
ffmpeg -i input.avi -vcodec copy -acodec copy -ss 00:00:00 -t 00:30:00 output1.avi -vcodec copy -acodec copy -ss 00:30:00 -t 00:30:00 output2.avi

That's the way to split by timings, don't know if there's a way to do it by size. From there, should be possible to adept it to a single step.
_________________
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum