[FFmpeg-user] one encode, two outputs with different duration

Bouke (VideoToolShed) bouke at videotoolshed.com
Fri Apr 10 14:27:39 CEST 2015


Trying to do one encode to two outputs, with different durations.
What i'm after is giving the end user a sneak preview, before the whole 
shebang is done.
Sadly, the shorter output seems still in use by FFmpeg untill the whole 
encoding is done, and that defeats the original intention.

What i've tried below is a pipe, but what i 'think' should be done is split 
the output and have two instances of FFmpeg work on the same transcoded 
input.
Thus, i need to split the first output. I've toyed with -tee, but can't get 
a duration in that way  ( "output1.mov | [t=20] output2.mov"  does not 
work...)

Oh, this is supposed going to work on Mac and OSX.

Any insights?

Thx,
Bouke

ffmpeg.exe -threads 0 -i M:\Honig\02-02c.mxf -filter_complex 
"scale=480x360" -vcodec mjpeg -qscale 4
-map_channel 0.1.0 -map_channel 0.2.0 -acodec pcm_s16le -aspect 
16:9 -timecode 01:00:00:00  -f avi - |
ffmpeg.exe -i - -c copy -t 20 M:\Honig\02-02c_short.mov -c copy 
M:\Honig\02-02c_long.mov


ffmpeg version N-71262-g511585c Copyright (c) 2000-2015 the FFmpeg 
developers
  built with gcc 4.9.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca 
 --
enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-l
ibilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enab
le-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp  
--en
able-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --ena
ble-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc
 --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enabl
e-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma --ena
ble-decklink --enable-zlib
  libavutil      54. 22.100 / 54. 22.100
  libavcodec     56. 33.100 / 56. 33.100
  libavformat    56. 29.100 / 56. 29.100
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 13.101 /  5. 13.101
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
Guessed Channel Layout for  Input Stream #0.1 : mono
Guessed Channel Layout for  Input Stream #0.2 : mono
Guessed Channel Layout for  Input Stream #0.3 : mono
Guessed Channel Layout for  Input Stream #0.4 : mono
Guessed Channel Layout for  Input Stream #0.5 : mono
Guessed Channel Layout for  Input Stream #0.6 : mono
Guessed Channel Layout for  Input Stream #0.7 : mono
Guessed Channel Layout for  Input Stream #0.8 : mono
Input #0, mxf, from 'M:\Honig\02-02c.mxf':
  Metadata:
    uid             : 6f87f767-822f-cd4a-9053-aa89a29dbc83
    generation_uid  : c4403d71-28fb-bd46-8f28-8b61f4c5b26b
    company_name    : AVID
    product_name    : TRMG
    product_version : 3.01
    product_uid     : 00000000-0000-0000-0000-000000000000
    modification_date: 2015-03-30 08:43:31
    material_package_umid: 
0x060A2B340101010501010D13130000008DB259A83CF757428D1
1E4E15E5B942F
    timecode        : 01:00:00:00
  Duration: 00:07:33.12, start: 0.000000, bitrate: 60123 kb/s
    Stream #0:0: Video: mpeg2video (4:2:2), yuv422p(tv, bt709), 1920x1080 
[SAR 1
:1 DAR 16:9], 50000 kb/s, 29.97 fps, 29.97 tbr, 29.97 tbn, 59.94 tbc
    Metadata:
      file_package_umid: 
0x060A2B340101010501010D13130000005B57EB725C61584FAF193
34EBD2C44A1
    Stream #0:1: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 
kb/s

    Metadata:
      file_package_umid: 
0x060A2B340101010501010D13130000005B57EB725C61584FAF193
34EBD2C44A1
    Stream #0:2: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 
kb/s

    Metadata:
      file_package_umid: 
0x060A2B340101010501010D13130000005B57EB725C61584FAF193
34EBD2C44A1
    Stream #0:3: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 
kb/s

    Metadata:
      file_package_umid: 
0x060A2B340101010501010D13130000005B57EB725C61584FAF193
34EBD2C44A1
    Stream #0:4: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 
kb/s

    Metadata:
      file_package_umid: 
0x060A2B340101010501010D13130000005B57EB725C61584FAF193
34EBD2C44A1
    Stream #0:5: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 
kb/s

    Metadata:
      file_package_umid: 
0x060A2B340101010501010D13130000005B57EB725C61584FAF193
34EBD2C44A1
    Stream #0:6: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 
kb/s

    Metadata:
      file_package_umid: 
0x060A2B340101010501010D13130000005B57EB725C61584FAF193
34EBD2C44A1
    Stream #0:7: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 
kb/s

    Metadata:
      file_package_umid: 
0x060A2B340101010501010D13130000005B57EB725C61584FAF193
34EBD2C44A1
    Stream #0:8: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 
kb/s

    Metadata:
      file_package_umid: 
0x060A2B340101010501010D13130000005B57EB725C61584FAF193
34EBD2C44A1
Please use -q:a or -q:v, -qscale is ambiguous
[swscaler @ 0427bea0] deprecated pixel format used, make sure you did set 
range
correctly
-map_channel is forwarded to lavfi similarly to -af pan=0x4:c0=c0.
[pan @ 0426a5c0] This syntax is deprecated. Use '|' to separate the list 
items.
[pan @ 0426a5c0] Pure channel mapping detected: 0
Output #0, avi, to 'pipe:':
  Metadata:
    uid             : 6f87f767-822f-cd4a-9053-aa89a29dbc83
    generation_uid  : c4403d71-28fb-bd46-8f28-8b61f4c5b26b
    company_name    : AVID
    product_name    : TRMG
    product_version : 3.01
    product_uid     : 00000000-0000-0000-0000-000000000000
    modification_date: 2015-03-30 08:43:31
    material_package_umid: 
0x060A2B340101010501010D13130000008DB259A83CF757428D1
1E4E15E5B942F
    ISMP            : 01:00:00:00
    ISFT            : Lavf56.29.100
    Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p(pc), 480x360 
[SAR 4:
3 DAR 16:9], q=2-31, 200 kb/s, 29.97 fps, 29.97 tbn, 29.97 tbc
    Metadata:
      encoder         : Lavc56.33.100 mjpeg
    Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, mono, 
s16 (
24 bit), 768 kb/s
    Metadata:
      file_package_umid: 
0x060A2B340101010501010D13130000005B57EB725C61584FAF193
34EBD2C44A1
      encoder         : Lavc56.33.100 pcm_s16le
Stream mapping:
  Stream #0:0 (mpeg2video) -> scale (graph 0)
  scale (graph 0) -> Stream #0:0 (mjpeg)
  Stream #0:1 -> #0:1 (pcm_s24le (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
frame=    4 fps=2.4 q=0.0 size=      21kB time=00:00:00.16 
bitrate=1012.7kbits/s
frame=   90 fps= 42 q=0.0 size=    1939kB time=00:00:03.03 
bitrate=5231.4kbits/s
frame=  181 fps= 68 q=0.0 size=    4110kB time=00:00:06.07 
bitrate=5544.7kbits/s
frame=  269 fps= 85 q=0.0 size=    6398kB time=00:00:09.00 
bitrate=5817.6kbits/s
frame=  365 fps=100 q=0.0 size=    8538kB time=00:00:12.17 
bitrate=5743.0kbits/s
frame=  476 fps=114 q=0.0 size=   10631kB time=00:00:15.91 
bitrate=5471.7kbits/s
frame=  563 fps=121 q=0.0 size=   12501kB time=00:00:18.81 
bitrate=5441.6kbits/s
frame=  652 fps=126 q=0.0 size=   14676kB time=00:00:21.78 
bitrate=5518.0kbits/s
frame=  741 fps=131 q=0.0 size=   16912kB time=00:00:24.75 
bitrate=5595.8kbits/s
frame=  830 fps=135 q=0.0 size=   18784kB time=00:00:27.72 
bitrate=5549.6kbits/s
frame=  922 fps=138 q=0.0 size=   20749kB time=00:00:30.79 
bitrate=5519.3kbits/s
frame= 1015 fps=142 q=0.0 size=   22838kB time=00:00:33.90 
bitrate=5518.7kbits/s
frame= 1109 fps=145 q=0.0 size=   24854kB time=00:00:37.03 
bitrate=5497.4kbits/s
frame= 1202 fps=147 q=0.0 size=   26941kB time=00:00:40.14 
bitrate=5498.2kbits/s
frame= 1294 fps=149 q=0.0 size=   29345kB time=00:00:43.20 
bitrate=5563.4kbits/s
frame= 1388 fps=151 q=0.0 size=   31359kB time=00:00:46.31 
bitrate=5546.8kbits/s
frame= 1486 fps=154 q=0.0 size=   33356kB time=00:00:49.61 
bitrate=5507.3kbits/s
frame= 1580 fps=155 q=0.0 size=   35807kB time=00:00:52.75 
bitrate=5560.5kbits/s
.....

frame=13286 fps=183 q=0.0 size=  282870kB time=00:07:23.34 
bitrate=5226.8kbits/s
frame=13373 fps=183 q=0.0 size=  284781kB time=00:07:26.24 
bitrate=5227.9kbits/s
frame=13464 fps=183 q=0.0 size=  286800kB time=00:07:29.28 
bitrate=5229.4kbits/s
frame=13555 fps=183 q=0.0 size=  289073kB time=00:07:32.31 
bitrate=5235.4kbits/s
frame=13580 fps=183 q=0.0 Lsize=  289776kB time=00:07:33.11 
bitrate=5238.9kbits/
s
video:247076kB audio:42480kB subtitle:0kB other streams:0kB global 
headers:0kB m
uxing overhead: 0.076041%



---
This email has been checked for viruses by Avast antivirus software.
http://www.avast.com



More information about the ffmpeg-user mailing list