Home > linux tips > Split and join large files in GNU/Linux just using command-line

Split and join large files in GNU/Linux just using command-line

To split a large file into smaller ones:

Lets say you have to send your personal video file of size 100MB to your friend through Gmail but gmail has a maximum file upload limit of size 20MB.So you have to split it into 5 smaller files of size 20MB and upload it.For this you have to go to the directory where the file is stored and use the following command in the terminal:

$ split –b20m Largefilename Smallfilename

where 20m is the size of output file in MB,to split in KB put k instead of m.various other options are also available to split command,to know them just type

$ split --help

To join smaller files into a larger one:

These days most files hosted at major file hosting sites are split into smaller files such as *.001…009 or *.part01…*.part09 etc.To join these files you don’t have to search for any external softwares,you just have the commands built into every GNU/Linux system.

To join the part files open up the terminal and navigate to the directory where the files are placed and execute the command:

$ cat partfilename* > outputfilename

For example if the file names are

video.avi.01

video.avi.02

video.avi.03 etc.use

$ cat video.avi.* > video1.avi

About these ads
Categories: linux tips Tags: , ,
  1. February 10, 2009 at 9:46 am

    probably you meant “cat partfilename* >> outputfilename” where double > characters are used.

  2. blulinux
    February 10, 2009 at 5:34 pm

    both will work.But in your case,if you execute the command twice,the file size will be doubled,instead of overwriting it

  3. jazz
    February 17, 2009 at 10:45 pm

    hi i don’t know where to put in those commands, where’s the terminal.. sorry i’m poor with computers…

  4. February 18, 2009 at 4:56 pm

    It will be in Applications->Terminal menu,for most of linux distributions like ubuntu,Fedora etc.

  5. daniel
    June 20, 2009 at 2:23 am

    cat test*.avi > test-new.avi
    results in a corrupt video file. i just tried it. here’s mplayer output.
    mplayer test-new.avi
    MPlayer 1.0rc2-4.2.4 (C) 2000-2007 MPlayer Team
    CPU: Intel(R) Core(TM)2 CPU 4300 @ 1.80GHz (Family: 6, Model: 15, Stepping: 2)
    CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
    Compiled with runtime CPU detection.

    Playing test-new.avi.
    AVI file format detected.
    [aviheader] Video stream found, -vid 0
    [aviheader] Audio stream found, -aid 1
    ** Warning: this is no extended AVI header..
    [aviheader] Video stream found, -vid 2
    [aviheader] Audio stream found, -aid 3
    Demuxer info Software changed to Nandub v1.0rc2
    VIDEO: [XVID] 656×272 12bpp 23.976 fps 1058.8 kbps (129.2 kbyte/s)
    Clip info:
    Software: Nandub v1.0rc2
    xscreensaver_disable: Could not find XScreenSaver window.
    GNOME screensaver disabled
    ==========================================================================
    Opening video decoder: [ffmpeg] FFmpeg’s libavcodec codec family
    Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
    ==========================================================================
    ==========================================================================
    Forced audio codec: mad
    Opening audio decoder: [liba52] AC3 decoding with liba52
    Using SSE optimized IMDCT transform
    Using MMX optimized resampler
    AUDIO: 48000 Hz, 2 ch, s16le, 448.0 kbit/29.17% (ratio: 56000->192000)
    Selected audio codec: [a52] afm: liba52 (AC3-liba52)
    ==========================================================================
    AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
    Starting playback…
    a52: CRC check failed!
    a52: error at resampling
    a52: CRC check failed!
    a52: error at resampling
    a52: CRC check failed!
    a52: error at resampling
    a52: CRC check failed!
    a52: error at resampling
    VDec: vo config request – 656 x 272 (preferred colorspace: Planar YV12)
    VDec: using Planar YV12 as output csp (no 0)
    Movie-Aspect is 2.41:1 – prescaling to correct movie aspect.
    VO: [xv] 656×272 => 656×272 Planar YV12
    a52: CRC check failed! 0.449 ct: 0.000 1/ 1 ??% ??% ??,?% 0 0
    a52: error at resampling
    a52: CRC check failed!
    a52: error at resampling
    a52: CRC check failed!
    a52: error at resampling
    a52: CRC check failed!
    [mpeg4 @ 0x893a750]I cbpy damaged at 32 12 6/ 6 ??% ??% ??,?% 4 0
    [mpeg4 @ 0x893a750]Error at MB: 536
    [mpeg4 @ 0x893a750]concealing 222 DC, 222 AC, 222 MV errors
    a52: CRC check failed! 0.450 ct: 0.025 7/ 7 ??% ??% ??,?% 4 0
    a52: error at resampling
    a52: CRC check failed! 0.463 ct: 0.046 12/ 12 ??% ??% ??,?% 4 0
    a52: error at resampling
    a52: CRC check failed!
    a52: error at resampling
    a52: CRC check failed! 0.867 ct: 0.050 13/ 13 51% 8% 3.1% 4 0
    a52: error at resampling
    a52: CRC check failed! 0.868 ct: 0.054 14/ 14 48% 7% 2.9% 4 0
    a52: error at resampling
    [mpeg4 @ 0x893a750]ac-tex damaged at 27 9
    [mpeg4 @ 0x893a750]Error at MB: 405
    [mpeg4 @ 0x893a750]concealing 387 DC, 387 AC, 387 MV errors
    [mpeg4 @ 0x893a750]header damaged 0.063 16/ 16 42% 6% 2.8% 4 0
    Error while decoding frame!
    a52: CRC check failed! 1.187 ct: 0.067 17/ 17 40% 6% 2.6% 4 0
    a52: error at resampling
    [mpeg4 @ 0x893a750]header damaged 0.071 18/ 18 37% 5% 2.5% 4 0
    Error while decoding frame!
    a52: CRC check failed! 1.219 ct: 0.075 19/ 19 35% 5% 2.4% 4 0
    a52: error at resampling
    a52: CRC check failed! 1.491 ct: 0.088 22/ 22 30% 4% 2.3% 4 0
    a52: error at resampling
    [mpeg4 @ 0x893a750]header damaged 0.092 23/ 23 29% 4% 2.3% 4 0
    Error while decoding frame!
    a52: CRC check failed! 2.144 ct: 0.096 24/ 24 28% 4% 2.3% 4 0
    a52: error at resampling
    [mpeg4 @ 0x893a750]ac-tex damaged at 1 11 25/ 25 27% 4% 2.3% 4 0
    [mpeg4 @ 0x893a750]Error at MB: 463
    [mpeg4 @ 0x893a750]concealing 294 DC, 294 AC, 294 MV errors
    [mpeg4 @ 0x893a750]ac-tex damaged at 28 4 27/ 27 26% 3% 2.7% 4 0
    [mpeg4 @ 0x893a750]Error at MB: 196
    [mpeg4 @ 0x893a750]concealing 555 DC, 555 AC, 555 MV errors
    [mpeg4 @ 0x893a750]header damaged 0.117 29/ 29 25% 3% 2.6% 4 0
    Error while decoding frame!
    a52: CRC check failed! 4.240 ct: 0.121 30/ 30 24% 3% 2.5% 4 0
    a52: error at resampling
    a52: CRC check failed! 4.729 ct: 0.125 31/ 31 23% 3% 2.6% 4 0
    a52: error at resampling
    [mpeg4 @ 0x893a750]header damaged 0.129 32/ 32 23% 3% 2.5% 4 0
    Error while decoding frame!
    [mpeg4 @ 0x893a750]header damaged 0.133 33/ 33 22% 3% 2.5% 4 0
    Error while decoding frame!
    a52: CRC check failed! 5.257 ct: 0.142 35/ 35 21% 3% 2.5% 4 0
    a52: error at resampling
    [mpeg4 @ 0x893a750]header damaged
    Error while decoding frame!
    a52: CRC check failed! 5.394 ct: 0.146 36/ 36 20% 2% 2.4% 4 0
    a52: error at resampling
    [mpeg4 @ 0x893a750]ac-tex damaged at 16 5 37/ 37 20% 2% 2.4% 4 0
    [mpeg4 @ 0x893a750]Error at MB: 226
    [mpeg4 @ 0x893a750]concealing 525 DC, 525 AC, 525 MV errors
    a52: CRC check failed! 6.244 ct: 0.158 39/ 39 20% 2% 2.5% 4 0
    a52: error at resampling
    [mpeg4 @ 0x893a750]header damaged
    Error while decoding frame!
    a52: CRC check failed! 6.951 ct: 0.163 40/ 40 19% 2% 2.5% 4 0
    a52: error at resampling
    [mpeg4 @ 0x893a750]header damaged 0.167 41/ 41 19% 2% 2.5% 4 0
    Error while decoding frame!
    [mpeg4 @ 0x893a750]header damaged 0.171 42/ 42 18% 2% 2.5% 4 0
    Error while decoding frame!
    [mpeg4 @ 0x893a750]header damaged 0.179 44/ 44 17% 2% 2.8% 4 0
    Error while decoding frame!
    [mpeg4 @ 0x893a750]header damaged 0.188 46/ 46 17% 2% 2.8% 4 0
    Error while decoding frame!
    a52: CRC check failed! 9.283 ct: 0.192 47/ 47 16% 2% 2.7% 4 0
    a52: error at resampling
    [mpeg4 @ 0x893a750]illegal dc vlc
    [mpeg4 @ 0x893a750]Error at MB: 604
    [mpeg4 @ 0x893a750]concealing 156 DC, 156 AC, 156 MV errors
    [mpeg4 @ 0x893a750]Error at MB: 5680.196 48/ 48 16% 2% 2.9% 4 0
    [mpeg4 @ 0x893a750]concealing 191 DC, 191 AC, 191 MV errors
    [mpeg4 @ 0x893a750]header damaged 0.204 50/ 50 16% 2% 2.8% 4 0
    Error while decoding frame!
    a52: CRC check failed! 1.484 ct: 0.213 52/ 52 15% 2% 2.8% 4 0
    a52: error at resampling
    [mpeg4 @ 0x893a750]header damaged
    Error while decoding frame!
    [mpeg4 @ 0x893a750]ac-tex damaged at 19 7 53/ 53 15% 1% 2.8% 4 0
    [mpeg4 @ 0x893a750]Error at MB: 313
    [mpeg4 @ 0x893a750]concealing 440 DC, 440 AC, 440 MV errors
    [mpeg4 @ 0x893a750]header damaged 0.221 54/ 54 16% 1% 2.8% 4 0
    Error while decoding frame!
    [mpeg4 @ 0x893a750]ac-tex damaged at 14 1355/ 55 15% 1% 2.8% 4 0
    [mpeg4 @ 0x893a750]Error at MB: 560
    [mpeg4 @ 0x893a750]concealing 199 DC, 199 AC, 199 MV errors
    [mpeg4 @ 0x893a750]header damaged 0.229 56/ 56 15% 1% 2.8% 4 0
    Error while decoding frame!
    [mpeg4 @ 0x893a750]header damaged 0.234 57/ 57 15% 1% 2.7% 4 0
    Error while decoding frame!
    a52: CRC check failed! 2.466 ct: 0.238 58/ 58 15% 1% 2.7% 4 0
    a52: error at resampling
    a52: CRC check failed!
    a52: error at resampling
    [mpeg4 @ 0x893a750]header damaged
    Error while decoding frame!
    a52: CRC check failed! 2.651 ct: 0.242 59/ 59 14% 1% 2.7% 4 0
    a52: error at resampling
    [mpeg4 @ 0x893a750]ac-tex damaged at 30 8
    [mpeg4 @ 0x893a750]Error at MB: 366
    [mpeg4 @ 0x893a750]concealing 388 DC, 388 AC, 388 MV errors
    a52: CRC check failed! 2.733 ct: 0.246 60/ 60 15% 1% 2.7% 4 0
    [mpeg4 @ 0x893a750]header damaged
    Error while decoding frame!
    [mpeg4 @ 0x893a750]ac-tex damaged at 19 9 61/ 61 14% 1% 2.6% 4 0
    [mpeg4 @ 0x893a750]Error at MB: 397
    [mpeg4 @ 0x893a750]concealing 358 DC, 358 AC, 358 MV errors
    [mpeg4 @ 0x893a750]header damaged 0.254 62/ 62 15% 1% 2.6% 4 0
    Error while decoding frame!
    [mpeg4 @ 0x893a750]header damaged 0.259 63/ 63 14% 1% 2.6% 4 0
    Error while decoding frame!
    [mpeg4 @ 0x893a750]ac-tex damaged at 28 8 64/ 64 14% 1% 2.6% 4 0
    [mpeg4 @ 0x893a750]Error at MB: 364
    [mpeg4 @ 0x893a750]concealing 390 DC, 390 AC, 390 MV errors
    a52: CRC check failed! 3.491 ct: 0.267 65/ 65 14% 1% 2.6% 4 0
    a52: error at resampling
    [mpeg4 @ 0x893a750]header damaged
    Error while decoding frame!
    [mpeg4 @ 0x893a750]ac-tex damaged at 3 0 66/ 66 14% 1% 2.6% 4 0
    [mpeg4 @ 0x893a750]Error at MB: 3
    [mpeg4 @ 0x893a750]concealing 697 DC, 697 AC, 697 MV errors
    a52: CRC check failed! 3.615 ct: 0.275 67/ 67 14% 1% 2.5% 4 0
    [mpeg4 @ 0x893a750]header damaged
    Error while decoding frame!
    [mpeg4 @ 0x893a750]ac-tex damaged at 5 7 68/ 68 14% 1% 2.5% 4 0
    [mpeg4 @ 0x893a750]Error at MB: 299
    [mpeg4 @ 0x893a750]concealing 456 DC, 456 AC, 456 MV errors
    a52: CRC check failed! 3.616 ct: 0.284 69/ 69 14% 1% 2.5% 4 0
    a52: error at resampling
    [mpeg4 @ 0x893a750]header damaged
    Error while decoding frame!
    [mpeg4 @ 0x893a750]header damaged 0.288 70/ 70 14% 1% 2.5% 4 0
    Error while decoding frame!
    a52: CRC check failed! 4.188 ct: 0.292 71/ 71 14% 1% 2.7% 4 0
    a52: error at resampling
    [mpeg4 @ 0x893a750]header damaged
    Error while decoding frame!
    [mpeg4 @ 0x893a750]ac-tex damaged at 1 5 72/ 72 13% 1% 2.7% 4 0
    [mpeg4 @ 0x893a750]Error at MB: 211
    [mpeg4 @ 0x893a750]concealing 540 DC, 540 AC, 540 MV errors
    a52: CRC check failed! 4.885 ct: 0.300 73/ 73 14% 1% 2.8% 4 0
    [mpeg4 @ 0x893a750]header damaged
    Error while decoding frame!
    [mpeg4 @ 0x893a750]header damaged 0.304 74/ 74 13% 1% 2.7% 4 0
    Error while decoding frame!
    [mpeg4 @ 0x893a750]ac-tex damaged at 1 7 75/ 75 13% 1% 2.7% 4 0
    [mpeg4 @ 0x893a750]Error at MB: 295
    [mpeg4 @ 0x893a750]concealing 458 DC, 458 AC, 458 MV errors
    a52: CRC check failed! 4.881 ct: 0.313 76/ 76 13% 1% 2.7% 4 0
    a52: error at resampling
    a52: CRC check failed!
    a52: error at resampling
    a52: CRC check failed!
    a52: error at resampling
    [mpeg4 @ 0x893a750]ac-tex damaged at 5 5
    [mpeg4 @ 0x893a750]Error at MB: 215
    [mpeg4 @ 0x893a750]concealing 537 DC, 537 AC, 537 MV errors
    a52: CRC check failed! 5.943 ct: 0.317 77/ 77 14% 1% 2.8% 4 0
    a52: error at resampling
    [mpeg4 @ 0x893a750]header damaged
    Error while decoding frame!
    [mpeg4 @ 0x893a750]header damaged 0.321 78/ 78 14% 1% 2.9% 4 0
    Error while decoding frame!
    [mpeg4 @ 0x893a750]header damaged 0.325 79/ 79 13% 1% 2.8% 4 0
    Error while decoding frame!
    a52: CRC check failed! 6.627 ct: 0.329 80/ 80 13% 1% 2.8% 4 0
    a52: error at resampling
    [mpeg4 @ 0x893a750]ac-tex damaged at 2 7
    [mpeg4 @ 0x893a750]Error at MB: 296
    [mpeg4 @ 0x893a750]concealing 460 DC, 460 AC, 460 MV errors
    Marker bit missing before fixed_vop_rate 81/ 81 13% 1% 2.8% 4 0
    [mpeg4 @ 0x893a750]Static Sprites not supported
    [mpeg4 @ 0x893a750]10 sprite_warping_points
    [mpeg4 @ 0x893a750]header damaged
    Error while decoding frame!
    a52: CRC check failed! 7.032 ct: 0.338 82/ 82 13% 1% 2.8% 4 0
    a52: error at resampling
    VDec: vo config request – 6609 x 7013 (preferred colorspace: Planar YV12)
    VDec: using Planar YV12 as output csp (no 0)
    Movie-Aspect is undefined – no prescaling applied.
    VO: [xv] 6609×7013 => 6609×7013 Planar YV12
    [ASPECT] Warning: No suitable new res found!
    Source image dimensions are too high: 6609×7013 (maximum is 2046×2046)
    FATAL: Cannot initialize video driver.
    [mpeg4 @ 0x893a750]warning: first frame is no keyframe
    [mpeg4 @ 0x893a750]1. marker bit missing in 3. esc
    [mpeg4 @ 0x893a750]Error at MB: 11
    [mpeg4 @ 0x893a750]concealing 181746 DC, 181746 AC, 181746 MV errors

    FATAL: Could not initialize video filters (-vf) or video output (-vo).

    GNOME screensaver enabled

    Exiting… (End of file)

    Previously mplayer outputted this and played the first file just fine.

    mplayer test.1.avi
    MPlayer 1.0rc2-4.2.4 (C) 2000-2007 MPlayer Team
    CPU: Intel(R) Core(TM)2 CPU 4300 @ 1.80GHz (Family: 6, Model: 15, Stepping: 2)
    CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
    Compiled with runtime CPU detection.

    Playing test.1.avi.
    AVI file format detected.
    [aviheader] Video stream found, -vid 0
    [aviheader] Audio stream found, -aid 1
    VIDEO: [XVID] 656×272 12bpp 23.976 fps 1231.7 kbps (150.4 kbyte/s)
    Clip info:
    Software: Nandub v1.0rc2
    xscreensaver_disable: Could not find XScreenSaver window.
    GNOME screensaver disabled
    ==========================================================================
    Opening video decoder: [ffmpeg] FFmpeg’s libavcodec codec family
    Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
    ==========================================================================
    ==========================================================================
    Forced audio codec: mad
    Opening audio decoder: [liba52] AC3 decoding with liba52
    Using SSE optimized IMDCT transform
    Using MMX optimized resampler
    AUDIO: 48000 Hz, 2 ch, s16le, 448.0 kbit/29.17% (ratio: 56000->192000)
    Selected audio codec: [a52] afm: liba52 (AC3-liba52)
    ==========================================================================
    AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
    Starting playback…
    VDec: vo config request – 656 x 272 (preferred colorspace: Planar YV12)
    VDec: using Planar YV12 as output csp (no 0)
    Movie-Aspect is 2.41:1 – prescaling to correct movie aspect.
    VO: [xv] 656×272 => 656×272 Planar YV12
    No bind found for key ‘c’. % 0% 0.9% 1 0
    No bind found for key ‘c’. % 0% 0.9% 1 0
    GNOME screensaver enabled.000 ct: 0.000 351/351 4% 0% 0.9% 1 0

    Exiting… (Quit)

    • the dsc
      February 28, 2013 at 6:13 am

      I think it may be caused by trying to merge real independent avi files, each with its own container and format headers for the video and sound tracks. With plain mp3 you can even merge independent mp3 files, but with videos I guess it that the software sees something wrong with the container.

      This method should only work with files that were once a single file, and that were split in this manner, rather than by the usage of some video program that would split then in independent, functional avi files.

  6. September 10, 2009 at 8:30 pm

    That can be done on any file type but if it’s a video file we’re not done yet, the new file.avi only shows the first video and the sound might be broken. Now we need to fix it. First, install mencoder and mplayer:
    ===============================================
    #sudo apt-get install mencoder mplayer
    ===============================================

    and then run this command on your new video file.avi:

    =================================================================
    mencoder -forceidx -oac copy -ovc copy file.avi -o file_final.avi
    =================================================================

    Now we are done and you can play the file.

    • October 5, 2009 at 6:51 pm

      i have verified it with different video flie formats,it works without the above mencoder command

  7. Rob Heusdens
    April 19, 2010 at 9:50 pm

    The cat command is unreliable, since you don’t know in what order files are concatenated.

  8. April 20, 2010 at 1:14 pm

    cat command always concatenates the files in order which you specify or else if you specify a wildcard character such as * then it concatenates in alphabetical or in numerical order and it does not concatenate files randomly

  9. March 31, 2013 at 6:42 am

    Another good tool to split large files is lxsplit.

  10. sammy
    July 27, 2013 at 4:20 am

    daniel :
    $ cat video.avi.* > video1.avi

    cat test*.avi > test-new.avi
    results in a corrupt video file. i just tried it. here’s mplayer output.
    mplayer test-new.avi
    MPlayer 1.0rc2-4.2.4 (C) 2000-2007 MPlayer Team
    CPU: Intel(R) Core(TM)2 CPU 4300 @ 1.80GHz (Family: 6, Model: 15, Stepping: 2)
    CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
    Compiled with runtime CPU detection.
    Playing test-new.avi.
    AVI file format detected.
    [aviheader] Video stream found, -vid 0
    [aviheader] Audio stream found, -aid 1
    ** Warning: this is no extended AVI header..
    [aviheader] Video stream found, -vid 2
    [aviheader] Audio stream found, -aid 3
    Demuxer info Software changed to Nandub v1.0rc2
    VIDEO: [XVID] 656×272 12bpp 23.976 fps 1058.8 kbps (129.2 kbyte/s)
    Clip info:
    Software: Nandub v1.0rc2
    xscreensaver_disable: Could not find XScreenSaver window.
    GNOME screensaver disabled
    ==========================================================================
    Opening video decoder: [ffmpeg] FFmpeg’s libavcodec codec family
    Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
    ==========================================================================
    ==========================================================================
    Forced audio codec: mad
    Opening audio decoder: [liba52] AC3 decoding with liba52
    Using SSE optimized IMDCT transform
    Using MMX optimized resampler
    AUDIO: 48000 Hz, 2 ch, s16le, 448.0 kbit/29.17% (ratio: 56000->192000)
    Selected audio codec: [a52] afm: liba52 (AC3-liba52)
    ==========================================================================
    AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
    Starting playback…
    a52: CRC check failed!
    a52: error at resampling
    a52: CRC check failed!
    a52: error at resampling
    a52: CRC check failed!
    a52: error at resampling
    a52: CRC check failed!
    a52: error at resampling
    VDec: vo config request – 656 x 272 (preferred colorspace: Planar YV12)
    VDec: using Planar YV12 as output csp (no 0)
    Movie-Aspect is 2.41:1 – prescaling to correct movie aspect.
    VO: [xv] 656×272 => 656×272 Planar YV12
    a52: CRC check failed! 0.449 ct: 0.000 1/ 1 ??% ??% ??,?% 0 0
    a52: error at resampling
    a52: CRC check failed!
    a52: error at resampling
    a52: CRC check failed!
    a52: error at resampling
    a52: CRC check failed!
    [mpeg4 @ 0x893a750]I cbpy damaged at 32 12 6/ 6 ??% ??% ??,?% 4 0
    [mpeg4 @ 0x893a750]Error at MB: 536
    [mpeg4 @ 0x893a750]concealing 222 DC, 222 AC, 222 MV errors
    a52: CRC check failed! 0.450 ct: 0.025 7/ 7 ??% ??% ??,?% 4 0
    a52: error at resampling
    a52: CRC check failed! 0.463 ct: 0.046 12/ 12 ??% ??% ??,?% 4 0
    a52: error at resampling
    a52: CRC check failed!
    a52: error at resampling
    a52: CRC check failed! 0.867 ct: 0.050 13/ 13 51% 8% 3.1% 4 0
    a52: error at resampling
    a52: CRC check failed! 0.868 ct: 0.054 14/ 14 48% 7% 2.9% 4 0
    a52: error at resampling
    [mpeg4 @ 0x893a750]ac-tex damaged at 27 9
    [mpeg4 @ 0x893a750]Error at MB: 405
    [mpeg4 @ 0x893a750]concealing 387 DC, 387 AC, 387 MV errors
    [mpeg4 @ 0x893a750]header damaged 0.063 16/ 16 42% 6% 2.8% 4 0
    Error while decoding frame!
    a52: CRC check failed! 1.187 ct: 0.067 17/ 17 40% 6% 2.6% 4 0
    a52: error at resampling
    [mpeg4 @ 0x893a750]header damaged 0.071 18/ 18 37% 5% 2.5% 4 0
    Error while decoding frame!
    a52: CRC check failed! 1.219 ct: 0.075 19/ 19 35% 5% 2.4% 4 0
    a52: error at resampling
    a52: CRC check failed! 1.491 ct: 0.088 22/ 22 30% 4% 2.3% 4 0
    a52: error at resampling
    [mpeg4 @ 0x893a750]header damaged 0.092 23/ 23 29% 4% 2.3% 4 0
    Error while decoding frame!
    a52: CRC check failed! 2.144 ct: 0.096 24/ 24 28% 4% 2.3% 4 0
    a52: error at resampling
    [mpeg4 @ 0x893a750]ac-tex damaged at 1 11 25/ 25 27% 4% 2.3% 4 0
    [mpeg4 @ 0x893a750]Error at MB: 463
    [mpeg4 @ 0x893a750]concealing 294 DC, 294 AC, 294 MV errors
    [mpeg4 @ 0x893a750]ac-tex damaged at 28 4 27/ 27 26% 3% 2.7% 4 0
    [mpeg4 @ 0x893a750]Error at MB: 196
    [mpeg4 @ 0x893a750]concealing 555 DC, 555 AC, 555 MV errors
    [mpeg4 @ 0x893a750]header damaged 0.117 29/ 29 25% 3% 2.6% 4 0
    Error while decoding frame!
    a52: CRC check failed! 4.240 ct: 0.121 30/ 30 24% 3% 2.5% 4 0
    a52: error at resampling
    a52: CRC check failed! 4.729 ct: 0.125 31/ 31 23% 3% 2.6% 4 0
    a52: error at resampling
    [mpeg4 @ 0x893a750]header damaged 0.129 32/ 32 23% 3% 2.5% 4 0
    Error while decoding frame!
    [mpeg4 @ 0x893a750]header damaged 0.133 33/ 33 22% 3% 2.5% 4 0
    Error while decoding frame!
    a52: CRC check failed! 5.257 ct: 0.142 35/ 35 21% 3% 2.5% 4 0
    a52: error at resampling
    [mpeg4 @ 0x893a750]header damaged
    Error while decoding frame!
    a52: CRC check failed! 5.394 ct: 0.146 36/ 36 20% 2% 2.4% 4 0
    a52: error at resampling
    [mpeg4 @ 0x893a750]ac-tex damaged at 16 5 37/ 37 20% 2% 2.4% 4 0
    [mpeg4 @ 0x893a750]Error at MB: 226
    [mpeg4 @ 0x893a750]concealing 525 DC, 525 AC, 525 MV errors
    a52: CRC check failed! 6.244 ct: 0.158 39/ 39 20% 2% 2.5% 4 0
    a52: error at resampling
    [mpeg4 @ 0x893a750]header damaged
    Error while decoding frame!
    a52: CRC check failed! 6.951 ct: 0.163 40/ 40 19% 2% 2.5% 4 0
    a52: error at resampling
    [mpeg4 @ 0x893a750]header damaged 0.167 41/ 41 19% 2% 2.5% 4 0
    Error while decoding frame!
    [mpeg4 @ 0x893a750]header damaged 0.171 42/ 42 18% 2% 2.5% 4 0
    Error while decoding frame!
    [mpeg4 @ 0x893a750]header damaged 0.179 44/ 44 17% 2% 2.8% 4 0
    Error while decoding frame!
    [mpeg4 @ 0x893a750]header damaged 0.188 46/ 46 17% 2% 2.8% 4 0
    Error while decoding frame!
    a52: CRC check failed! 9.283 ct: 0.192 47/ 47 16% 2% 2.7% 4 0
    a52: error at resampling
    [mpeg4 @ 0x893a750]illegal dc vlc
    [mpeg4 @ 0x893a750]Error at MB: 604
    [mpeg4 @ 0x893a750]concealing 156 DC, 156 AC, 156 MV errors
    [mpeg4 @ 0x893a750]Error at MB: 5680.196 48/ 48 16% 2% 2.9% 4 0
    [mpeg4 @ 0x893a750]concealing 191 DC, 191 AC, 191 MV errors
    [mpeg4 @ 0x893a750]header damaged 0.204 50/ 50 16% 2% 2.8% 4 0
    Error while decoding frame!
    a52: CRC check failed! 1.484 ct: 0.213 52/ 52 15% 2% 2.8% 4 0
    a52: error at resampling
    [mpeg4 @ 0x893a750]header damaged
    Error while decoding frame!
    [mpeg4 @ 0x893a750]ac-tex damaged at 19 7 53/ 53 15% 1% 2.8% 4 0
    [mpeg4 @ 0x893a750]Error at MB: 313
    [mpeg4 @ 0x893a750]concealing 440 DC, 440 AC, 440 MV errors
    [mpeg4 @ 0x893a750]header damaged 0.221 54/ 54 16% 1% 2.8% 4 0
    Error while decoding frame!
    [mpeg4 @ 0x893a750]ac-tex damaged at 14 1355/ 55 15% 1% 2.8% 4 0
    [mpeg4 @ 0x893a750]Error at MB: 560
    [mpeg4 @ 0x893a750]concealing 199 DC, 199 AC, 199 MV errors
    [mpeg4 @ 0x893a750]header damaged 0.229 56/ 56 15% 1% 2.8% 4 0
    Error while decoding frame!
    [mpeg4 @ 0x893a750]header damaged 0.234 57/ 57 15% 1% 2.7% 4 0
    Error while decoding frame!
    a52: CRC check failed! 2.466 ct: 0.238 58/ 58 15% 1% 2.7% 4 0
    a52: error at resampling
    a52: CRC check failed!
    a52: error at resampling
    [mpeg4 @ 0x893a750]header damaged
    Error while decoding frame!
    a52: CRC check failed! 2.651 ct: 0.242 59/ 59 14% 1% 2.7% 4 0
    a52: error at resampling
    [mpeg4 @ 0x893a750]ac-tex damaged at 30 8
    [mpeg4 @ 0x893a750]Error at MB: 366
    [mpeg4 @ 0x893a750]concealing 388 DC, 388 AC, 388 MV errors
    a52: CRC check failed! 2.733 ct: 0.246 60/ 60 15% 1% 2.7% 4 0
    [mpeg4 @ 0x893a750]header damaged
    Error while decoding frame!
    [mpeg4 @ 0x893a750]ac-tex damaged at 19 9 61/ 61 14% 1% 2.6% 4 0
    [mpeg4 @ 0x893a750]Error at MB: 397
    [mpeg4 @ 0x893a750]concealing 358 DC, 358 AC, 358 MV errors
    [mpeg4 @ 0x893a750]header damaged 0.254 62/ 62 15% 1% 2.6% 4 0
    Error while decoding frame!
    [mpeg4 @ 0x893a750]header damaged 0.259 63/ 63 14% 1% 2.6% 4 0
    Error while decoding frame!
    [mpeg4 @ 0x893a750]ac-tex damaged at 28 8 64/ 64 14% 1% 2.6% 4 0
    [mpeg4 @ 0x893a750]Error at MB: 364
    [mpeg4 @ 0x893a750]concealing 390 DC, 390 AC, 390 MV errors
    a52: CRC check failed! 3.491 ct: 0.267 65/ 65 14% 1% 2.6% 4 0
    a52: error at resampling
    [mpeg4 @ 0x893a750]header damaged
    Error while decoding frame!
    [mpeg4 @ 0x893a750]ac-tex damaged at 3 0 66/ 66 14% 1% 2.6% 4 0
    [mpeg4 @ 0x893a750]Error at MB: 3
    [mpeg4 @ 0x893a750]concealing 697 DC, 697 AC, 697 MV errors
    a52: CRC check failed! 3.615 ct: 0.275 67/ 67 14% 1% 2.5% 4 0
    [mpeg4 @ 0x893a750]header damaged
    Error while decoding frame!
    [mpeg4 @ 0x893a750]ac-tex damaged at 5 7 68/ 68 14% 1% 2.5% 4 0
    [mpeg4 @ 0x893a750]Error at MB: 299
    [mpeg4 @ 0x893a750]concealing 456 DC, 456 AC, 456 MV errors
    a52: CRC check failed! 3.616 ct: 0.284 69/ 69 14% 1% 2.5% 4 0
    a52: error at resampling
    [mpeg4 @ 0x893a750]header damaged
    Error while decoding frame!
    [mpeg4 @ 0x893a750]header damaged 0.288 70/ 70 14% 1% 2.5% 4 0
    Error while decoding frame!
    a52: CRC check failed! 4.188 ct: 0.292 71/ 71 14% 1% 2.7% 4 0
    a52: error at resampling
    [mpeg4 @ 0x893a750]header damaged
    Error while decoding frame!
    [mpeg4 @ 0x893a750]ac-tex damaged at 1 5 72/ 72 13% 1% 2.7% 4 0
    [mpeg4 @ 0x893a750]Error at MB: 211
    [mpeg4 @ 0x893a750]concealing 540 DC, 540 AC, 540 MV errors
    a52: CRC check failed! 4.885 ct: 0.300 73/ 73 14% 1% 2.8% 4 0
    [mpeg4 @ 0x893a750]header damaged
    Error while decoding frame!
    [mpeg4 @ 0x893a750]header damaged 0.304 74/ 74 13% 1% 2.7% 4 0
    Error while decoding frame!
    [mpeg4 @ 0x893a750]ac-tex damaged at 1 7 75/ 75 13% 1% 2.7% 4 0
    [mpeg4 @ 0x893a750]Error at MB: 295
    [mpeg4 @ 0x893a750]concealing 458 DC, 458 AC, 458 MV errors
    a52: CRC check failed! 4.881 ct: 0.313 76/ 76 13% 1% 2.7% 4 0
    a52: error at resampling
    a52: CRC check failed!
    a52: error at resampling
    a52: CRC check failed!
    a52: error at resampling
    [mpeg4 @ 0x893a750]ac-tex damaged at 5 5
    [mpeg4 @ 0x893a750]Error at MB: 215
    [mpeg4 @ 0x893a750]concealing 537 DC, 537 AC, 537 MV errors
    a52: CRC check failed! 5.943 ct: 0.317 77/ 77 14% 1% 2.8% 4 0
    a52: error at resampling
    [mpeg4 @ 0x893a750]header damaged
    Error while decoding frame!
    [mpeg4 @ 0x893a750]header damaged 0.321 78/ 78 14% 1% 2.9% 4 0
    Error while decoding frame!
    [mpeg4 @ 0x893a750]header damaged 0.325 79/ 79 13% 1% 2.8% 4 0
    Error while decoding frame!
    a52: CRC check failed! 6.627 ct: 0.329 80/ 80 13% 1% 2.8% 4 0
    a52: error at resampling
    [mpeg4 @ 0x893a750]ac-tex damaged at 2 7
    [mpeg4 @ 0x893a750]Error at MB: 296
    [mpeg4 @ 0x893a750]concealing 460 DC, 460 AC, 460 MV errors
    Marker bit missing before fixed_vop_rate 81/ 81 13% 1% 2.8% 4 0
    [mpeg4 @ 0x893a750]Static Sprites not supported
    [mpeg4 @ 0x893a750]10 sprite_warping_points
    [mpeg4 @ 0x893a750]header damaged
    Error while decoding frame!
    a52: CRC check failed! 7.032 ct: 0.338 82/ 82 13% 1% 2.8% 4 0
    a52: error at resampling
    VDec: vo config request – 6609 x 7013 (preferred colorspace: Planar YV12)
    VDec: using Planar YV12 as output csp (no 0)
    Movie-Aspect is undefined – no prescaling applied.
    VO: [xv] 6609×7013 => 6609×7013 Planar YV12
    [ASPECT] Warning: No suitable new res found!
    Source image dimensions are too high: 6609×7013 (maximum is 2046×2046)
    FATAL: Cannot initialize video driver.
    [mpeg4 @ 0x893a750]warning: first frame is no keyframe
    [mpeg4 @ 0x893a750]1. marker bit missing in 3. esc
    [mpeg4 @ 0x893a750]Error at MB: 11
    [mpeg4 @ 0x893a750]concealing 181746 DC, 181746 AC, 181746 MV errors
    FATAL: Could not initialize video filters (-vf) or video output (-vo).
    GNOME screensaver enabled
    Exiting… (End of file)
    Previously mplayer outputted this and played the first file just fine.
    mplayer test.1.avi
    MPlayer 1.0rc2-4.2.4 (C) 2000-2007 MPlayer Team
    CPU: Intel(R) Core(TM)2 CPU 4300 @ 1.80GHz (Family: 6, Model: 15, Stepping: 2)
    CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
    Compiled with runtime CPU detection.
    Playing test.1.avi.
    AVI file format detected.
    [aviheader] Video stream found, -vid 0
    [aviheader] Audio stream found, -aid 1
    VIDEO: [XVID] 656×272 12bpp 23.976 fps 1231.7 kbps (150.4 kbyte/s)
    Clip info:
    Software: Nandub v1.0rc2
    xscreensaver_disable: Could not find XScreenSaver window.
    GNOME screensaver disabled
    ==========================================================================
    Opening video decoder: [ffmpeg] FFmpeg’s libavcodec codec family
    Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
    ==========================================================================
    ==========================================================================
    Forced audio codec: mad
    Opening audio decoder: [liba52] AC3 decoding with liba52
    Using SSE optimized IMDCT transform
    Using MMX optimized resampler
    AUDIO: 48000 Hz, 2 ch, s16le, 448.0 kbit/29.17% (ratio: 56000->192000)
    Selected audio codec: [a52] afm: liba52 (AC3-liba52)
    ==========================================================================
    AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
    Starting playback…
    VDec: vo config request – 656 x 272 (preferred colorspace: Planar YV12)
    VDec: using Planar YV12 as output csp (no 0)
    Movie-Aspect is 2.41:1 – prescaling to correct movie aspect.
    VO: [xv] 656×272 => 656×272 Planar YV12
    No bind found for key ‘c’. % 0% 0.9% 1 0
    No bind found for key ‘c’. % 0% 0.9% 1 0
    GNOME screensaver enabled.000 ct: 0.000 351/351 4% 0% 0.9% 1 0
    Exiting… (Quit)

    • July 27, 2013 at 10:52 am

      First thing is test*.avi wildcard will also include test-new.avi, so cat will try to copy the destination test-new.avi again in test-new.avi making it an infinite loop until the disk gets full.

      Next cat will work on files at the lowest level(binary). It will not join two 3 minutes video files into a 6 minute video file, for that you should use video editing or encoding softwares cause every valid file will have file type information in the beginning of file and when use cat to join two video files that is playable separately, the resulting file will have a 2 file type information one in the beginning and one in the middle, and when the video decoder or media player reads that it will throw an error as it is not a video data in a video file which should not be there.

  11. October 13, 2013 at 7:20 pm

    thank you, working perfectly!

  1. May 17, 2011 at 12:12 pm
  2. May 9, 2013 at 11:47 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: