A
A
alexdora2017-01-19 15:01:10
RTMP
alexdora, 2017-01-19 15:01:10

How to solve ffmpeg stream transcoding issue?

There is a device that says this:
ffmpeg -f decklink -list_formats 1 -i 'UltraStudio Mini Recorder'


ffmpeg version 2.8.3 Copyright (c) 2000-2015 the FFmpeg developers
built with Apple LLVM version 8.0.0 (clang-800.0.42.1)
configuration: --prefix=/usr/local/Cellar/ffmpeg/2.8.3 -- 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-decklink --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
3. 1.101 libswscale / 1.101 3.
libswresample 1. 2.101 / 2.101 1.
libpostproc 53. 3.100 / 3.100 53.
[DeckLink @ 0x7fd176000000] Supported formats for 'UltraStudio the Mini Recorder':
[DeckLink @ 0x7fd176000000] 1 720x486 at 30000/1001 fps (Interlaced, Lower Field FIRST)
[Decklink @ 0x7FD176000000] 2 720x486 at 24000/1001 FPS
[Decklink @ 0x7FD176000000] 3 720x576 at 25000/1000 FPS (Interlaced, Upper Field First)
[Decklink @ 0x7FD176000000] 4 720x486 at 60000/1001 fps
[decklink @ 0x7fd176000000] 5 720x576 at 50000/1000 fps
[decklink @ 0x7fd176000000] 6 1920x1080 at 24000/1001 fps
[decklink @ 0x7fd176000000] 7 1920x1080 fps at 1040 fps
[decklink @ 0x7fd176000000] 8 1920x1080 at 25000/1000 fps
[decklink @ 0x7fd176000000] 9 1920x1080 at 30000/1001 fps
[decklink @ 0x7fd176000000] 10 1920x1080 at 30000/1000 fps
[decklink @ 0x7fd176000000] 11 1920x1080 at 25000/1000 fps (interlaced , upper field first)
[decklink @ 0x7fd176000000] 12 30000/1001 fps at 1920x1080 (interlaced, upper field first)
[decklink @ 0x7fd176000000] 13 30000/1000 fps at 1920x1080 (interlaced, upper field first)
[decklink @ 0x7fd176000000] 14 1280x720 at 50000/1000 fps
[decklink @ 0x7fd176000000] 15 1280x720 at 60000/1001 fps [ decklink
@ 0x7fd176000000] 16

We need to send the video via RTMP, for some reason it doesn't work:
ffmpeg -f decklink -i 'UltraStudio Mini [email protected]' -threads 1 -c:v libx264 -g 60 -profile:v baseline -b:v 1200K -s 1280x720 -f flv -c:a aac -ac 1 -strict -2 -b:a 128k rtmp://somertmpserv/live/alexdora

ffmpeg version 2.8.3 Copyright (c) 2000-2015 the FFmpeg developers
built with Apple LLVM version 8.0.0 (clang-800.0.42.1)
configuration: --prefix=/usr/local/Cellar/ffmpeg/2.8.3 -- 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-decklink --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
[Decklink @ 0x7FDC75002C00] Found Decklink Mode 1920 x 1080 WITH RATE 30.00
[DECKLINK @ 0x7FDC75002C00] Frame Received (# 1) - No input signal detected - Frames dropped 1
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, decklink, from 'UltraStudio Mini [email protected]':
Duration: N/A, start: 0.000000, bitrate: 1536 kb/s
Stream #0:0: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
Stream #0:1: Video: rawvideo (UYVY / 0x59565955), uyvy422, 1920x1080, -5 kb/s, 30 tbr, 1000k tbn, 30 tbc
No pixel format specified, yuv422p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
x264 [error]: baseline profile doesn't support 4:2:2
[libx264 @ 0x7fdc75808400] Error setting profile baseline.
[libx264 @ 0x7fdc75808400] Possible profiles: baseline main high high10 high422 high444
Output #0, flv, to '':
Stream #0:0: Video: h264, none, q=2-31, 128 kb/s, 30 fps
Metadata :
encoder : Lavc56.60.100 libx264
Stream #0:1: Audio: aac, 0 channels, 128 kb/s
Metadata:
encoder : Lavc56.60.100 aac
Stream mapping:
Stream #0:1 -> #0:0 (rawvideo (native ) -> h264 (libx264))
Stream #0:0 -> #0: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 t
Segmentation fault: 11

The question is how to fix it. There is a small chance that the sound is streaming through another device
ffmpeg -f avfoundation -list_devices true -i ""

ffmpeg version 2.8.3 Copyright (c) 2000-2015 the FFmpeg developers
built with Apple LLVM version 8.0.0 (clang-800.0.42.1)
configuration: --prefix=/usr/local/Cellar/ffmpeg/2.8.3 -- 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-decklink --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
[AVFoundation input device @ 0x7ff31b4003e0] AVFoundation video devices:
[AVFoundation input device @ 0x7ff31b4003] HD-camera Built-in)
[AVFoundation input device @ 0x7ff31b4003e0] [1] Capture screen 0 [
AVFoundation input device @ 0x7ff31b4003e0 ] -in Microphone : Input/output error

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
alexdora, 2017-01-19
@alexdora

