Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#1581 closed defect (invalid)

No video, when broadcasting via rtmp

Reported by: Alex Nova Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: yes

Description

Summary of the bug

RTMP videocasting services such as justin.tv or own3d.tv show LIVE status, when broadcasting via FFmpeg, though no video, but a black screen.

How to reproduce

Shell script example:

INRES="1920x1080"
OUTRES="1920x1080"
FPS="30"
QUAL="ultrafast"

STREAM_KEY="YourStreamKeyTypeHere"
URL="rtmp://live.eu.own3d.tv/live/$STREAM_KEY"

ffmpeg -f x11grab -y -s "$INRES" -r "$FPS" -i :0.0 -an \

-vcodec libx264 -preset "$QUAL" -crf 30 -s "$OUTRES" -b:v 1500k \
-f flv "$URL"

Here is the output:

--- BEGINNING OF THE LOG ---

vitrums@vitrums:~/stream$ ffmpeg version git-2012-07-28-a2f91e7 Copyright (c) 2000-2012 the FFmpeg developers

built on Jul 28 2012 12:01:28 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-version3 --enable-x11grab
libavutil 51. 65.100 / 51. 65.100
libavcodec 54. 45.100 / 54. 45.100
libavformat 54. 21.100 / 54. 21.100
libavdevice 54. 2.100 / 54. 2.100
libavfilter 3. 3.100 / 3. 3.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100

[x11grab @ 0x36d9440] device: :0.0 -> display: :0.0 x: 0 y: 0 width: 1920 height: 1080
[x11grab @ 0x36d9440] shared memory extension found
[x11grab @ 0x36d9440] Estimating duration from bitrate, this may be inaccurate
Input #0, x11grab, from ':0.0':

Duration: N/A, start: 1343479201.360353, bitrate: 1990656 kb/s

Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 1920x1080, 1990656 kb/s, 30 tbr, 1000k tbn, 30 tbc

[libx264 @ 0x36e6b40] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 AVX
[libx264 @ 0x36e6b40] profile High 4:4:4 Predictive, level 4.0, 4:4:4 8-bit
[libx264 @ 0x36e6b40] 264 - core 125 r2 d9d2288 - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=6 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=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=30.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0
Output #0, flv, to 'rtmp://live.eu.own3d.tv/live/HIDDEN':

Metadata:

encoder : Lavf54.21.100
Stream #0:0: Video: h264 ([7][0][0][0] / 0x0007), yuv444p, 1920x1080, q=-1--1, 1500 kb/s, 1k tbn, 30 tbc

Stream mapping:

Stream #0:0 -> #0:0 (rawvideo -> libx264)

Press [q] to stop, ? for help
frame= 231 fps= 24 q=32766.0 Lsize= 977kB time=00:00:07.70 bitrate=1039.8kbits/s
video:973kB audio:0kB subtitle:0 global headers:0kB muxing overhead 0.491404%
[libx264 @ 0x36e6b40] frame I:1 Avg QP:27.00 size:268629
[libx264 @ 0x36e6b40] frame P:230 Avg QP:20.46 size: 3159
[libx264 @ 0x36e6b40] mb I I16..4: 100.0% 0.0% 0.0%
[libx264 @ 0x36e6b40] mb P I16..4: 0.3% 0.0% 0.0% P16..4: 1.4% 0.0% 0.0% 0.0% 0.0% skip:98.2%
[libx264 @ 0x36e6b40] coded y,u,v intra: 32.4% 14.7% 14.1% inter: 0.7% 0.3% 0.3%
[libx264 @ 0x36e6b40] i16 v,h,dc,p: 62% 31% 5% 2%
[libx264 @ 0x36e6b40] kb/s:1034.06

--- END OF THE LOG ---

AFAIK, the log is fine and no crashes were reported.

However if we run the same command with the output method set as: -f flv out.lfv, the locally recorded video would be just fine. We may actually try to send it via rtmp using the following command:

ffmpeg -re -i out.flv -c copy -f flv "$URL"

which would again, give the same result, as if the video was grabbed directly via x11grab. The video is still blank.

Change History (5)

comment:1 by Alex Nova, 12 years ago

I am using Ubuntu 12.04 x64 with 3.2.0-27-generic kernel.
HW: Intel Core i5, NVidia GeForce GTX 560, 8 Gb RAM

Last edited 12 years ago by Alex Nova (previous) (diff)

comment:2 by Alex Nova, 12 years ago

I managed to partially solve this issue. Notwithstanding the fact I still can't get anything but a blank picture, when I playback the video via justin.tv's player, after examining the .flv file itself (downloaded it from justin.tv by the direct link), it can be played via a mediaplayer, such as Totem Movie Player.

Hence there has to be some major difference between formats of custom .flv videos, which might be easily played via justin.tv player and those, which are recorded during the screencasting and give a dark screen on justin.tv. Audio is fine regardless.

comment:3 by Alex Nova, 12 years ago

Issure resolved.

ffprobe has given the output:

vitrums@vitrums:~/stream$ ffprobe out.flv
ffprobe version git-2012-07-28-a2f91e7 Copyright (c) 2007-2012 the FFmpeg developers

built on Jul 28 2012 12:01:28 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-version3 --enable-x11grab
libavutil 51. 65.100 / 51. 65.100
libavcodec 54. 45.100 / 54. 45.100
libavformat 54. 21.100 / 54. 21.100
libavdevice 54. 2.100 / 54. 2.100
libavfilter 3. 3.100 / 3. 3.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100

Input #0, flv, from 'out.flv':

Metadata:

major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf54.21.100

Duration: 00:00:10.00, start: 0.067000, bitrate: 3912 kb/s

Stream #0:0: Video: h264 (High 4:4:4 Predictive), yuv444p, 1920x1080, 30 tbr, 1k tbn, 60 tbc
Stream #0:1: Audio: mp3, 44100 Hz, stereo, s16, 128 kb/s

Since yuv444p pixel format is not widely supported, addition of "-pix_fmt yuv420p" to my video encoding properties has resolved the issue.

[SOLVED!]

comment:4 by Stefano Sabatini, 12 years ago

Analyzed by developer: set
Resolution: invalid
Status: newclosed

Closing the issue as invalid since the issue was not depending on FFmpeg itself. Thanks.

comment:5 by Carl Eugen Hoyos, 12 years ago

Component: FFmpegundetermined
Keywords: rtmp justin own3d broadcast removed
Note: See TracTickets for help on using tickets.