Answers.Body: <p>Finally, I found out what to do. Firstly, I concetrated all my video files into one big file, using a simpler syntax, and not filter_complex syntax:</p>
  
  <pre><code>ffmpeg -f concat -safe 0 -i VIDEOFILES.txt -r 32 -crf 14  -vcodec libx264 -vb 20M -vf "scale=1280:720,setpts=0.33*PTS" -fflags +genpts  -an   video_output_01.avi
  </code></pre>
  
  <ul>
  <li>-f concat -safe 0 -i VIDEOFILES.txt: concetrate all videofiles into one</li>
  <li>vcodec libx264: the encoder</li>
  <li>r: number of frames</li>
  <li>crf: 0=uncompress</li>
  <li>vb 20M: video bitrate</li>
  <li>scale: resize resolution</li>
  <li>setpts=0.33*PTS:Speeding 3 times the video </li>
  <li>-fflags +genpts:  They fix timestamps, I dont know if they are needed in ffmpeg 4.2.3</li>
  <li>an: Removing audio track from the videofile</li>
  </ul>
  
  <p>Then:</p>
  
  <p>I tried to find out between what times-seconds/frames I wanted to change the orientation in the merged videofile. I implemented the following ffmpeg command: </p>
  
  <pre><code>ffmpeg -i video_output_01.avi -filter_complex  "[0:v]trim=start=0:duration=513[clpA];\
    [0:v]trim=start=513:duration=27,setpts=PTS-STARTPTS[clpB];\
    [clpB]vflip, hflip[clpBf];\
    [clpA][clpBf]concat[clpAB];\
    [0:v]trim=start=540:duration=762,setpts=PTS-STARTPTS[clpC];\
    [0:v]trim=start=1302:duration=120,setpts=PTS-STARTPTS[clpD];\
    [clpD]vflip, hflip[clpDf];\
    [clpC][clpDf]concat[clpCD];\
    [clpAB][clpCD]concat[clpABCD];\
    [0:v]trim=start=1422:duration=439,setpts=PTS-STARTPTS[clpE];\
    [0:v]trim=start=1861:duration=19,setpts=PTS-STARTPTS[clpF];\
    [clpF]vflip, hflip[clpFf];\
    [clpE][clpFf]concat[clpEF];\
    [clpABCD][clpEF]concat[out1]" -map [out1] Hflip.mp4
  </code></pre>
  
  <ul>
  <li>So, in three parts in the videofiles, between specific seconds/frames
  change 180o degrees orientation: ClipB, ClipD, and ClipF </li>
  <li>ClipA, CLipC and CLipE are intact.</li>
  <li>it was weird that the quality of the video that was produced remained the same with the merged videofile, even no additional parameters of video encoding were given</li>
  <li>Start: in seconds</li>
  <li>Duration: how many seconds this transformation to happen from the given start point (in seconds)?</li>
  </ul>
  
  <p>However, with that method, you must find exactly the second that you would like to start / apply transformation filter/s. If the transformation is about only whole individual videofiles, then it is not the best solution. </p>
  
  <p>Also, I dont want to encode multiple times my files, which, I think with these two commands, this does not happen.</p>
  
  <p>UPDATE: The first video was of 5.7GB.
  The second ffmpeg command resulted a video file of ~1.5GB, very worse quality. I am searching yet what to do...</p>
  
  <p>UPDATE No2:</p>
  
  <p>The folowing command also freezes my computer:</p>
  
  <pre><code> ffmpeg -f concat -safe 0 -i VIDEOFILES_short.txt -filter_complex  \
  &gt;  "[0:v] setpts=PTS-STARTPTS[v1];  \
  &gt;   [0:v] setpts=PTS-STARTPTS[v2];  \
  &gt;   [v1][v2]concat[v12];            \
  &gt;   [0:v] setpts=PTS-STARTPTS[v3];  \
  &gt;   [0:v] setpts=PTS-STARTPTS[v4];  \
  &gt;   [v3][v4]concat[v34];            \
  &gt;   [0:v] setpts=PTS-STARTPTS[v5];  \
  &gt;   [v5]vflip, hflip[v5flip];       \
  &gt;   [v12][v34][v5flip]concat=n=3:v=1, scale=1920:1080, setpts=0.33*PTS[out]" -map "[out]" -r 32 -crf 14  -vcodec libx264  -vb 20M   video_out_FF.avi
  ffmpeg version 4.2.3 Copyright (c) 2000-2020 the FFmpeg developers
    built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
    configuration: --enable-gpl --enable-libx264 --enable-libvpx --enable-libmp3lame --enable-libopus
    libavutil      56. 31.100 / 56. 31.100
    libavcodec     58. 54.100 / 58. 54.100
    libavformat    58. 29.100 / 58. 29.100
    libavdevice    58.  8.100 / 58.  8.100
    libavfilter     7. 57.100 /  7. 57.100
    libswscale      5.  5.100 /  5.  5.100
    libswresample   3.  5.100 /  3.  5.100
    libpostproc    55.  5.100 / 55.  5.100
  [mov,mp4,m4a,3gp,3g2,mj2 @ 0x55f6fdeab480] Invalid mdhd time scale 0, defaulting to 1
  [mov,mp4,m4a,3gp,3g2,mj2 @ 0x55f6fdeab480] Auto-inserting h264_mp4toannexb bitstream filter
  [concat @ 0x55f6fdea0b80] Could not find codec parameters for stream 2 (Unknown: none): unknown codec
  Consider increasing the value for the 'analyzeduration' and 'probesize' options
  [concat @ 0x55f6fdea0b80] Could not find codec parameters for stream 4 (Unknown: none): unknown codec
  Consider increasing the value for the 'analyzeduration' and 'probesize' options
  Input #0, concat, from 'VIDEOFILES_short.txt':
    Duration: N/A, start: 0.000000, bitrate: 60138 kb/s
      Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt709), 2704x1520 [SAR 1:1 DAR 169:95], 60010 kb/s, 50 fps, 50 tbr, 90k tbn, 100 tbc
      Metadata:
        creation_time   : 2020-06-12T17:51:41.000000Z
        handler_name    :     GoPro AVC
        encoder         : GoPro AVC encoder
        timecode        : 17:51:42:25
      Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s
      Metadata:
        creation_time   : 2020-06-12T17:51:41.000000Z
        handler_name    :     GoPro AAC
        timecode        : 17:51:42:25
      Stream #0:2: Unknown: none
      Stream #0:3(eng): Data: bin_data (gpmd / 0x646D7067), 0 kb/s
      Metadata:
        creation_time   : 2020-06-12T17:51:41.000000Z
        handler_name    :     GoPro MET
      Stream #0:4: Unknown: none
  Stream mapping:
    Stream #0:0 (h264) -&gt; setpts
    Stream #0:0 (h264) -&gt; setpts
    Stream #0:0 (h264) -&gt; setpts
    Stream #0:0 (h264) -&gt; setpts
    Stream #0:0 (h264) -&gt; setpts
    setpts -&gt; Stream #0:0 (libx264)
  Press [q] to stop, [?] for help
  [swscaler @ 0x55f6fe10b680] deprecated pixel format used, make sure you did set range correctly
  [libx264 @ 0x55f6fdedf700] using SAR=1521/1520
  [libx264 @ 0x55f6fdedf700] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
  [libx264 @ 0x55f6fdedf700] profile High, level 4.2
  Output #0, avi, to 'video_out_FF.avi':
    Metadata:
      ISFT            : Lavf58.29.100
      Stream #0:0: Video: h264 (libx264) (H264 / 0x34363248), yuvj420p(pc), 1920x1080 [SAR 1521:1520 DAR 169:95], q=-1--1, 20000 kb/s, 32 fps, 32 tbn, 32 tbc (default)
      Metadata:
        encoder         : Lavc58.54.100 libx264
      Side data:
        cpb: bitrate max/min/avg: 0/0/20000000 buffer size: 0 vbv_delay: -1
  frame=    6 fps=4.7 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 drop=13 speed=  frame=   11 fps=6.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 drop=34 speed=  frame=   11 fps=4.8 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 drop=34 speed=  frame=   11 fps=4.0 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 drop=34 speed=  frame=   11 fps=3.4 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 drop=34 speed=  frame=   11 fps=2.9 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 drop=34 speed=  frame=   11 fps=2.6 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 drop=34 speed=  frame=   11 fps=2.3 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 drop=34 speed=  frame=   11 fps=2.1 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 drop=34 speed=  frame=   11 fps=1.9 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 drop=34 speed=  frame=   11 fps=1.7 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 drop=34 speed=  frame=   11 fps=1.6 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 drop=34 speed=  frame=   11 fps=1.5 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 drop=34 speed=  frame=   11 fps=1.3 q=-1.0 Lsize=    1906kB time=00:00:00.28 bitrate=55512.7kbits/s dup=0 drop=35 speed=0.0323x    
  video:1900kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.309726%
  [libx264 @ 0x55f6fdedf700] frame I:1     Avg QP:17.05  size:386448
  [libx264 @ 0x55f6fdedf700] frame P:3     Avg QP:18.57  size:251059
  [libx264 @ 0x55f6fdedf700] frame B:7     Avg QP:19.85  size:115138
  [libx264 @ 0x55f6fdedf700] consecutive B-frames:  9.1%  0.0% 54.5% 36.4%
  [libx264 @ 0x55f6fdedf700] mb I  I16..4:  8.8% 57.2% 34.1%
  [libx264 @ 0x55f6fdedf700] mb P  I16..4:  3.2% 25.8% 11.6%  P16..4: 23.4% 19.9% 14.6%  0.0%  0.0%    skip: 1.4%
  [libx264 @ 0x55f6fdedf700] mb B  I16..4:  0.9%  5.9%  2.6%  B16..8: 29.0% 17.6%  7.6%  direct:23.5%  skip:12.9%  L0:41.5% L1:19.2% BI:39.4%
  [libx264 @ 0x55f6fdedf700] 8x8 transform intra:61.1% inter:45.4%
  [libx264 @ 0x55f6fdedf700] coded y,uvDC,uvAC intra: 87.6% 81.5% 50.9% inter: 66.0% 41.4% 2.5%
  [libx264 @ 0x55f6fdedf700] i16 v,h,dc,p: 26%  4%  5% 65%
  [libx264 @ 0x55f6fdedf700] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 15% 15% 15%  8%  6%  7%  6%  7% 20%
  [libx264 @ 0x55f6fdedf700] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 17% 15% 10%  8%  7% 12%  6%  7% 17%
  [libx264 @ 0x55f6fdedf700] i8c dc,h,v,p: 51% 22% 18%  8%
  [libx264 @ 0x55f6fdedf700] Weighted P-Frames: Y:66.7% UV:33.3%
  [libx264 @ 0x55f6fdedf700] ref P L0: 75.7% 10.1%  7.3%  5.5%  1.4%
  [libx264 @ 0x55f6fdedf700] ref B L0: 94.2%  4.9%  0.9%
  [libx264 @ 0x55f6fdedf700] ref B L1: 99.7%  0.3%
  [libx264 @ 0x55f6fdedf700] kb/s:45279.23
  Exiting normally, received signal 2.
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-06-14T08:31:52.333Z
Answers.LastActivityDate: 2020-06-14T13:48:01.903Z
Answers.LastEditDate: 2020-06-14T13:48:01.903Z
Answers.UserDisplayName: Estatistics
Body: <p>I tried to encode some video files, from GOPRO action camera. The whole fuzz is about two specific video files that the video orientation is 180 degree. Therefore, I thought to implement complex filter instead of the simpler syntax, in order to change the orientation to these video files, while, in the same time, to recode them into a single file, with specific parameters. </p>
  
  <p>However, ffmpeg freezes my computer. I was able to press ctrl + C, in order to paste this output, if it is of any help, together with the ffmpeg command that I used to recode my gopro action camera video files. </p>
  
  <p>Secondary question: Is there a better way to set seriarly the ffmpeg filters in filter_complex?   </p>
  
  <pre><code>  ffmpeg -f concat -safe 0 -i VIDEOFILES.txt -filter_complex  \
  &gt;  "[0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v1];  \
  &gt;   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v2];  
  &gt;   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v3];  
  &gt;   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v4];  
  &gt;   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v5];  
  &gt;   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v6];    
  &gt;   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v7];  
  &gt;   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v8];  
  &gt;   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v9];  
  &gt;   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v10];  
  &gt;   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v11];  
  &gt;   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v12]; 
  &gt;   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v13];  
  &gt;   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v14];  
  &gt;   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v15];  
  &gt;   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v16];  
  &gt;   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v17];  
  &gt;   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v18]; 
  &gt;   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v19];  
  &gt;   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v20];  
  &gt;   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v21];  
  &gt;   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v22];  
  &gt;   [0:v] scale=1920:1080, fps=32,  vflip, hflip, setpts=0.33*PTS, fifo [v23];  
  &gt;   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v24]; 
  &gt;   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v25];  
  &gt;   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v26];  
  &gt;   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v27];  
  &gt;   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v28];  
  &gt;   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v29];  
  &gt;   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v30]; 
  &gt;   [0:v] scale=1920:1080, fps=32,  vflip, hflip, setpts=0.33*PTS, fifo [v31];  
  &gt;   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v32];  
  &gt;   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v33];  
  &gt;   [v1][v2][v3][v4][v5][v6][v7][v8][v9][v10][v11][v12][v13][v14][v15][v16][v17][v18][v19][v20][v21][v22][v23][v24][v25][v26][v27][v28][v29][v30][v31][v32][v33]concat=n=33:v=1[out]" -map "[out]" -crf 14  -vcodec libx264  -vb 20M   video_out_33.avi
  ffmpeg version 4.2.3 Copyright (c) 2000-2020 the FFmpeg developers
    built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
    configuration: --enable-gpl --enable-libx264 --enable-libvpx --enable-libmp3lame --enable-libopus
    libavutil      56. 31.100 / 56. 31.100
    libavcodec     58. 54.100 / 58. 54.100
    libavformat    58. 29.100 / 58. 29.100
    libavdevice    58.  8.100 / 58.  8.100
    libavfilter     7. 57.100 /  7. 57.100
    libswscale      5.  5.100 /  5.  5.100
    libswresample   3.  5.100 /  3.  5.100
    libpostproc    55.  5.100 / 55.  5.100
  [mov,mp4,m4a,3gp,3g2,mj2 @ 0x56154d2c3a40] Invalid mdhd time scale 0, defaulting to 1
  [mov,mp4,m4a,3gp,3g2,mj2 @ 0x56154d2c3a40] Auto-inserting h264_mp4toannexb bitstream filter
  [concat @ 0x56154d2b73c0] Could not find codec parameters for stream 2 (Unknown: none): unknown codec
  Consider increasing the value for the 'analyzeduration' and 'probesize' options
  [concat @ 0x56154d2b73c0] Could not find codec parameters for stream 4 (Unknown: none): unknown codec
  Consider increasing the value for the 'analyzeduration' and 'probesize' options
  Input #0, concat, from 'VIDEOFILES.txt':
    Duration: N/A, start: 0.000000, bitrate: 60138 kb/s
      Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt709), 2704x1520 [SAR 1:1 DAR 169:95], 60010 kb/s, 50 fps, 50 tbr, 90k tbn, 100 tbc
      Metadata:
        creation_time   : 2020-06-12T17:51:41.000000Z
        handler_name    :     GoPro AVC
        encoder         : GoPro AVC encoder
        timecode        : 17:51:42:25
      Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s
      Metadata:
        creation_time   : 2020-06-12T17:51:41.000000Z
        handler_name    :     GoPro AAC
        timecode        : 17:51:42:25
      Stream #0:2: Unknown: none
      Stream #0:3(eng): Data: bin_data (gpmd / 0x646D7067), 0 kb/s
      Metadata:
        creation_time   : 2020-06-12T17:51:41.000000Z
        handler_name    :     GoPro MET
      Stream #0:4: Unknown: none
  Stream mapping:
    Stream #0:0 (h264) -&gt; scale
    Stream #0:0 (h264) -&gt; scale
    Stream #0:0 (h264) -&gt; scale
    Stream #0:0 (h264) -&gt; scale
    Stream #0:0 (h264) -&gt; scale
    Stream #0:0 (h264) -&gt; scale
    Stream #0:0 (h264) -&gt; scale
    Stream #0:0 (h264) -&gt; scale
    Stream #0:0 (h264) -&gt; scale
    Stream #0:0 (h264) -&gt; scale
    Stream #0:0 (h264) -&gt; scale
    Stream #0:0 (h264) -&gt; scale
    Stream #0:0 (h264) -&gt; scale
    Stream #0:0 (h264) -&gt; scale
    Stream #0:0 (h264) -&gt; scale
    Stream #0:0 (h264) -&gt; scale
    Stream #0:0 (h264) -&gt; scale
    Stream #0:0 (h264) -&gt; scale
    Stream #0:0 (h264) -&gt; scale
    Stream #0:0 (h264) -&gt; scale
    Stream #0:0 (h264) -&gt; scale
    Stream #0:0 (h264) -&gt; scale
    Stream #0:0 (h264) -&gt; scale
    Stream #0:0 (h264) -&gt; scale
    Stream #0:0 (h264) -&gt; scale
    Stream #0:0 (h264) -&gt; scale
    Stream #0:0 (h264) -&gt; scale
    Stream #0:0 (h264) -&gt; scale
    Stream #0:0 (h264) -&gt; scale
    Stream #0:0 (h264) -&gt; scale
    Stream #0:0 (h264) -&gt; scale
    Stream #0:0 (h264) -&gt; scale
    Stream #0:0 (h264) -&gt; scale
    concat -&gt; Stream #0:0 (libx264)
  Press [q] to stop, [?] for help
  [swscaler @ 0x56154d57a0c0] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154d5c0bc0] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154da7fdc0] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154dac7000] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154db19e40] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154db6cc80] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154dbbfac0] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154dc12900] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154dc65740] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154dcb8580] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154dd0b3c0] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154dd5e200] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154ddb1040] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154de04100] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154de57d80] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154deaba00] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154deff680] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154df53380] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154dfa70c0] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154dffaf00] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154e04ec40] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154e0a2980] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154e617e00] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154e66b540] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154e6bf380] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154e7130c0] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154e766e00] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154e7bac40] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154e80e980] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154e8626c0] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154e8b6500] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154e90a240] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154e95df80] deprecated pixel format used, make sure you did set range correctly
  [libx264 @ 0x56154e0f6a40] using SAR=1521/1520
  [libx264 @ 0x56154e0f6a40] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
  [libx264 @ 0x56154e0f6a40] profile High, level 4.2
  Output #0, avi, to 'video_out_33.avi':
    Metadata:
      ISFT            : Lavf58.29.100
      Stream #0:0: Video: h264 (libx264) (H264 / 0x34363248), yuvj420p(pc), 1920x1080 [SAR 1521:1520 DAR 169:95], q=-1--1, 20000 kb/s, 32 fps, 32 tbn, 32 tbc (default)
      Metadata:
        encoder         : Lavc58.54.100 libx264
      Side data:
        cpb: bitrate max/min/avg: 0/0/20000000 buffer size: 0 vbv_delay: -1
  frame=    0 fps=0.0 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A speed=   frame=    2 fps=1.5 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A speed=   frame=    3 fps=1.6 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=    4 fps=1.7 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=    4 fps=1.3 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=    5 fps=1.4 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=    6 fps=1.4 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=    7 fps=1.5 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=    8 fps=1.5 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=    9 fps=1.5 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   10 fps=1.5 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   10 fps=1.1 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   10 fps=0.8 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   10 fps=0.3 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   10 fps=0.3 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   10 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00
  
  &gt; ^C
  &gt; elias@eliasc:/media/elias/MyPassport/prx/Podilato_Poreia_Kamatero_12Jun2020/1$
  &gt; ^C
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-06-14T05:57:47.660Z
Comments.Text: You cannot address individual files from the concat demuxer like this. You have to process them individually.
Comments.UserDisplayName: Gyan
Tags: <ffmpeg><filter><gopro>
Title: ffmpeg 4.2.3 freezes in encoding which is extremely slow
UserDisplayName: Estatistics
ThreadText: # ffmpeg 4.2.3 freezes in encoding which is extremely slow
  
  (Asked by: username_0 on 2020-06-13)
  
  I tried to encode some video files, from GOPRO action camera. The whole fuzz is about two specific video files that the video orientation is 180 degree. Therefore, I thought to implement complex filter instead of the simpler syntax, in order to change the orientation to these video files, while, in the same time, to recode them into a single file, with specific parameters.
  
  However, ffmpeg freezes my computer. I was able to press ctrl + C, in order to paste this output, if it is of any help, together with the ffmpeg command that I used to recode my gopro action camera video files.
  
  Secondary question: Is there a better way to set seriarly the ffmpeg filters in filter\_complex?
  
  ```
    ffmpeg -f concat -safe 0 -i VIDEOFILES.txt -filter_complex  \
  >  "[0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v1];  \
  >   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v2];  
  >   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v3];  
  >   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v4];  
  >   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v5];  
  >   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v6];    
  >   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v7];  
  >   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v8];  
  >   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v9];  
  >   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v10];  
  >   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v11];  
  >   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v12]; 
  >   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v13];  
  >   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v14];  
  >   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v15];  
  >   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v16];  
  >   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v17];  
  >   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v18]; 
  >   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v19];  
  >   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v20];  
  >   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v21];  
  >   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v22];  
  >   [0:v] scale=1920:1080, fps=32,  vflip, hflip, setpts=0.33*PTS, fifo [v23];  
  >   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v24]; 
  >   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v25];  
  >   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v26];  
  >   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v27];  
  >   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v28];  
  >   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v29];  
  >   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v30]; 
  >   [0:v] scale=1920:1080, fps=32,  vflip, hflip, setpts=0.33*PTS, fifo [v31];  
  >   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v32];  
  >   [0:v] scale=1920:1080, fps=32, setpts=0.33*PTS, fifo [v33];  
  >   [v1][v2][v3][v4][v5][v6][v7][v8][v9][v10][v11][v12][v13][v14][v15][v16][v17][v18][v19][v20][v21][v22][v23][v24][v25][v26][v27][v28][v29][v30][v31][v32][v33]concat=n=33:v=1[out]" -map "[out]" -crf 14  -vcodec libx264  -vb 20M   video_out_33.avi
  ffmpeg version 4.2.3 Copyright (c) 2000-2020 the FFmpeg developers
    built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
    configuration: --enable-gpl --enable-libx264 --enable-libvpx --enable-libmp3lame --enable-libopus
    libavutil      56. 31.100 / 56. 31.100
    libavcodec     58. 54.100 / 58. 54.100
    libavformat    58. 29.100 / 58. 29.100
    libavdevice    58.  8.100 / 58.  8.100
    libavfilter     7. 57.100 /  7. 57.100
    libswscale      5.  5.100 /  5.  5.100
    libswresample   3.  5.100 /  3.  5.100
    libpostproc    55.  5.100 / 55.  5.100
  [mov,mp4,m4a,3gp,3g2,mj2 @ 0x56154d2c3a40] Invalid mdhd time scale 0, defaulting to 1
  [mov,mp4,m4a,3gp,3g2,mj2 @ 0x56154d2c3a40] Auto-inserting h264_mp4toannexb bitstream filter
  [concat @ 0x56154d2b73c0] Could not find codec parameters for stream 2 (Unknown: none): unknown codec
  Consider increasing the value for the 'analyzeduration' and 'probesize' options
  [concat @ 0x56154d2b73c0] Could not find codec parameters for stream 4 (Unknown: none): unknown codec
  Consider increasing the value for the 'analyzeduration' and 'probesize' options
  Input #0, concat, from 'VIDEOFILES.txt':
    Duration: N/A, start: 0.000000, bitrate: 60138 kb/s
      Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt709), 2704x1520 [SAR 1:1 DAR 169:95], 60010 kb/s, 50 fps, 50 tbr, 90k tbn, 100 tbc
      Metadata:
        creation_time   : 2020-06-12T17:51:41.000000Z
        handler_name    :     GoPro AVC
        encoder         : GoPro AVC encoder
        timecode        : 17:51:42:25
      Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s
      Metadata:
        creation_time   : 2020-06-12T17:51:41.000000Z
        handler_name    :     GoPro AAC
        timecode        : 17:51:42:25
      Stream #0:2: Unknown: none
      Stream #0:3(eng): Data: bin_data (gpmd / 0x646D7067), 0 kb/s
      Metadata:
        creation_time   : 2020-06-12T17:51:41.000000Z
        handler_name    :     GoPro MET
      Stream #0:4: Unknown: none
  Stream mapping:
    Stream #0:0 (h264) -> scale
    Stream #0:0 (h264) -> scale
    Stream #0:0 (h264) -> scale
    Stream #0:0 (h264) -> scale
    Stream #0:0 (h264) -> scale
    Stream #0:0 (h264) -> scale
    Stream #0:0 (h264) -> scale
    Stream #0:0 (h264) -> scale
    Stream #0:0 (h264) -> scale
    Stream #0:0 (h264) -> scale
    Stream #0:0 (h264) -> scale
    Stream #0:0 (h264) -> scale
    Stream #0:0 (h264) -> scale
    Stream #0:0 (h264) -> scale
    Stream #0:0 (h264) -> scale
    Stream #0:0 (h264) -> scale
    Stream #0:0 (h264) -> scale
    Stream #0:0 (h264) -> scale
    Stream #0:0 (h264) -> scale
    Stream #0:0 (h264) -> scale
    Stream #0:0 (h264) -> scale
    Stream #0:0 (h264) -> scale
    Stream #0:0 (h264) -> scale
    Stream #0:0 (h264) -> scale
    Stream #0:0 (h264) -> scale
    Stream #0:0 (h264) -> scale
    Stream #0:0 (h264) -> scale
    Stream #0:0 (h264) -> scale
    Stream #0:0 (h264) -> scale
    Stream #0:0 (h264) -> scale
    Stream #0:0 (h264) -> scale
    Stream #0:0 (h264) -> scale
    Stream #0:0 (h264) -> scale
    concat -> Stream #0:0 (libx264)
  Press [q] to stop, [?] for help
  [swscaler @ 0x56154d57a0c0] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154d5c0bc0] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154da7fdc0] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154dac7000] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154db19e40] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154db6cc80] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154dbbfac0] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154dc12900] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154dc65740] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154dcb8580] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154dd0b3c0] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154dd5e200] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154ddb1040] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154de04100] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154de57d80] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154deaba00] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154deff680] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154df53380] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154dfa70c0] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154dffaf00] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154e04ec40] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154e0a2980] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154e617e00] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154e66b540] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154e6bf380] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154e7130c0] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154e766e00] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154e7bac40] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154e80e980] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154e8626c0] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154e8b6500] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154e90a240] deprecated pixel format used, make sure you did set range correctly
  [swscaler @ 0x56154e95df80] deprecated pixel format used, make sure you did set range correctly
  [libx264 @ 0x56154e0f6a40] using SAR=1521/1520
  [libx264 @ 0x56154e0f6a40] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
  [libx264 @ 0x56154e0f6a40] profile High, level 4.2
  Output #0, avi, to 'video_out_33.avi':
    Metadata:
      ISFT            : Lavf58.29.100
      Stream #0:0: Video: h264 (libx264) (H264 / 0x34363248), yuvj420p(pc), 1920x1080 [SAR 1521:1520 DAR 169:95], q=-1--1, 20000 kb/s, 32 fps, 32 tbn, 32 tbc (default)
      Metadata:
        encoder         : Lavc58.54.100 libx264
      Side data:
        cpb: bitrate max/min/avg: 0/0/20000000 buffer size: 0 vbv_delay: -1
  frame=    0 fps=0.0 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A speed=   frame=    2 fps=1.5 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A speed=   frame=    3 fps=1.6 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=    4 fps=1.7 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=    4 fps=1.3 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=    5 fps=1.4 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=    6 fps=1.4 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=    7 fps=1.5 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=    8 fps=1.5 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=    9 fps=1.5 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   10 fps=1.5 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   10 fps=1.1 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   10 fps=0.8 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   10 fps=0.3 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   10 fps=0.3 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   10 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 droframe=   11 fps=0.2 q=0.0 size=       6kB time=00:00:00
  
  > ^C
  > elias@eliasc:/media/elias/MyPassport/prx/Podilato_Poreia_Kamatero_12Jun2020/1$
  > ^C
  
  ```
  
  **Tags:** ffmpeg, filter, gopro
  
  > **Comments:**
  > **username_1**: You cannot address individual files from the concat demuxer like this. You have to process them individually.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2020-06-14. Score: 0
  
  Finally, I found out what to do. Firstly, I concetrated all my video files into one big file, using a simpler syntax, and not filter\_complex syntax:
  
  ```
  ffmpeg -f concat -safe 0 -i VIDEOFILES.txt -r 32 -crf 14  -vcodec libx264 -vb 20M -vf "scale=1280:720,setpts=0.33*PTS" -fflags +genpts  -an   video_output_01.avi
  
  ```
  
  * -f concat -safe 0 -i VIDEOFILES.txt: concetrate all videofiles into one
  * vcodec libx264: the encoder
  * r: number of frames
  * crf: 0=uncompress
  * vb 20M: video bitrate
  * scale: resize resolution
  * setpts=0.33\*PTS:Speeding 3 times the video
  * -fflags +genpts: They fix timestamps, I dont know if they are needed in ffmpeg 4.2.3
  * an: Removing audio track from the videofile
  
  Then:
  
  I tried to find out between what times-seconds/frames I wanted to change the orientation in the merged videofile. I implemented the following ffmpeg command:
  
  ```
  ffmpeg -i video_output_01.avi -filter_complex  "[0:v]trim=start=0:duration=513[clpA];\
    [0:v]trim=start=513:duration=27,setpts=PTS-STARTPTS[clpB];\
    [clpB]vflip, hflip[clpBf];\
    [clpA][clpBf]concat[clpAB];\
    [0:v]trim=start=540:duration=762,setpts=PTS-STARTPTS[clpC];\
    [0:v]trim=start=1302:duration=120,setpts=PTS-STARTPTS[clpD];\
    [clpD]vflip, hflip[clpDf];\
    [clpC][clpDf]concat[clpCD];\
    [clpAB][clpCD]concat[clpABCD];\
    [0:v]trim=start=1422:duration=439,setpts=PTS-STARTPTS[clpE];\
    [0:v]trim=start=1861:duration=19,setpts=PTS-STARTPTS[clpF];\
    [clpF]vflip, hflip[clpFf];\
    [clpE][clpFf]concat[clpEF];\
    [clpABCD][clpEF]concat[out1]" -map [out1] Hflip.mp4
  
  ```
  
  * So, in three parts in the videofiles, between specific seconds/frames
    change 180o degrees orientation: ClipB, ClipD, and ClipF
  * ClipA, CLipC and CLipE are intact.
  * it was weird that the quality of the video that was produced remained the same with the merged videofile, even no additional parameters of video encoding were given
  * Start: in seconds
  * Duration: how many seconds this transformation to happen from the given start point (in seconds)?
  
  However, with that method, you must find exactly the second that you would like to start / apply transformation filter/s. If the transformation is about only whole individual videofiles, then it is not the best solution.
  
  Also, I dont want to encode multiple times my files, which, I think with these two commands, this does not happen.
  
  UPDATE: The first video was of 5.7GB.
  The second ffmpeg command resulted a video file of ~1.5GB, very worse quality. I am searching yet what to do...
  
  UPDATE No2:
  
  The folowing command also freezes my computer:
  
  ```
   ffmpeg -f concat -safe 0 -i VIDEOFILES_short.txt -filter_complex  \
  >  "[0:v] setpts=PTS-STARTPTS[v1];  \
  >   [0:v] setpts=PTS-STARTPTS[v2];  \
  >   [v1][v2]concat[v12];            \
  >   [0:v] setpts=PTS-STARTPTS[v3];  \
  >   [0:v] setpts=PTS-STARTPTS[v4];  \
  >   [v3][v4]concat[v34];            \
  >   [0:v] setpts=PTS-STARTPTS[v5];  \
  >   [v5]vflip, hflip[v5flip];       \
  >   [v12][v34][v5flip]concat=n=3:v=1, scale=1920:1080, setpts=0.33*PTS[out]" -map "[out]" -r 32 -crf 14  -vcodec libx264  -vb 20M   video_out_FF.avi
  ffmpeg version 4.2.3 Copyright (c) 2000-2020 the FFmpeg developers
    built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
    configuration: --enable-gpl --enable-libx264 --enable-libvpx --enable-libmp3lame --enable-libopus
    libavutil      56. 31.100 / 56. 31.100
    libavcodec     58. 54.100 / 58. 54.100
    libavformat    58. 29.100 / 58. 29.100
    libavdevice    58.  8.100 / 58.  8.100
    libavfilter     7. 57.100 /  7. 57.100
    libswscale      5.  5.100 /  5.  5.100
    libswresample   3.  5.100 /  3.  5.100
    libpostproc    55.  5.100 / 55.  5.100
  [mov,mp4,m4a,3gp,3g2,mj2 @ 0x55f6fdeab480] Invalid mdhd time scale 0, defaulting to 1
  [mov,mp4,m4a,3gp,3g2,mj2 @ 0x55f6fdeab480] Auto-inserting h264_mp4toannexb bitstream filter
  [concat @ 0x55f6fdea0b80] Could not find codec parameters for stream 2 (Unknown: none): unknown codec
  Consider increasing the value for the 'analyzeduration' and 'probesize' options
  [concat @ 0x55f6fdea0b80] Could not find codec parameters for stream 4 (Unknown: none): unknown codec
  Consider increasing the value for the 'analyzeduration' and 'probesize' options
  Input #0, concat, from 'VIDEOFILES_short.txt':
    Duration: N/A, start: 0.000000, bitrate: 60138 kb/s
      Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt709), 2704x1520 [SAR 1:1 DAR 169:95], 60010 kb/s, 50 fps, 50 tbr, 90k tbn, 100 tbc
      Metadata:
        creation_time   : 2020-06-12T17:51:41.000000Z
        handler_name    :     GoPro AVC
        encoder         : GoPro AVC encoder
        timecode        : 17:51:42:25
      Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s
      Metadata:
        creation_time   : 2020-06-12T17:51:41.000000Z
        handler_name    :     GoPro AAC
        timecode        : 17:51:42:25
      Stream #0:2: Unknown: none
      Stream #0:3(eng): Data: bin_data (gpmd / 0x646D7067), 0 kb/s
      Metadata:
        creation_time   : 2020-06-12T17:51:41.000000Z
        handler_name    :     GoPro MET
      Stream #0:4: Unknown: none
  Stream mapping:
    Stream #0:0 (h264) -> setpts
    Stream #0:0 (h264) -> setpts
    Stream #0:0 (h264) -> setpts
    Stream #0:0 (h264) -> setpts
    Stream #0:0 (h264) -> setpts
    setpts -> Stream #0:0 (libx264)
  Press [q] to stop, [?] for help
  [swscaler @ 0x55f6fe10b680] deprecated pixel format used, make sure you did set range correctly
  [libx264 @ 0x55f6fdedf700] using SAR=1521/1520
  [libx264 @ 0x55f6fdedf700] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
  [libx264 @ 0x55f6fdedf700] profile High, level 4.2
  Output #0, avi, to 'video_out_FF.avi':
    Metadata:
      ISFT            : Lavf58.29.100
      Stream #0:0: Video: h264 (libx264) (H264 / 0x34363248), yuvj420p(pc), 1920x1080 [SAR 1521:1520 DAR 169:95], q=-1--1, 20000 kb/s, 32 fps, 32 tbn, 32 tbc (default)
      Metadata:
        encoder         : Lavc58.54.100 libx264
      Side data:
        cpb: bitrate max/min/avg: 0/0/20000000 buffer size: 0 vbv_delay: -1
  frame=    6 fps=4.7 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 drop=13 speed=  frame=   11 fps=6.2 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 drop=34 speed=  frame=   11 fps=4.8 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 drop=34 speed=  frame=   11 fps=4.0 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 drop=34 speed=  frame=   11 fps=3.4 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 drop=34 speed=  frame=   11 fps=2.9 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 drop=34 speed=  frame=   11 fps=2.6 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 drop=34 speed=  frame=   11 fps=2.3 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 drop=34 speed=  frame=   11 fps=2.1 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 drop=34 speed=  frame=   11 fps=1.9 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 drop=34 speed=  frame=   11 fps=1.7 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 drop=34 speed=  frame=   11 fps=1.6 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 drop=34 speed=  frame=   11 fps=1.5 q=0.0 size=       6kB time=00:00:00.00 bitrate=N/A dup=0 drop=34 speed=  frame=   11 fps=1.3 q=-1.0 Lsize=    1906kB time=00:00:00.28 bitrate=55512.7kbits/s dup=0 drop=35 speed=0.0323x    
  video:1900kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.309726%
  [libx264 @ 0x55f6fdedf700] frame I:1     Avg QP:17.05  size:386448
  [libx264 @ 0x55f6fdedf700] frame P:3     Avg QP:18.57  size:251059
  [libx264 @ 0x55f6fdedf700] frame B:7     Avg QP:19.85  size:115138
  [libx264 @ 0x55f6fdedf700] consecutive B-frames:  9.1%  0.0% 54.5% 36.4%
  [libx264 @ 0x55f6fdedf700] mb I  I16..4:  8.8% 57.2% 34.1%
  [libx264 @ 0x55f6fdedf700] mb P  I16..4:  3.2% 25.8% 11.6%  P16..4: 23.4% 19.9% 14.6%  0.0%  0.0%    skip: 1.4%
  [libx264 @ 0x55f6fdedf700] mb B  I16..4:  0.9%  5.9%  2.6%  B16..8: 29.0% 17.6%  7.6%  direct:23.5%  skip:12.9%  L0:41.5% L1:19.2% BI:39.4%
  [libx264 @ 0x55f6fdedf700] 8x8 transform intra:61.1% inter:45.4%
  [libx264 @ 0x55f6fdedf700] coded y,uvDC,uvAC intra: 87.6% 81.5% 50.9% inter: 66.0% 41.4% 2.5%
  [libx264 @ 0x55f6fdedf700] i16 v,h,dc,p: 26%  4%  5% 65%
  [libx264 @ 0x55f6fdedf700] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 15% 15% 15%  8%  6%  7%  6%  7% 20%
  [libx264 @ 0x55f6fdedf700] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 17% 15% 10%  8%  7% 12%  6%  7% 17%
  [libx264 @ 0x55f6fdedf700] i8c dc,h,v,p: 51% 22% 18%  8%
  [libx264 @ 0x55f6fdedf700] Weighted P-Frames: Y:66.7% UV:33.3%
  [libx264 @ 0x55f6fdedf700] ref P L0: 75.7% 10.1%  7.3%  5.5%  1.4%
  [libx264 @ 0x55f6fdedf700] ref B L0: 94.2%  4.9%  0.9%
  [libx264 @ 0x55f6fdedf700] ref B L1: 99.7%  0.3%
  [libx264 @ 0x55f6fdedf700] kb/s:45279.23
  Exiting normally, received signal 2.
  
  ```
  
  
  ---
  
  