ADD Solution:
Wondering why the Blackmagic device in Source displays a black screen when using OBS. However, you can add an image device and a sound device separately.
I found a topic where people discussed that the piece of iron itself is not configured via Black Magic Express in an explicit way. And indeed it worked for me too. Black Magic Express chose the color profile and quality. Turned off and loaded with these parameters - all type top. EARNED
ADD:
I don't sit idle either.

ffmpeg version 2.8.3 Copyright (c) 2000-2015 the FFmpeg developers
built with Apple LLVM version 8.0.0 (clang-800.0.42.1)
configuration: --prefix=/usr/local/Cellar/ffmpeg/2.8.3 -- 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-decklink --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
[Decklink @ 0x7F8BDC000000] Found Decklink Mode 1920 x 1080 WITH RATE 30.00
[decklink @ 0x7F8BDC000000] Frame Received (# 1) - No input signal detected - Frames dropped 1
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, decklink, from 'UltraStudio Mini [email protected]':
Duration: N/A, start: 0.000000, bitrate: 1536 kb/s
Stream #0:0: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
Stream #0:1: Video: rawvideo (UYVY / 0x59565955), uyvy422, 1920x1080, -5 kb/s, 30 tbr, 1000k tbn, 30 tbc
[libx264 @ 0x7f8bdc805200] using SAR=1/1
[libx264 @ 0x7f8bdc805200] using the cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0x7f8bdc805200] Constrained the Baseline profile, level 4.0
[libx264 @ 0x7f8bdc805200] 264 - core 148 r2728 4d5c8b0 - H.264 / MPEG-4 AVC codec - Copyleft 2003-2016 - www.videolan.org/x264.html - options: cabac=0 ref=3 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref= 1 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra =0 bframes=0 weightp=0 keyint=60 keyint_min=6 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=1000 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, flv, to '*':
Metadata:
encoder : Lavf56.40.101
Stream #0:0: Video: h264 (libx264) ([7][0][0][0] / 0x0007), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 1000 kb/s, 30 fps, 1k tbn, 30 tbc
Metadata:
encoder : Lavc56.60.100 libx264
Stream #0:1: Audio: aac ( libvo_aacenc) ([10][0][0][0] / 0x000A), 44100 Hz, stereo, s16, 64 kb/s
Metadata:
encoder : Lavc56.60.100 libvo_aacenc
Stream mapping:
Stream #0:1 -> #0 :0 (rawvideo (native) -> h264 (libx264))
Stream #0:0 -> #0:1 (pcm_s16le (native) -> aac (libvo_aacenc))
Press [q] to stop, [?] for help
[flv @ 0x7f8bdc804600] Failed to update header with correct duration.76.0kbits/s
[flv @ 0x7f8bdc804600] Failed to update header with correct filesize.
video:21kB audio:38kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 11.455467%
[libx264 @ 0x7f8bdc805200] frame I:3 Avg QP: 7.33 size: 6376
[libx264 @ 0x7f8bdc805200] frame P:143 Avg QP: 2.04 size: 12
[libx264 @ 0x7f8bdc805200] mb I I16..4: 100.0 %
0.06 @ 0x7f8bdc805200] mb P I16..4: 0.0% 0.0% 0.0% P16..4: 0.0% 0.0% 0.0% 0.0% 0.0% skip:100.0%
[libx264 @ 0x7f8bdc805200] final ratefactor: -1.31
[libx264 @ 0x7f8bdc805200] coded y,uvDC,uvAC intra: 0.0% 0.1% 0.0% inter: 0.0% 0.0% 0.0%
[libx264 @ 0x7f8bdc805200] i16 v,h,dc,p: 99% 0% 1% 0%
[ libx264 @ 0x7f8bdc805200] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 0% 0% 100% 0% 0% 0% 0% 0% 0%
[libx264 @ 0x7f8bdc805200] i8c dc,h ,v,p: 94% 0% 6% 0%
[libx264 @ 0x7f8bdc805200] kb/s:34.27
Segmentation fault: 11
But ffplay displays color bars in full screen (apparently blackmagic branded style).
I tried different things - I can not get a picture. OBS captures the image from the camera properly... 3caa7b82648f445f9187b4fda06ffd33.pngADD
As a matter of fact, yes, the colored bars are a branded theme when the signal is lost or when the incoming data is incorrect. I don't know what else to change, fix. OBS or native Media Express see the live stream from the camera

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question