Skip to content

Instantly share code, notes, and snippets.

@StoryStar
Last active December 14, 2015 22:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save StoryStar/d720f9a9727a93b20a43 to your computer and use it in GitHub Desktop.
Save StoryStar/d720f9a9727a93b20a43 to your computer and use it in GitHub Desktop.
ffmpeg Concat issue: Pad values can't be negative
ffprobe /Users/matt/Documents/JACKTHEAUTORIPPER/processing/padissue/bhollz/10-12-2015/2015-12-10-05-42-06-story-5003321241468928.mp4
ffprobe version 2.8.2 Copyright (c) 2007-2015 the FFmpeg developers
built with Apple LLVM version 7.0.0 (clang-700.1.76)
configuration: --prefix=/usr/local/Cellar/ffmpeg/2.8.2 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libvo-aacenc --enable-libxvid --enable-vda
libavutil 54. 31.100 / 54. 31.100
libavcodec 56. 60.100 / 56. 60.100
libavformat 56. 40.101 / 56. 40.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 40.101 / 5. 40.101
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.101 / 1. 2.101
libpostproc 53. 3.100 / 53. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/matt/Documents/JACKTHEAUTORIPPER/processing/padissue/bhollz/10-12-2015/2015-12-10-05-42-06-story-5003321241468928.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf56.40.101
Duration: 00:00:07.01, start: 0.000000, bitrate: 1387 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 376x668, 1315 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 64 kb/s (default)
Metadata:
handler_name : SoundHandler
____________________________________________________________________________________
ffprobe /Users/matt/Documents/JACKTHEAUTORIPPER/processing/padissue/bhollz/10-12-2015/2015-12-11-04-28-17-story-5387126580150272.mp4
ffprobe version 2.8.2 Copyright (c) 2007-2015 the FFmpeg developers
built with Apple LLVM version 7.0.0 (clang-700.1.76)
configuration: --prefix=/usr/local/Cellar/ffmpeg/2.8.2 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libvo-aacenc --enable-libxvid --enable-vda
libavutil 54. 31.100 / 54. 31.100
libavcodec 56. 60.100 / 56. 60.100
libavformat 56. 40.101 / 56. 40.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 40.101 / 5. 40.101
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.101 / 1. 2.101
libpostproc 53. 3.100 / 53. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/matt/Documents/JACKTHEAUTORIPPER/processing/padissue/bhollz/10-12-2015/2015-12-11-04-28-17-story-5387126580150272.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf56.40.101
Duration: 00:00:07.17, start: 0.000000, bitrate: 776 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 374x668, 705 kb/s, 24 fps, 24 tbr, 12288 tbn, 48 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 65 kb/s (default)
Metadata:
handler_name : SoundHandler
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
//Users/matt/Documents/JACKTHEAUTORIPPER/testvids/storystarcc/bhollz
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
///Users/matt/Documents/JACKTHEAUTORIPPER/testvids/storystarcc/bhollz/10-12-2015
____________________________________________________________
///Users/matt/Documents/JACKTHEAUTORIPPER/testvids/storystarcc/bhollz/10-12-2015/2015-12-10-05-42-06-story-5003321241468928.mp4
Width: 376 X Height: 668
____________________________________________________________
///Users/matt/Documents/JACKTHEAUTORIPPER/testvids/storystarcc/bhollz/10-12-2015/2015-12-11-04-28-17-story-5387126580150272.mp4
Width: 374 X Height: 668
____________________________________________________________
Video will be 374 X 668
------------------------------------------------------------
------------------------PROCESSING--------------------------
Testing mp4 for audio
Testing mp4 for audio
------------------------------------------------------------
-----------------------CONCATENATING------------------------
///Users/matt/Documents/JACKTHEAUTORIPPER/testvids/storystarcc/bhollz/10-12-2015/2015-12-10-05-42-06-story-5003321241468928.mp4
///Users/matt/Documents/JACKTHEAUTORIPPER/testvids/storystarcc/bhollz/10-12-2015/2015-12-11-04-28-17-story-5387126580150272.mp4
Inputs:
-i ///Users/matt/Documents/JACKTHEAUTORIPPER/testvids/storystarcc/bhollz/10-12-2015/2015-12-10-05-42-06-story-5003321241468928.mp4 -i ///Users/matt/Documents/JACKTHEAUTORIPPER/testvids/storystarcc/bhollz/10-12-2015/2015-12-11-04-28-17-story-5387126580150272.mp4
Filter text 1
[0:v]scale=if(gt(ih\,iw)\,-2\,374):if(gt(ih\,iw)\,668\,-2),pad=374:668:(ow-iw)/2:(oh-ih)/2,setsar=sar=1/1[v0]; [1:v]scale=if(gt(ih\,iw)\,-2\,374):if(gt(ih\,iw)\,668\,-2),pad=374:668:(ow-iw)/2:(oh-ih)/2,setsar=sar=1/1[v1];
Filter text 2
[v0] [0:a:0] [v1] [1:a:0]
Total files:
2
Command:
ffmpeg -i ///Users/matt/Documents/JACKTHEAUTORIPPER/testvids/storystarcc/bhollz/10-12-2015/2015-12-10-05-42-06-story-5003321241468928.mp4 -i ///Users/matt/Documents/JACKTHEAUTORIPPER/testvids/storystarcc/bhollz/10-12-2015/2015-12-11-04-28-17-story-5387126580150272.mp4 -filter_complex [0:v]scale=if(gt(ih\,iw)\,-2\,374):if(gt(ih\,iw)\,668\,-2),pad=374:668:(ow-iw)/2:(oh-ih)/2,setsar=sar=1/1[v0]; [1:v]scale=if(gt(ih\,iw)\,-2\,374):if(gt(ih\,iw)\,668\,-2),pad=374:668:(ow-iw)/2:(oh-ih)/2,setsar=sar=1/1[v1]; [v0] [0:a:0] [v1] [1:a:0] concat=n=2:v=1:a=1 [v] [a] -map [v] -map [a] ////Users/matt/Documents/JACKTHEAUTORIPPER/testvids/storystarcc/bhollz/10-12-2015/output.mp4
ffmpeg version 2.8.2 Copyright (c) 2000-2015 the FFmpeg developers
built with Apple LLVM version 7.0.0 (clang-700.1.76)
configuration: --prefix=/usr/local/Cellar/ffmpeg/2.8.2 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libvo-aacenc --enable-libxvid --enable-vda
libavutil 54. 31.100 / 54. 31.100
libavcodec 56. 60.100 / 56. 60.100
libavformat 56. 40.101 / 56. 40.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 40.101 / 5. 40.101
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.101 / 1. 2.101
libpostproc 53. 3.100 / 53. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '///Users/matt/Documents/JACKTHEAUTORIPPER/testvids/storystarcc/bhollz/10-12-2015/2015-12-10-05-42-06-story-5003321241468928.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf56.40.101
Duration: 00:00:07.01, start: 0.000000, bitrate: 1387 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 376x668, 1315 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 64 kb/s (default)
Metadata:
handler_name : SoundHandler
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from '///Users/matt/Documents/JACKTHEAUTORIPPER/testvids/storystarcc/bhollz/10-12-2015/2015-12-11-04-28-17-story-5387126580150272.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf56.40.101
Duration: 00:00:07.17, start: 0.000000, bitrate: 776 kb/s
Stream #1:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 374x668, 705 kb/s, 24 fps, 24 tbr, 12288 tbn, 48 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #1:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 65 kb/s (default)
Metadata:
handler_name : SoundHandler
[Parsed_pad_1 @ 0x7fb26a42abe0] Negative values are not acceptable.
[Parsed_pad_1 @ 0x7fb26a42abe0] Failed to configure input pad on Parsed_pad_1
Error configuring complex filters.
Invalid argument
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment