Changes between Version 6 and Version 7 of How to concatenate (join, merge) media files
- Timestamp:
- 09/13/2012 04:02:26 PM (8 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
How to concatenate (join, merge) media files
v6 v7 3 3 4 4 If you find any bugs, feel free to correct the script, add yourself to the list of contributors and change the version string to reflect your change(s) or email the author with your patch, whatever you find more convenient. 5 6 = Important =7 8 Recently, a bug was discovered in ffmpeg, which prevents this script from the normal functioning. Since the [http://ffmpeg.org/trac/ffmpeg/ticket/1663 bug trac ticket] is still not confirmed as a bug, it can happen that this issue is not considered a bug, so it might not even be resolved. If that happens, the only way to successfully run the script will be to use real files, instead of named pipes (fifos). If you want to contribute to help resolve this issue, please reply to that bug trac ticket and try to give your opinion about the subject. It might influence the solution to be found more quickly.9 10 So, if you really need this to work for you, try using real files, instead of fifos (named pipes). Fifos are declared in this script using "mkfifo name_and_path_of_the_fifo", so just try to comment out those lines and hopefully real files will be created, so the process will not end up in the deadlock. It will also help if you read this FAQ item, to understand what does the script do (it just automates that process): http://ffmpeg.org/faq.html#Concatenating-using-raw-audio-and-video11 12 If that doesn't help, please read that FAQ item and do it all manually... I'm really sorry this can't be as automated as we all would like it to be, but that's the way the things are in this moment.13 5 14 6 = Instructions = … … 64 56 65 57 # the version of the script 66 VERSION=1. 158 VERSION=1.2 67 59 68 60 # location of temp folder … … 105 97 ################################################################################ 106 98 mkfifo $TMP/mcs_a1 $TMP/mcs_v1 107 ffmpeg -y -i $first\ 108 -vn -f u16le -acodec pcm_s16le -ac 2 -ar 44100 $TMP/mcs_a1\ 109 -an -f yuv4mpegpipe -vcodec rawvideo $TMP/mcs_v1 2>/dev/null & 99 ffmpeg -y -i $first -vn -f u16le -acodec pcm_s16le -ac 2 -ar 44100 $TMP/mcs_a1 2>/dev/null </dev/null & 100 ffmpeg -y -i $first -an -f yuv4mpegpipe -vcodec rawvideo $TMP/mcs_v1 2>/dev/null </dev/null & 110 101 111 102 ################################################################################ … … 118 109 for f in $inputs 119 110 do 120 mkfifo $TMP/mcs_a$i $TMP/mcs_v$i $TMP/mcs_t$i 121 ffmpeg -y -i $f \ 122 -vn -f u16le -acodec pcm_s16le -ac 2 -ar 44100 $TMP/mcs_a$i\ 123 -an -f yuv4mpegpipe -vcodec rawvideo $TMP/mcs_t$i 2>/dev/null & 124 tail $TMP/mcs_t$i -n +2 > $TMP/mcs_v$i & 111 mkfifo $TMP/mcs_a$i $TMP/mcs_v$i 112 ffmpeg -y -i $f -vn -f u16le -acodec pcm_s16le -ac 2 -ar 44100 $TMP/mcs_a$i 2>/dev/null </dev/null & 113 { ffmpeg -y -i $f -an -f yuv4mpegpipe -vcodec rawvideo - 2>/dev/null </dev/null | tail -n +2 > $TMP/mcs_v$i ; } & 125 114 all_a="$all_a $TMP/mcs_a$i" 126 115 all_v="$all_v $TMP/mcs_v$i"


