- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
一些上下文:我有一个 MKV 文件,我正在尝试将它流式传输到 http://localhost:8090/test.flv作为一个flv文件。
流开始,然后立即结束。
我正在使用的命令是:
sudo ffmpeg -re -i input.mkv -c:v libx264 -maxrate 1000k -bufsize 2000k -an -bsf:v h264_mp4toannexb -g 50 http://localhost:8090/test.flv
sudo
ffmpeg
-re
-i input.mkv
-c:v libx264
-maxrate 1000k -bufsize 2000k
-an -bsf:v h264_mp4toannexb
-g 50
http://localhost:8090/test.flv
ffmpeg version N-80901-gfebc862 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
configuration: --extra-libs=-ldl --prefix=/opt/ffmpeg --mandir=/usr/share/man --enable-avresample --disable-debug --enable-nonfree --enable-gpl --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-decoder=amrnb --disable-decoder=amrwb --enable-libpulse --enable-libfreetype --enable-gnutls --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-libvorbis --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libspeex --enable-libass --enable-avisynth --enable-libsoxr --enable-libxvid --enable-libvidstab
libavutil 55. 28.100 / 55. 28.100
libavcodec 57. 48.101 / 57. 48.101
libavformat 57. 41.100 / 57. 41.100
libavdevice 57. 0.102 / 57. 0.102
libavfilter 6. 47.100 / 6. 47.100
libavresample 3. 0. 0 / 3. 0. 0
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 1.100 / 2. 1.100
libpostproc 54. 0.100 / 54. 0.100
Input #0, matroska,webm, from 'input.mkv':
Metadata:
encoder : libebml v1.3.0 + libmatroska v1.4.0
creation_time : 1970-01-01 00:00:02
Duration: 00:01:32.26, start: 0.000000, bitrate: 4432 kb/s
Stream #0:0(eng): Video: h264 (High 10), yuv420p10le, 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
Stream #0:1(nor): Audio: flac, 48000 Hz, stereo, s16 (default)
[libx264 @ 0x2e1c380] using SAR=1/1
[libx264 @ 0x2e1c380] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0x2e1c380] profile High, level 4.0
[libx264 @ 0x2e1c380] 264 - core 148 r2643 5c65704 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=1 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=50 keyint_min=5 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=1000 vbv_bufsize=2000 crf_max=0.0 nal_hrd=none filler=0 ip_ratio=1.40 aq=1:1.00
[flv @ 0x2e3f0a0] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
Output #0, flv, to 'http://localhost:8090/test.flv':
Metadata:
encoder : Lavf57.41.100
Stream #0:0(eng): Video: h264 (libx264) ([7][0][0][0] / 0x0007), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 23.98 fps, 1k tbn, 23.98 tbc (default)
Metadata:
encoder : Lavc57.48.101 libx264
Side data:
cpb: bitrate max/min/avg: 1000000/0/0 buffer size: 2000000 vbv_delay: -1
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Press [q] to stop, [?] for help
Killed 26 fps= 26 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
Sat Aug 20 12:40:11 2016 File '/test.flv' not found
Sat Aug 20 12:40:11 2016 [SERVER IP] - - [POST] "/test.flv HTTP/1.1" 404 189
#Sample ffserver configuration file
# Port on which the server is listening. You must select a different
# port from your standard HTTP web server if it is running on the same
# computer.
Port 8090
# Address on which the server is bound. Only useful if you have
# several network interfaces.
BindAddress 0.0.0.0
# Number of simultaneous HTTP connections that can be handled. It has
# to be defined *before* the MaxClients parameter, since it defines the
# MaxClients maximum limit.
MaxHTTPConnections 2000
# Number of simultaneous requests that can be handled. Since FFServer
# is very fast, it is more likely that you will want to leave this high
# and use MaxBandwidth, below.
MaxClients 1000
# This the maximum amount of kbit/sec that you are prepared to
# consume when streaming to clients.
MaxBandwidth 1000
# Access log file (uses standard Apache log file format)
# '-' is the standard output.
CustomLog -
# Suppress that if you want to launch ffserver as a daemon.
#NoDaemon
##################################################################
# Definition of the live feeds. Each live feed contains one video
# and/or audio sequence coming from an ffmpeg encoder or another
# ffserver. This sequence may be encoded simultaneously with several
# codecs at several resolutions.
<Feed feed1.ffm>
ACL allow 192.168.0.0 192.168.255.255
# You must use 'ffmpeg' to send a live feed to ffserver. In this
# example, you can type:
#
#ffmpeg http://localhost:8090/test.ffm
# ffserver can also do time shifting. It means that it can stream any
# previously recorded live stream. The request should contain:
# "http://xxxx?date=[YYYY-MM-DDT][[HH:]MM:]SS[.m...]".You must specify
# a path where the feed is stored on disk. You also specify the
# maximum size of the feed, where zero means unlimited. Default:
# File=/tmp/feed_name.ffm FileMaxSize=5M
File /tmp/feed1.ffm
FileMaxSize 200m
# You could specify
# ReadOnlyFile /saved/specialvideo.ffm
# This marks the file as readonly and it will not be deleted or updated.
# Specify launch in order to start ffmpeg automatically.
# First ffmpeg must be defined with an appropriate path if needed,
# after that options can follow, but avoid adding the http:// field
#Launch ffmpeg
# Only allow connections from localhost to the feed.
ACL allow 127.0.0.1
</Feed>
##################################################################
# Now you can define each stream which will be generated from the
# original audio and video stream. Each format has a filename (here
# 'test1.mpg'). FFServer will send this stream when answering a
# request containing this filename.
<Stream test1.mpg>
# coming from live feed 'feed1'
Feed feed1.ffm
# Format of the stream : you can choose among:
# mpeg : MPEG-1 multiplexed video and audio
# mpegvideo : only MPEG-1 video
# mp2 : MPEG-2 audio (use AudioCodec to select layer 2 and 3 codec)
# ogg : Ogg format (Vorbis audio codec)
# rm : RealNetworks-compatible stream. Multiplexed audio and video.
# ra : RealNetworks-compatible stream. Audio only.
# mpjpeg : Multipart JPEG (works with Netscape without any plugin)
# jpeg : Generate a single JPEG image.
# asf : ASF compatible streaming (Windows Media Player format).
# swf : Macromedia Flash compatible stream
# avi : AVI format (MPEG-4 video, MPEG audio sound)
Format mpeg
# Bitrate for the audio stream. Codecs usually support only a few
# different bitrates.
AudioBitRate 32
# Number of audio channels: 1 = mono, 2 = stereo
AudioChannels 2
# Sampling frequency for audio. When using low bitrates, you should
# lower this frequency to 22050 or 11025. The supported frequencies
# depend on the selected audio codec.
AudioSampleRate 44100
# Bitrate for the video stream
VideoBitRate 64
# Ratecontrol buffer size
VideoBufferSize 40
# Number of frames per second
VideoFrameRate 3
# Size of the video frame: WxH (default: 160x128)
# The following abbreviations are defined: sqcif, qcif, cif, 4cif, qqvga,
# qvga, vga, svga, xga, uxga, qxga, sxga, qsxga, hsxga, wvga, wxga, wsxga,
# wuxga, woxga, wqsxga, wquxga, whsxga, whuxga, cga, ega, hd480, hd720,
# hd1080
VideoSize hd1080
# Transmit only intra frames (useful for low bitrates, but kills frame rate).
#VideoIntraOnly
# If non-intra only, an intra frame is transmitted every VideoGopSize
# frames. Video synchronization can only begin at an intra frame.
VideoGopSize 12
# More MPEG-4 parameters
# VideoHighQuality
# Video4MotionVector
# Choose your codecs:
#AudioCodec mp2
#VideoCodec mpeg1video
# Suppress audio
#NoAudio
# Suppress video
#NoVideo
#VideoQMin 3
#VideoQMax 31
# Set this to the number of seconds backwards in time to start. Note that
# most players will buffer 5-10 seconds of video, and also you need to allow
# for a keyframe to appear in the data stream.
#Preroll 15
# ACL:
# You can allow ranges of addresses (or single addresses)
ACL ALLOW localhost
# You can deny ranges of addresses (or single addresses)
#ACL DENY <first address>
# You can repeat the ACL allow/deny as often as you like. It is on a per
# stream basis. The first match defines the action. If there are no matches,
# then the default is the inverse of the last ACL statement.
#
# Thus 'ACL allow localhost' only allows access from localhost.
# 'ACL deny 1.0.0.0 1.255.255.255' would deny the whole of network 1 and
# allow everybody else.
</Stream>
##################################################################
# Example streams
# Multipart JPEG
#<Stream test.mjpg>
#Feed feed1.ffm
#Format mpjpeg
#VideoFrameRate 2
#VideoIntraOnly
#NoAudio
#Strict -1
#</Stream>
# Single JPEG
#<Stream test.jpg>
#Feed feed1.ffm
#Format jpeg
#VideoFrameRate 2
#VideoIntraOnly
##VideoSize 352x240
#NoAudio
#Strict -1
#</Stream>
# Flash
#<Stream test.swf>
#Feed feed1.ffm
#Format swf
#VideoFrameRate 2
#VideoIntraOnly
#NoAudio
#</Stream>
# ASF compatible
<Stream test.asf>
Feed feed1.ffm
Format asf
VideoFrameRate 15
VideoSize 352x240
VideoBitRate 256
VideoBufferSize 40
VideoGopSize 30
AudioBitRate 64
StartSendOnKey
</Stream>
# MP3 audio
#<Stream test.mp3>
#Feed feed1.ffm
#Format mp2
#AudioCodec mp3
#AudioBitRate 64
#AudioChannels 1
#AudioSampleRate 44100
#NoVideo
#</Stream>
# Ogg Vorbis audio
#<Stream test.ogg>
#Feed feed1.ffm
#Title "Stream title"
#AudioBitRate 64
#AudioChannels 2
#AudioSampleRate 44100
#NoVideo
#</Stream>
# Real with audio only at 32 kbits
#<Stream test.ra>
#Feed feed1.ffm
#Format rm
#AudioBitRate 32
#NoVideo
#NoAudio
#</Stream>
# Real with audio and video at 64 kbits
#<Stream test.rm>
#Feed feed1.ffm
#Format rm
#AudioBitRate 32
#VideoBitRate 128
#VideoFrameRate 25
#VideoGopSize 25
#NoAudio
#</Stream>
##################################################################
# A stream coming from a file: you only need to set the input
# filename and optionally a new format. Supported conversions:
# AVI -> ASF
#<Stream file.rm>
#File "/usr/local/httpd/htdocs/tlive.rm"
#NoAudio
#</Stream>
#<Stream file.asf>
#File "/usr/local/httpd/htdocs/test.asf"
#NoAudio
#Author "Me"
#Copyright "Super MegaCorp"
#Title "Test stream from disk"
#Comment "Test comment"
#</Stream>
##################################################################
# RTSP examples
#
# You can access this stream with the RTSP URL:
# rtsp://localhost:5454/test1-rtsp.mpg
#
# A non-standard RTSP redirector is also created. Its URL is:
# http://localhost:8090/test1-rtsp.rtsp
#<Stream test1-rtsp.mpg>
#Format rtp
#File "/usr/local/httpd/htdocs/test1.mpg"
#</Stream>
# Transcode an incoming live feed to another live feed,
# using libx264 and video presets
#<Stream live.h264>
#Format rtp
#Feed feed1.ffm
#VideoCodec libx264
#VideoFrameRate 24
#VideoBitRate 100
#VideoSize 480x272
#AVPresetVideo default
#AVPresetVideo baseline
#AVOptionVideo flags +global_header
#
#AudioCodec libfaac
#AudioBitRate 32
#AudioChannels 2
#AudioSampleRate 22050
#AVOptionAudio flags +global_header
#</Stream>
##################################################################
# SDP/multicast examples
#
# If you want to send your stream in multicast, you must set the
# multicast address with MulticastAddress. The port and the TTL can
# also be set.
#
# An SDP file is automatically generated by ffserver by adding the
# 'sdp' extension to the stream name (here
# http://localhost:8090/test1-sdp.sdp). You should usually give this
# file to your player to play the stream.
#
# The 'NoLoop' option can be used to avoid looping when the stream is
# terminated.
#<Stream test1-sdp.mpg>
#Format rtp
#File "/usr/local/httpd/htdocs/test1.mpg"
#MulticastAddress 224.124.0.1
#MulticastPort 5000
#MulticastTTL 16
#NoLoop
#</Stream>
##################################################################
# Special streams
# Server status
<Stream stat.html>
Format status
# Only allow local people to get the status
ACL allow localhost
ACL allow 192.168.0.0 192.168.255.255
#FaviconURL http://pond1.gladstonefamily.net:8080/favicon.ico
</Stream>
# Redirect index.html to the appropriate site
<Redirect index.html>
URL http://www.ffmpeg.org/
</Redirect>
#http://www.ffmpeg.org/
最佳答案
您的配置文件中没有名为 test.flv 的提要,只有一个名为 feed1.ffm 的提要。
试试这个命令:
ffmpeg -re -i input.mkv -c:v libx264 -maxrate 1000k -bufsize 2000k -an -bsf:v h264_mp4toannexb -g 50 http://localhost:8090/feed1.ffm
关于ffmpeg - 使用 ffmpeg 进行 HTTP 直播,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39056632/
我致力于收集互联网广播流文件,例如 m3u,其中包含一个流式链接 (例如 http://aska.ru-hoster.com:8053/autodj )。 我没有找到关于如何检查链接是否可用/有效的示
为了学校,我需要建立一个 HTML5 直播网站。他们有一个他们一直在使用的 Flash 流播放器,但现在他们希望它改用 HTML5。我怎样才能做到这一点?我尝试使用视频标签,但无法正常工作。下面是我的
我正在尝试使用 FFmpeg 将视频循环流式传输到 justin.tv?我已经设法循环图像序列并将其与音频中的线条组合起来: ffmpeg -loop 1 -i imageSequence%04d.j
使用 WebAudio API 播放直播流的正确方法是什么。 我正在尝试使用以下代码,但是我看到的只是正在下载 MP3,但没有播放;可能 MediaElementSource 需要一个文件,而不是连续
关闭。这个问题需要更多focused .它目前不接受答案。 想改进这个问题吗? 更新问题,使其只关注一个问题 editing this post . 关闭 6 年前。 Improve this qu
我正在开发一个播放实时 HTTP 网络广播流(.pls、.mp3 ...)的应用程序。我可以使用 MPMusicPlayerController 播放流吗?塔克斯。 最佳答案 我认为您不能使用 MPM
好的,我一直在努力解决这个 http 直播。我只是不明白,是的,我已经阅读了所有苹果文档并观看了 wwdc 视频,但仍然非常困惑,所以请帮助想成为程序员的人!!! 你写的代码跑到服务器上了?不在 xc
我正在尝试构建一个移动应用程序,该应用程序从设备的摄像头流式传输视频并将其实时发送到服务器。此外,移动设备应该能够播放从服务器接收到的实况视频。 我正在 Flutter 中构建应用程序,但似乎无法在
我正在使用 ffmpeg sdk 在 youtube live 上流式传输实时视频 av_interleaved_write_frame(m_pAvFmtCntx, pkt); av_interlea
我在 android 上使用 ffmpeg 3.4 版本的源代码。我尝试使用它来复用音频/视频元素流作为 m3u8 输出并使用以下选项: int num = av_opt_set_from_s
我正在尝试使用静态图像和音频文件通过 ffmpeg 进行直播。像这样的ffmpeg命令 ffmpeg -re -loop 1 -f image2 -i '/tmp/11.jpg' -f lavfi -
关闭。这个问题不满足Stack Overflow guidelines .它目前不接受答案。 想改善这个问题吗?更新问题,使其成为 on-topic对于堆栈溢出。 7年前关闭。 Improve thi
我希望能够将 iPhone 摄像头的帧/视频(实时)流式传输到互联网。我在线程(streaming video FROM an iPhone)中看到可以使用AVCaptureSession的begin
我想创建一个网站,每个用户都可以创建/开始直播。 但正如我现在所看到的,我只能为我自己的帐户创建一个流。启用了 Youtube 数据 API 的那个。 key 是用代码编写的。所以我无权从某人的帐户创
我正在构建一个监控系统,它可以在白天将视频流式传输到 YouTube,但在夜间会关闭。 YouTube 直播在停止接收数据时会自动关闭流。 我可以使用 API 开始另一个流,但我想为公众保留相同的 Y
我在 YouTube 上有现场事件,我想在我的网站上播放它。我想将我的事件设为私有(private),获取它的 RTMP 广播 URL 并将其粘贴到我的网站上,在 JWPlayer 中。 那可能吗?
1- 哪一个更适合用于流媒体视频? TCP 或 UDP 套接字以及为什么? 2-直播时,音频和视频分别来自服务器,那么如何确保我显示的视频和设备上播放的音频同步? 最佳答案 我不久前编写了一个语音聊天
一直在使用 ffmpeg 通过 HLS 进行直播并通过 video.js 进行播放。它可以工作,但流开始的时间和实际开始播放的时间之间有 20 秒的延迟。 你知道为什么下面的 ffmpeg 命令不会像
除了无法解释的 Sample TV Input 应用 (https://github.com/googlesamples/androidtv-sample-inputs/),没有很多关于如何在 Liv
我真的厌倦了这个问题。如果有人在这方面帮助我,我将不胜感激。 我的一个应用被拒绝,原因是 Video streaming content over a cellular network longer
我是一名优秀的程序员,十分优秀!