[FFmpeg-user] Splitting a video in chunks with the same size

Henk D. Schoneveld belcampo at zonnet.nl
Wed Jun 8 11:14:29 CEST 2016


On 08 Jun 2016, at 11:01, blubee blubeeme <gurenchan at gmail.com> wrote:

> I wrote a script to do this exact same thing. I will post it to this list
> when I get back to my machine.
It can be done by splitting an all i-frame/key-frame mpeg transport stream file with the split command. An all i-frame/key-frame conversion isn’t very efficient in conversion, but that is a side-effect.
> 
> On Wed, Jun 8, 2016, 16:56 Henk D. Schoneveld <belcampo at zonnet.nl> wrote:
> 
>> 
>> On 08 Jun 2016, at 10:39, Celso Coutinho <20.celso at gmail.com> wrote:
>> 
>>> Dear all,
>>> 
>>> I want to be able to split a file in chunks with the same (previously
>>> defined) size (except the last chunk, of course). I have been trying
>>> several commands but without much success.
>> Out of curiosity, what is the reason for wanting same-sized chunks ?
>> Same-time chunks is what mostly is used.
>>> 
>>> When I look into the documentation, I understand the *-fs* flag allows me
>>> to define the maximum size of the chunk I am obtaining in each time I run
>>> *ffmpeg,* but I don't know how to define the starting point of the
>> chunk. I
>>> tried *-ss*, but it seems that I can only use it with time, rather than
>>> file size. Can someone enlighten me on this matter?
>>> 
>>> Moreover, I have been trying to use the following command:
>>> 
>>> *ffmpeg **-i raper.3gp -fs 102400 -vcodec copy -acodec copy -movflags
>>> faststart output1.avi*
>>> 
>>> But the output video has no sound, plus the duration is always incorrect
>>> (video has 4 to 5 seconds, and the duration shown in the video is like
>> one
>>> minute). Which codecs should I choose?
>>> 
>>> Thanks in advance!
>>> 
>>> Celso
>>> _______________________________________________
>>> ffmpeg-user mailing list
>>> ffmpeg-user at ffmpeg.org
>>> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>>> 
>>> To unsubscribe, visit link above, or email
>>> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
>> 
>> _______________________________________________
>> ffmpeg-user mailing list
>> ffmpeg-user at ffmpeg.org
>> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>> 
>> To unsubscribe, visit link above, or email
>> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> 
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".



More information about the ffmpeg-user mailing list