Changes between Version 6 and Version 7 of Concatenate


Ignore:
Timestamp:
Sep 13, 2012, 5:02:26 PM (5 years ago)
Author:
burek
Comment:

updated code to resolve deadlock problem, should be working ok now

Legend:

Unmodified
Added
Removed
Modified
  • Concatenate

    v6 v7  
    33 
    44If 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-video 
    11  
    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. 
    135 
    146= Instructions = 
     
    6456 
    6557# the version of the script 
    66 VERSION=1.1 
     58VERSION=1.2 
    6759 
    6860# location of temp folder 
     
    10597################################################################################ 
    10698mkfifo $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 & 
     99ffmpeg -y -i $first -vn -f u16le -acodec pcm_s16le -ac 2 -ar 44100 $TMP/mcs_a1 2>/dev/null </dev/null & 
     100ffmpeg -y -i $first -an -f yuv4mpegpipe -vcodec rawvideo $TMP/mcs_v1 2>/dev/null </dev/null & 
    110101 
    111102################################################################################ 
     
    118109for f in $inputs 
    119110do 
    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 ; } & 
    125114        all_a="$all_a $TMP/mcs_a$i" 
    126115        all_v="$all_v $TMP/mcs_v$i"