Page 1 of 1

FFMPEG Multibitrate Issue

PostPosted: Sat Sep 16, 2017 11:47 am
by dinesh24
Hello,

I need help on below issue.

We need to create HLS package. I am trying to create using FFMPEG. for that i need to create multibitrate UDP stream. I am stuck how to create how to create multibitrate UDP using FFMPEG.

Below is project scenario.

Unicast or VOD----> FFMPEG (Process to multibitrate UDP)-----> HLS Packager---> Application

I am tried below FFMPEG command but showing error message.

we want to process singal UDP stream in to multi-bitrate UDP.

Please note below specification.
1080p--> 4500kbps
720p---->3000kbps
480p---->1200kbps

Code: Select all

ffmpeg.exe -re -i "C:/Program Files (x86)/Wowza Media Systems/Wowza Streaming Engine 4.7.1/content/sample.mp4"  -vcodec libx264 -s 1920x1080  -vb 4500k -r 30 -g 60 -vprofile main -level 5 -acodec aac -ab 64k -ar 48000 -ac 2 -vbsf h264_mp4toannexb -strict experimental -f mpegts udp://127.0.0.1:1111/ -vcodec libx264 -s 1280x720  -vb 3000k -r 30 -g 60 -vprofile main -level 5 -acodec aac -ab 64k -ar 48000 -ac 2 -vbsf h264_mp4toannexb -strict experimental -f mpegts udp://127.0.0.1:1112/ -vcodec libx264 -s 854x480  -vb 1200k -r 30 -g 60 -vprofile main -level 5 -acodec aac -ab 64k -ar 48000 -ac 2 -vbsf h264_mp4toannexb -strict experimental -f mpegts udp://127.0.0.1:1113


Please send me right ffmpeg command..

Re: FFMPEG Multibitrate Issue

PostPosted: Sat Sep 16, 2017 5:56 pm
by llogan
dinesh24 wrote:I am tried below FFMPEG command but showing error message.

What's the error message? Show the complete console output from your command.

Re: FFMPEG Multibitrate Issue

PostPosted: Mon Sep 18, 2017 6:02 am
by dinesh24
Hello,

Please find below comple console output with ffmpeg command.

Code: Select all
C:\Users\IPlayout>D:\FFAStrans0.7.2_Win32-20170804T121108Z-001\FFAStrans0.7.2_Win32\Processors\FFMpeg\ffmpegx64.exe -re -i "D:\AAA\test.mov" -vcodec libx264 -s 1920x1080  -vb 2000k -r 25 -g 60 -vprofi
le main -level 5 -acodec aac -ab 64k -ar 48000 -vbsf h264_mp4toannexb -strict experimental -f mpegts udp://127.0.0.1:1111/ -vcodec libx264 -s 1280x720  -vb 1200k -r 25 -g 60 -vprofile main -level 5 -a
codec aac -ab 64k -ar 48000 -vbsf h264_mp4toannexb -strict experimental -f mpegts udp://127.0.0.1:1112/ -vcodec libx264 -s 854x480  -vb 800k -r 25 -g 60 -vprofile main -level 5 -acodec aac -ab 64k -ar
 48000 -vbsf h264_mp4toannexb -strict experimental -f mpegts udp://127.0.0.1:1113/ -vcodec libx264 -s 640x360  -vb 400k -r 25 -g 60 -vprofile main -level 5 -acodec aac -ab 64k -ar 48000 -vbsf h264_mp4
toannexb -strict experimental -f mpegts udp://127.0.0.1:1114
ffmpeg version N-79143-g8ff0f6a Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.3.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libblu
ray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmfx --enable-libmp3lame --enable-libopenc
ore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-l
ibtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enab
le-libzimg --enable-lzma --enable-decklink --enable-zlib
  libavutil      55. 19.100 / 55. 19.100
  libavcodec     57. 30.100 / 57. 30.100
  libavformat    57. 29.101 / 57. 29.101
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 40.102 /  6. 40.102
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
Guessed Channel Layout for  Input Stream #0.1 : stereo
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'D:\AAA\test.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 537134592
    compatible_brands: qt
    creation_time   : 2010-04-03 09:57:54
  Duration: 00:01:44.76, start: 0.000000, bitrate: 51475 kb/s
    Stream #0:0(eng): Video: mpeg2video (4:2:2) (xd5c / 0x63356478), yuv422p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 49938 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc (default)
    Metadata:
      creation_time   : 2010-04-03 09:57:54
      handler_name    : Alias
      encoder         : XDCamHD Coding
    Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, 2 channels, s16, 1536 kb/s (default)
    Metadata:
      creation_time   : 2010-04-03 09:57:54
      handler_name    : Alias
