Kompx.com or Compmiscellanea.com

Split video file. FFmpeg

Operating systems : Windows, Linux

Split video file by ffmpeg:

There are two ways how to split video files by ffmpeg. The first one is good in itself, more than that - it is faster, but sometimes creates output files with certain flaws. So for those cases there is the second way of splitting video files: it is considerably slower, the output files are bigger, but it seems they are always of the same quality level as input files used.

Way : 1

ffmpeg -ss <start> -t <duration> -i in1.avi -vcodec copy -acodec copy out1.avi

Way : 2

ffmpeg -ss <start> -t <duration> -i in1.avi -sameq out1.avi

- <start> - the beginning of the part of a video ffmpeg is to cut out. Format: 00:00:00 - hours:minutes:seconds - hh:mm:ss

- <duration> - the duration of the part of a video ffmpeg is to cut out. Format: 00:00:00 - hours:minutes:seconds - hh:mm:ss


ffmpeg -ss 01:19:00 -t 00:05:00 -i in1.avi -vcodec copy -acodec copy out1.avi

ffmpeg -ss 01:19:00 -t 00:05:00 -i in1.avi -sameq out1.avi

- ffmpeg cuts out a part of the video file starting from 1 hour 19 minutes 0 seconds. The duration of the video sequence cut out is 5 minutes 0 seconds.

About ffmpeg: ( Home page ) ( List of supported file formats and codecs )

Aliosque subditos et thema


Pure CSS responsive square


Responsive CSS square. No JavaScript / jQuery. Example:   HTML / XHTML. Code: <div class="square">&nbsp;</div> CSS. Code: .square {width: 10%; height: 0; padding-bottom: 10%;} /* Extra CSS, just styling the look: */ .square {background: #fd0;} Width: 10% makes the .square div to be 10% of the parent element's width. Height: 0 eliminates any height the element may have, letting padding-bottom: 10% to make it exactly equal to the width. So each time the width of the parent container is changed, the element's size gets recalculated. Based on the concept - CSS grid with responsive square cells: Square cell 1 Square cell 2 Square cell 3 Square cell 4 Square cell 5 Square cell 6 Square cell 7 Square cell 8 [ 1 ] As well as Netscape 6.01+, Mozilla 0.6+. [ 2 ] As well as Netscape 6.01+, Mozilla 0.6+.

Unzip multiple files. Linux


Unzip multiple zip files into one directory by Linux command line unzip. Contrary to possible expectations, "unzip *.zip" is not going to work, *.zip should be put into quotes: unzip "*.zip" There may be files with the same names in these archives. To avoid overwriting: unzip -B "*.zip" "Unzip -B" makes unzip to overwrite duplicates during extraction process, but saving a backup copy of each overwritten file. The names for these backup copy files are created by adding tilde ("~") at the end of the original names of the files. If a file extension is present, then "~" is added after it. If that is not enough, unique sequence number (up to 5 digits) is appended after the "~". "Unzip -B" is not too practical. For example, since when the sequence number range for numbered backup files gets exhausted (99999, or 65535 for 16-bit systems), the backup file with the maximum sequence number is deleted and replaced by the new backup version without notice ( More on the subject ). The number of files in an archive may not be always known in advance or may be more than possible sequence number range, so "Unzip -B" is not a great choice. Renaming duplicate files by adding "~" at the end of their names, after the extension, is not too convenient either. But another built-in option is even worse. If the "-B" modifier is not used, each time a file with same name as there already unpacked is being extracted, unzip asks "replace example.txt? [y]es, [n]o, [A]ll, [N]one, [r]ename:". And each time "r" must be hit, then a new name has to be input. So some bash or another script solving the problem should probably be prepared and used instead.