User Tools

Site Tools


doc:appunti:linux:video:ffmpeg_stack_horizontally

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
doc:appunti:linux:video:ffmpeg_stack_horizontally [2021/10/28 11:27] niccolodoc:appunti:linux:video:ffmpeg_stack_horizontally [2021/10/28 11:43] (current) niccolo
Line 16: Line 16:
 The script can take into account that the videos may be **out of sync**: it is possible to pass **two timestamps** referring at the same instant captured into both videos. The script will **shift the videos presentation time** each-other, so that both will be synced.  The script can take into account that the videos may be **out of sync**: it is possible to pass **two timestamps** referring at the same instant captured into both videos. The script will **shift the videos presentation time** each-other, so that both will be synced. 
  
-<code bash>+The script has some constraints. It requires the **Bash shell**, because it uses the **%%((expression))%%** to do arithmetic evaluation. The script requires also the **Python** interpreter, just to do a floating point difference and properly formats the result. 
 + 
 +<code>
 #!/bin/bash #!/bin/bash
  
Line 49: Line 51:
 OUTPUT="$7" OUTPUT="$7"
  
-if [ -z "$VIDEO_1" -o +if [ -z "$VIDEO_1" -o -z "$VIDEO_2" -o \ 
-     -z "$VIDEO_2" -o \ +     -z "$TIME_1"  -o -z "$TIME_2"  -o \ 
-     -z "$TIME_1"  -o +     -z "$LABEL_1" -o -z "$LABEL_2" -o \
-     -z "$TIME_2"  -o \ +
-     -z "$LABEL_1" -o +
-     -z "$LABEL_2" -o \+
      -z "$OUTPUT" ]; then      -z "$OUTPUT" ]; then
     echo     echo
doc/appunti/linux/video/ffmpeg_stack_horizontally.1635413226.txt.gz · Last modified: 2021/10/28 11:27 by niccolo