No pixel format specified, yuv422p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
x264 [error]: main profile doesn't support 4:2:2
    Last message repeated 3 times
[libx264 @ 000000000277cd00] Error setting profile main.
[libx264 @ 000000000277cd00] Possible profiles: baseline main high high10 high422 high444
Output #0, mpegts, to 'udp://127.0.0.1:1111/':
  Metadata:
    major_brand     : qt
    minor_version   : 537134592
    compatible_brands: qt
    Stream #0:0(eng): Video: h264, none, q=2-31, 128 kb/s, SAR 1:1 DAR 0:0, 25 fps (default)
    Metadata:
      creation_time   : 2010-04-03 09:57:54
      handler_name    : Alias
      encoder         : Lavc57.30.100 libx264
    Stream #0:1(eng): Audio: aac, 0 channels, 128 kb/s (default)
    Metadata:
      creation_time   : 2010-04-03 09:57:54
      handler_name    : Alias
      encoder         : Lavc57.30.100 aac
Output #1, mpegts, to 'udp://127.0.0.1:1112/':
  Metadata:
    major_brand     : qt
    minor_version   : 537134592
    compatible_brands: qt
    Stream #1:0(eng): Video: h264, none, q=2-31, 128 kb/s, SAR 1:1 DAR 0:0, 25 fps (default)
    Metadata:
      creation_time   : 2010-04-03 09:57:54
      handler_name    : Alias
      encoder         : Lavc57.30.100 libx264
    Stream #1:1(eng): Audio: aac, 0 channels, 128 kb/s (default)
    Metadata:
      creation_time   : 2010-04-03 09:57:54
      handler_name    : Alias
      encoder         : Lavc57.30.100 aac
Output #2, mpegts, to 'udp://127.0.0.1:1113/':
  Metadata:
    major_brand     : qt
    minor_version   : 537134592
    compatible_brands: qt
    Stream #2:0(eng): Video: h264, none, q=2-31, 128 kb/s, SAR 1280:1281 DAR 0:0, 25 fps (default)
    Metadata:
      creation_time   : 2010-04-03 09:57:54
      handler_name    : Alias
      encoder         : Lavc57.30.100 libx264
    Stream #2:1(eng): Audio: aac, 0 channels, 128 kb/s (default)
    Metadata:
      creation_time   : 2010-04-03 09:57:54
      handler_name    : Alias
      encoder         : Lavc57.30.100 aac
Output #3, mpegts, to 'udp://127.0.0.1:1114':
  Metadata:
    major_brand     : qt
    minor_version   : 537134592
    compatible_brands: qt
    Stream #3:0(eng): Video: h264, none, q=2-31, 128 kb/s, SAR 1:1 DAR 0:0, 25 fps (default)
    Metadata:
      creation_time   : 2010-04-03 09:57:54
      handler_name    : Alias
      encoder         : Lavc57.30.100 libx264
    Stream #3:1(eng): Audio: aac, 0 channels, 128 kb/s (default)
    Metadata:
      creation_time   : 2010-04-03 09:57:54
      handler_name    : Alias
      encoder         : Lavc57.30.100 aac
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg2video (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (pcm_s16le (native) -> aac (native))
  Stream #0:0 -> #1:0 (mpeg2video (native) -> h264 (libx264))
  Stream #0:1 -> #1:1 (pcm_s16le (native) -> aac (native))
  Stream #0:0 -> #2:0 (mpeg2video (native) -> h264 (libx264))
  Stream #0:1 -> #2:1 (pcm_s16le (native) -> aac (native))
  Stream #0:0 -> #3:0 (mpeg2video (native) -> h264 (libx264))
  Stream #0:1 -> #3:1 (pcm_s16le (native) -> aac (native))
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height

Re: FFMPEG Multibitrate Issue

PostPosted: Mon Sep 18, 2017 8:46 pm
by llogan
From your console output:
Code: Select all
No pixel format specified, yuv422p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
x264 [error]: main profile doesn't support 4:2:2
[libx264 @ 000000000277cd00] Error setting profile main.

Add "-pix_fmt yuv420p" as an output option for each output.

You should also get a new version of ffmpeg. Yours is old. Get it from here:
https://ffmpeg.zeranoe.com/builds/

Re: FFMPEG Multibitrate Issue

PostPosted: Thu Sep 21, 2017 5:03 am
by dinesh24
Thanks llogan...

It is working now...

Thanks
Dinesh