This is, in particular, how input.rtmp is defined.įor outputting, one can use the regular outputs but some of them have special features when used with %ffmpeg: It should be able to decode pretty much any url and file that the ffmpeg command-line can take as input. The main input to take advantage of FFmpeg is input.ffmpeg. # AC3 audio and H264 video encapsulated in a MPEG-TS bitstream %ffmpeg(format="mpegts", %audio( codec= "ac3", channel_coupling= 0), %video( codec= "libx264", b= "2600k", "x264-params"= "scenecut=0:open_gop=0:min-keyint=150:keyint=150", preset= "ultrafast")) # AAC audio and H264 video encapsulated in a mp4 file (to use with # `output.file` only, mp4 container cannot be streamed! %ffmpeg(format="mp4", %audio( codec= "aac"), %video( codec= "libx264", b= "2600k")) # Ogg opus and theora encappsulated in an ogg bitstream %ffmpeg(format="ogg", %audio( codec= "libopus"), %video( codec= "libtheora")) # Ogg opus and VP8 video encapsulated in a webm bitstream %ffmpeg(format="webm", %audio( codec= "libopus"), %video( codec= "libvpx")) Streaming with FFmpeg The syntax for the encoder is detailed in the encoders page. On top of that, it also supports all the FFmpeg filters and passing encoded data, if your script does not need re-encoding. Not only does it support a wide range of audio and video formats but it can also send and receive data to many different places, using input.ffmpeg. The %ffmpeg encoder is the recommended encoder when working with video. So, be prepared to hear the fan of your computer! The size of videos have a great impact on computations if your machine cannot handle a stream (i.e. it’s always catching up) you can try to encode to smaller videos for a start. You should be expecting much higher resource needs (in cpu time in particular) for video than for audio. These can handle streams with video only, you can use the drop_audio operator to remove the sound part of a stream if needed. In order to test a video stream, it is often convenient to use the output.sdl operator (or aphics) which will open a window and display the video stream inside. Source = single( "video.mp4") output.icecast( %ffmpeg( format= "ogg", %audio( codec= "libvorbis"), %video( codec= "libtheora") ), host= "localhost", port= 8000, password= "hackme", mount= "/videostream", source)Īnd of course you could have used a playlist instead of single to have multiple files, or used other formats for the stream.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |