[FFmpeg-user] H265 multi

DopeLabs dopelabs at dubstep.fm
Tue Apr 17 01:50:00 EEST 2018


this may be due to the fact that your trying to send both output files to stdout ( - ).

if you specify an output file for each, it should work just fine (as it did for me when i just tested it)


here is the complete uncut console output from my test using one of my own video streams as input...

i added -vtag hvc1 so h265 files will preview on a mac in finder/quicklook and i also added -t 00:00:08.000 to only record a small clip for testing purposes


$ ffmpeg -i http://stream.dsfm.tv/live/dubstepfm/playlist.m3u8 -t 00:00:08.000 -s 640X360 -c:v libx265 -vtag hvc1 -pix_fmt yuv420p -tune zerolatency -x265-params "bitrate=700:vbv-bufsize=1400" -c:a libfdk_aac -profile:a aac_he_v2 -b:a 32K -f mpegts 640.ts -t 00:00:08.000 -s 768X432 -c:v libx265 -vtag hvc1 -pix_fmt yuv420p -tune zerolatency -x265-params "bitrate=1100:vbv-bufsize=2200" -c:a libfdk_aac -profile:a aac_he_v2 -b:a 32K -y -f mpegts 768.ts
ffmpeg version N-90287-g43205df645 Copyright (c) 2000-2018 the FFmpeg developers
  built with Apple LLVM version 9.0.0 (clang-900.0.39.2)
  configuration: --enable-libmp3lame --enable-opencl --enable-audiotoolbox --enable-videotoolbox --enable-libx265 --enable-libx264 --enable-libxvid --enable-libfdk-aac --enable-lzma --enable-gnutls --enable-fontconfig --enable-libfreetype --enable-libfribidi --enable-nonfree --enable-gpl --enable-libass --enable-swscale --enable-avfilter --enable-libvorbis --enable-libopus --enable-librsvg --enable-libtheora --enable-libopenjpeg --enable-libmodplug --enable-libvpx --enable-avresample --enable-libsoxr --enable-libspeex --enable-libcaca --enable-opengl
  libavutil      56.  9.100 / 56.  9.100
  libavcodec     58. 14.100 / 58. 14.100
  libavformat    58. 10.100 / 58. 10.100
  libavdevice    58.  2.100 / 58.  2.100
  libavfilter     7. 12.100 /  7. 12.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  0.102 /  5.  0.102
  libswresample   3.  0.101 /  3.  0.101
  libpostproc    55.  0.100 / 55.  0.100
[hls,applehttp @ 0x7ffb60002800] Opening 'http://stream.dsfm.tv/live/dubstepfm/chunklist_w496336432.m3u8' for reading
[hls,applehttp @ 0x7ffb60002800] Opening 'http://stream.dsfm.tv/live/dubstepfm/media_w496336432_162.ts' for reading
[hls,applehttp @ 0x7ffb60002800] Opening 'http://stream.dsfm.tv/live/dubstepfm/media_w496336432_163.ts' for reading
Input #0, hls,applehttp, from 'http://stream.dsfm.tv/live/dubstepfm/playlist.m3u8':
  Duration: N/A, start: 7700.270933, bitrate: N/A
  Program 0
    Metadata:
      variant_bitrate : 17994006
    Stream #0:0: Data: timed_id3 (ID3  / 0x20334449)
    Metadata:
      variant_bitrate : 17994006
    Stream #0:1: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 60 tbr, 90k tbn, 120 tbc
    Metadata:
      variant_bitrate : 17994006
    Stream #0:2: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp
    Metadata:
      variant_bitrate : 17994006
Stream mapping:
  Stream #0:1 -> #0:0 (h264 (native) -> hevc (libx265))
  Stream #0:2 -> #0:1 (aac (native) -> aac (libfdk_aac))
  Stream #0:1 -> #1:0 (h264 (native) -> hevc (libx265))
  Stream #0:2 -> #1:1 (aac (native) -> aac (libfdk_aac))
Press [q] to stop, [?] for help
x265 [info]: HEVC encoder version 2.7
x265 [info]: build info [Mac OS X][clang 9.0.0][64 bit] 8bit+10bit+12bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x265 [info]: Main profile, Level-3 (Main tier)
x265 [info]: Thread pool created using 8 threads
x265 [info]: Slices                              : 1
x265 [info]: frame threads / pool features       : 3 / wpp(6 rows)
x265 [warning]: Source height < 720p; disabling lookahead-slices
x265 [warning]: VBV maxrate unspecified, assuming CBR
x265 [info]: Coding QT: max CU size, min CU size : 64 / 8
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge         : hex / 57 / 2 / 2
x265 [info]: Keyframe min / max / scenecut / bias: 25 / 250 / 0 / 5.00
x265 [info]: Lookahead / bframes / badapt        : 0 / 0 / 0
x265 [info]: b-pyramid / weightp / weightb       : 0 / 1 / 0
x265 [info]: References / ref-limit  cu / depth  : 3 / on / on
x265 [info]: AQ: mode / str / qg-size / cu-tree  : 1 / 1.0 / 32 / 0
x265 [info]: Rate Control / qCompress            : ABR-700 kbps / 0.60
x265 [info]: VBV/HRD buffer / max-rate / init    : 1400 / 700 / 0.900
x265 [info]: tools: rd=3 psy-rd=2.00 rskip signhide tmvp strong-intra-smoothing
x265 [info]: tools: deblock sao
Output #0, mpegts, to '640.ts':
  Metadata:
    encoder         : Lavf58.10.100
    Stream #0:0: Video: hevc (libx265) (hvc1 / 0x31637668), yuv420p, 640x360 [SAR 1:1 DAR 16:9], q=2-31, 60 fps, 90k tbn, 60 tbc
    Metadata:
      variant_bitrate : 17994006
      encoder         : Lavc58.14.100 libx265
    Stream #0:1: Audio: aac (libfdk_aac) (HE-AACv2), 44100 Hz, stereo, s16, 32 kb/s
    Metadata:
      variant_bitrate : 17994006
      encoder         : Lavc58.14.100 libfdk_aac
x265 [info]: HEVC encoder version 2.7
x265 [info]: build info [Mac OS X][clang 9.0.0][64 bit] 8bit+10bit+12bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x265 [info]: Main profile, Level-3.1 (Main tier)
x265 [info]: Thread pool created using 8 threads
x265 [info]: Slices                              : 1
x265 [info]: frame threads / pool features       : 3 / wpp(7 rows)
x265 [warning]: Source height < 720p; disabling lookahead-slices
x265 [warning]: VBV maxrate unspecified, assuming CBR
x265 [info]: Coding QT: max CU size, min CU size : 64 / 8
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge         : hex / 57 / 2 / 2
x265 [info]: Keyframe min / max / scenecut / bias: 25 / 250 / 0 / 5.00
x265 [info]: Lookahead / bframes / badapt        : 0 / 0 / 0
x265 [info]: b-pyramid / weightp / weightb       : 0 / 1 / 0
x265 [info]: References / ref-limit  cu / depth  : 3 / on / on
x265 [info]: AQ: mode / str / qg-size / cu-tree  : 1 / 1.0 / 32 / 0
x265 [info]: Rate Control / qCompress            : ABR-1100 kbps / 0.60
x265 [info]: VBV/HRD buffer / max-rate / init    : 2200 / 1100 / 0.900
x265 [info]: tools: rd=3 psy-rd=2.00 rskip signhide tmvp strong-intra-smoothing
x265 [info]: tools: deblock sao
Output #1, mpegts, to '768.ts':
  Metadata:
    encoder         : Lavf58.10.100
    Stream #1:0: Video: hevc (libx265) (hvc1 / 0x31637668), yuv420p, 768x432 [SAR 1:1 DAR 16:9], q=2-31, 60 fps, 90k tbn, 60 tbc
    Metadata:
      variant_bitrate : 17994006
      encoder         : Lavc58.14.100 libx265
    Stream #1:1: Audio: aac (libfdk_aac) (HE-AACv2), 44100 Hz, stereo, s16, 32 kb/s
    Metadata:
      variant_bitrate : 17994006
      encoder         : Lavc58.14.100 libfdk_aac
frame=  480 fps= 42 q=-0.0 Lq=-0.0 size=     910kB time=00:00:08.02 bitrate= 928.7kbits/s speed=0.695x
video:1946kB audio:64kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
x265 [info]: frame I:      2, Avg QP:32.44  kb/s: 2473.44
x265 [info]: frame P:    478, Avg QP:29.56  kb/s: 761.97
x265 [info]: Weighted P-Frames: Y:0.0% UV:0.0%
x265 [info]: consecutive B-frames: 100.0%

encoded 480 frames in 11.52s (41.67 fps), 769.11 kb/s, Avg QP:29.57
x265 [info]: frame I:      2, Avg QP:30.87  kb/s: 3642.48
x265 [info]: frame P:    478, Avg QP:28.29  kb/s: 1201.33
x265 [info]: Weighted P-Frames: Y:0.0% UV:0.0%
x265 [info]: consecutive B-frames: 100.0%

encoded 480 frames in 11.49s (41.77 fps), 1211.50 kb/s, Avg QP:28.30


