Changes between Version 8 and Version 9 of How to concatenate (join, merge) media files
- Timestamp:
- 11/23/2012 12:20:18 AM (7 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
How to concatenate (join, merge) media files
v8 v9 10 10 ./mmcat <input1> <input2> <input3> ... <output> 11 11 }}} 12 13 If you get an error like this: 14 {{{ 15 #/tmp/mcs_v_all: Operation not permitted 16 }}} 17 that could mean that you don't have correct permissions set on /tmp directory (or whatever you set in TMP variable) or that decoding of your input media has failed for some reason. In this case, it would be the best to turn on the logging (described in the script's comments) 12 18 13 19 = Script = … … 56 62 57 63 # the version of the script 58 VERSION=1. 264 VERSION=1.3 59 65 60 66 # location of temp folder … … 97 103 ################################################################################ 98 104 mkfifo $TMP/mcs_a1 $TMP/mcs_v1 105 99 106 ffmpeg -y -i $first -vn -f u16le -acodec pcm_s16le -ac 2 -ar 44100 $TMP/mcs_a1 2>/dev/null </dev/null & 100 107 ffmpeg -y -i $first -an -f yuv4mpegpipe -vcodec rawvideo $TMP/mcs_v1 2>/dev/null </dev/null & 108 109 # if you need to log the output of decoding processes (usually not necessary) 110 # then replace the "2>/dev/null" in 2 lines above with your log file names, like this: 111 #ffmpeg -y -i $first -vn -f u16le -acodec pcm_s16le -ac 2 -ar 44100 $TMP/mcs_a1 2>$TMP/log.a.1 </dev/null & 112 #ffmpeg -y -i $first -an -f yuv4mpegpipe -vcodec rawvideo $TMP/mcs_v1 2>$TMP/log.v.1 </dev/null & 101 113 102 114 ################################################################################ … … 110 122 do 111 123 mkfifo $TMP/mcs_a$i $TMP/mcs_v$i 124 112 125 ffmpeg -y -i $f -vn -f u16le -acodec pcm_s16le -ac 2 -ar 44100 $TMP/mcs_a$i 2>/dev/null </dev/null & 113 126 { ffmpeg -y -i $f -an -f yuv4mpegpipe -vcodec rawvideo - 2>/dev/null </dev/null | tail -n +2 > $TMP/mcs_v$i ; } & 127 128 # if you need to log the output of decoding processes (usually not necessary) 129 # then replace the "2>/dev/null" in 2 lines above with your log file names, like this: 130 #ffmpeg -y -i $f -vn -f u16le -acodec pcm_s16le -ac 2 -ar 44100 $TMP/mcs_a$i 2>$TMP/log.a.$i </dev/null & 131 #{ ffmpeg -y -i $f -an -f yuv4mpegpipe -vcodec rawvideo - 2>$TMP/log.v.$i </dev/null | tail -n +2 > $TMP/mcs_v$i ; } & 132 114 133 all_a="$all_a $TMP/mcs_a$i" 115 134 all_v="$all_v $TMP/mcs_v$i"