$ ffprobe 768.ts
ffprobe version N-90287-g43205df645 Copyright (c) 2007-2018 the FFmpeg developers
  built with Apple LLVM version 9.0.0 (clang-900.0.39.2)
  configuration: --enable-libmp3lame --enable-opencl --enable-audiotoolbox --enable-videotoolbox --enable-libx265 --enable-libx264 --enable-libxvid --enable-libfdk-aac --enable-lzma --enable-gnutls --enable-fontconfig --enable-libfreetype --enable-libfribidi --enable-nonfree --enable-gpl --enable-libass --enable-swscale --enable-avfilter --enable-libvorbis --enable-libopus --enable-librsvg --enable-libtheora --enable-libopenjpeg --enable-libmodplug --enable-libvpx --enable-avresample --enable-libsoxr --enable-libspeex --enable-libcaca --enable-opengl
  libavutil      56.  9.100 / 56.  9.100
  libavcodec     58. 14.100 / 58. 14.100
  libavformat    58. 10.100 / 58. 10.100
  libavdevice    58.  2.100 / 58.  2.100
  libavfilter     7. 12.100 /  7. 12.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  0.102 /  5.  0.102
  libswresample   3.  0.101 /  3.  0.101
  libpostproc    55.  0.100 / 55.  0.100
Input #0, mpegts, from '768.ts':
  Duration: 00:00:08.15, start: 1.400000, bitrate: 1383 kb/s
  Program 1
    Metadata:
      service_name    : Service01
      service_provider: FFmpeg
    Stream #0:0[0x100]: Video: hevc (Main) ([36][0][0][0] / 0x0024), yuv420p(tv), 768x432 [SAR 1:1 DAR 16:9], 60 fps, 60 tbr, 90k tbn, 60 tbc
    Stream #0:1[0x101]: Audio: aac (HE-AACv2) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 29 kb/s


$ ffprobe 640.ts
ffprobe version N-90287-g43205df645 Copyright (c) 2007-2018 the FFmpeg developers
  built with Apple LLVM version 9.0.0 (clang-900.0.39.2)
  configuration: --enable-libmp3lame --enable-opencl --enable-audiotoolbox --enable-videotoolbox --enable-libx265 --enable-libx264 --enable-libxvid --enable-libfdk-aac --enable-lzma --enable-gnutls --enable-fontconfig --enable-libfreetype --enable-libfribidi --enable-nonfree --enable-gpl --enable-libass --enable-swscale --enable-avfilter --enable-libvorbis --enable-libopus --enable-librsvg --enable-libtheora --enable-libopenjpeg --enable-libmodplug --enable-libvpx --enable-avresample --enable-libsoxr --enable-libspeex --enable-libcaca --enable-opengl
  libavutil      56.  9.100 / 56.  9.100
  libavcodec     58. 14.100 / 58. 14.100
  libavformat    58. 10.100 / 58. 10.100
  libavdevice    58.  2.100 / 58.  2.100
  libavfilter     7. 12.100 /  7. 12.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  0.102 /  5.  0.102
  libswresample   3.  0.101 /  3.  0.101
  libpostproc    55.  0.100 / 55.  0.100
Input #0, mpegts, from '640.ts':
  Duration: 00:00:08.15, start: 1.400000, bitrate: 915 kb/s
  Program 1
    Metadata:
      service_name    : Service01
      service_provider: FFmpeg
    Stream #0:0[0x100]: Video: hevc (Main) ([36][0][0][0] / 0x0024), yuv420p(tv), 640x360 [SAR 1:1 DAR 16:9], 60 fps, 60 tbr, 90k tbn, 60 tbc
    Stream #0:1[0x101]: Audio: aac (HE-AACv2) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 29 kb/s
[22][03:46:51] dopelabs at jeez:/Volumes/CAM/vg_ytrip $



> On Apr 16, 2018, at 12:00 01PM, José María Infanzón <jocheinfa at gmail.com> wrote:
> 
> Hi all,
>          I'm trying to get multiple outputs (different resuloutions) out
> of the same input. I was able to achieve this with h264 based on the guide:
> https://trac.ffmpeg.org/wiki/Creating%20multiple%20outputs but on the case
> of HEVC, I'm being unable
> 
> I've tried with:
> 
> /root/ffmpeg_sources/ffmpeg/ffmpeg -loglevel error -y -i udp://@
> 224.2.2.3:1012 -s 640X360 -vcodec libx265 -pix_fmt yuv420p -tune
> zerolatency -x265-params "bitrate=700:vbv-bufsize=1400" -acodec libfdk_aac
> -profile:a aac_he_v2 -b:a 32K -f mpegts - -s 768X432 -vcodec libx265
> -pix_fmt yuv420p -tune zerolatency -x265-params
> "bitrate=1100:vbv-bufsize=2200" -acodec libfdk_aac -profile:a aac_he_v2
> -b:a 32K -f mpegts -
> 
> Where I have 2 resolutions (640x360 & 768x432) with the same audio encoding.
> 
> But it doesn't work.
> 
> 
> 
> 
> 
> -- 
> José María Infanzón
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> 
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".



More information about the ffmpeg-user mailing list