Forum

Save multiple rtmp live streams to mp4 with ffmpeg with task control

Joël 2015-04-21 12:29:39 UTC in Nimble Streamer

A very nice option is to save a live stream with ffmpeg in "server side task control". The main purpose of direct recording on the origin Nimble-server is: Remux and Uploading of the video files are not needed anymore. second: when you have a live event, you have a local copy of your live event and a second on the server.
What I discover by recording a livestream with multible bitrate streams by starting 3 seperate ffmpeg task in the Wmspanel, it takes about 10sec before the "playback" will start in the webplayer(jwplayer). playing the files on a ipad
providing a smil playlist by nimble.
Can you give me a direction of what is the best way the record a stream with ffmpeg, without remuxing the files again.

current tasks in the wmspanel
ffmpeg -re -i rtmp://localhost/rtmp/video_1 -c copy "/mnt/archive/vod/video_360p-1.mp4"

ffmpeg -re -i rtmp://localhost/rtmp/video_2 -c copy "/mnt/archive/vod/video_480p-2.mp4"

ffmpeg -re -i rtmp://localhost/rtmp/video_3 -c copy "/mnt/archive/vod/video_1080p-3.mp4"

Alex Pokotilo 2015-04-21 14:16:32 UTC 

I cannot get what you see in ipad comparing to web players

Joël 2015-04-21 17:51:15 UTC 

Hi
I use the same jwplayer for both, desktop and mobile devices as webplayer.
But i think maybe its the timestamps or the duration time that is not the same of each mp4 file, because of the seperate ffmpeg tasks. Maybe option -copyts will copy the original timestamps of the live encoder (fmle).
Or can I record the 3 streams in one task?

Alex Pokotilo 2015-04-21 22:06:18 UTC 

save only one bitrate and call transcoding after event. you can create script that call several ffmpeg commands. One to save original mp4 file and the rest for transcoding. I think calling several commands to transcode on the fly bad idea.

Joël 2015-04-22 07:14:17 UTC 

Yes, Transcoding several resolutions on the fly, is a bad idea. Too CPU intensive. Transcode one by one after event is beter. But actually, you don't want to transcode at all, because its already done. yes we can make script who can call more than one ffmpeg command. So the frames will start almost on the same time.
Again, I will do some several tests with copy the original timestamps during recording of the livestreams, or cutting the beginning and the end of the files afterwards, so the start and duration wil be the same.

Post a reply


Post a new question

Categories:

Tags:

nimbleNimble StreamerFAQHLSDVRRTMPhlsnimble streamerABRcachewmsauthNimbleAPIdvrapiSRTtranscoderffmpegrtmpVODfailoversrtsldpstreamingDASHwmspanelvodrtspudppaywallsubtitlesDispersaRTSPSLDPvideoyoutubeabrlivelivestreamingmp4WMSAuthMPEG-DASHpay-per-viewgeobandwidthdashstreameredgeWMSPanelWindowsencryptionUDPhttpswhite labelconfigsmilmulticastsslFFMPEGMPEG-TSaudioCORSchunksraspberry pire-streamingmpeg-dashandroidperformanceadvertizercorsvlccloudfrontDRMS3user agentrules.confplaylistadvertisingipv6MPEGTSFastSpringRAMthumbnailFMLEVATcrossdomainipupdatempegtsSMILRecordingaespushakamaiwowzaserversPullmobilecodecerrorSSLbalanceTranscodem3u8chromecastplaylist_dvrWowzaIDreportingconfigurationbugdownloadnimblestreamerdomainLarixrepublishingLarix BroadcasterRepublishingmpeg-tsraspianVidillionHttpsloopchunkawsAWSNDIoriginCDNrouteswms panelpublish controlamazonIPnimble webcam html5UIbitrateRegistration Issuedirect link32-bit Windowstwitchcache_controlitworkmelive abr support mpeg-dashwmspanelapiresumertmp abrbeirutWWDCdubaideep statsCentOS v6.4hls to multicast udpnooblogWowza AgentRemote StorageIIS Smooth StreamingcloudmediaAbrHTTPSHot-linking protectionHDSvaddioalertsjwplayer websitebaselinewhmcsAuthentication in HLSnginx rtmp nimblePi4AV BridgepriceVaddiolimitOld logsPI3 Ubuntuscte-35screencastview timeattaching domainsinterfacescontainerDVRRecordingloadbalancingmod_rewritemetadataprofileID3 tagsgbpsAxisdatmessageWMSCONFIG_HOMErestreamcostwmsauthsignhighhds streamlocalcisco.net hotlinkhls restreamingVLCgentoo install server nimbleniblerPublic Iptranscoding using NvidiaPaywall AuthofflinedocumentationNimble streamer upgradedecodertransocding republishingVideo PlayerTrancoderconcurrent-connectionsfileAliaslost trafficServer-sidestoppedNimble Streamer versionmainicecast urlrulehot linkinglebanonlocationmanifestchangeMP4 not playedspacepay per viewLarix Groveamfseekingdvr_archivesmpeg dashobsTCORaspian BusteropensslonSteam stopped workingnginxPlayReadyamazon web servicelimuxdvr stream twiceHLS vodsdphot-linkAXVVGanalyticspaywalapplicationExpression Encoderblocknvenc7brandingHLS PlayertrialDASH PlayerMP4microsoft streamdebianerrorsrocksoftlog traffic statslive video on demandbandwithserverscreen freezecan't registerprogressive downloadABR DASHFFmpegmultiple originsnimblesessionidprivate networkLarge DVR filesheaderno WMSPanelsourcelive videointerleavingSnapshotslog nimble analysertmp playbackmac osx installvideojswotermarkvideo stopvimeohelp erroradaptiveAV1 codecNGINX-RTMPJWPLAYERload balancestreamscache expiryattachmentcdnvsomlive streamvod no soundconcurrent connection4Kcrossdomain more then 1 domainViewer Statsdvr streamconnectivityUbuntu 20 ARM - AWSunique visitorcpumpeg2tsDelayServer-Side-Task-ControlWidevinedisk migrationAWS 3buttscreen capturestereo to mononot foundCPU Loaddrmpullresourceaes encryptionAS3subscriptionTranscoderLive streamingsecurityABR HLS Bitrateslive pull settingsWMSPanel settingstwitch larix broadcaster androidDVRSettingsinstall players setup ready to goDelete recordsApplertmp for YouTubeudp streamingoutratevideo loopicecaststarttime duration seekpointrebootnimble streamer vod hls transmuxingloggingmonitorlearnernimble.confrtmp republishing transcodeIIS Media Servicsinsert logoapi accessDeep statsloadbalancerweb playerdvr streamsautomationnimble streamer web server php script pageNimble Streamer APIlivestreamAVCaptureMovieFileOutputblock downloadcontent-dispositionNimble CapacityABR DVR problemPost processingadd_chunk failedfake extensionMPEG DASHUbuntu artful 17.10Transcoder MPEG DASHLive SwitcherNimble Servernot to stealLive Broadcaststatus:errorFFMPEG;RTMP;I/O errortranscodingHotlinking ProtectionStreaming routeRTMP republishPIDMPEG-Dashlarix broadcasterbroadcasterOSXpaymentstatsreloadpremium featureserver incorrect timeThumbnailsLiveLIVEadvp9contentRTMP RepublishdemandHow to do live stream with multiple audio trackProgressivenimble aliasesHLS Streamingthumbnail dvr-thumbnailLoad-Balancingnimble streamer mpeg-ts multiple inputswmsAuthSignsoundHLS Meta Tag editing.rmtpno internetdelaympeg4transcoder nimbleSecureJetson Nanodvr on wmspanelVideo cant be playedS3 AWSuser_agentautomateAndroidreportsavoid refreshraspberryBroadcastdockerlivestream bitratepublish streamStream Delaytraffichd25AArch64transcodevbv-maxrateVR-360Failoverdomain lockVOD HLS streaming on public IPoutputUsers limitcloudflareanalisysscteABR bitratesPacketizingbuildincoming streamno soundInvalid frame headerHTML5 playerGopwirecasta recordhttp server.movalias routestorageNimbleStreamerav1 codecspeedup my videoiOSfastspringmp2 audioNimble streamerdata slicesaliasplayer sldpdistributionlatencyqataritworkscdnvideo.jssoftware versionadjustPaywallvideo and audio not matchissuepricinggoogle cloud storagediskstorage space available3.6.1-1dissapointmentpay-per-minutecompatibility protocolsRAM Loadtransocderlivestreaminhow-tomanage_dvrError when installingrulesDVRStreamsaws amazonSO_RCVBUFbuffering videoUDP MulticastMax connectionMPEG2 Videologo in streamnimble on cloudprerollIOSrestarthelpFallbackdynamic linksTLSV 1.2 CertificateSSL requestserver ip21credentialsFairplayincomingmulti-viewerVP9sha265durationBandwidthnimble dvrrtpscte35ubuntu 18Teradek Decodervideo audioCross DomainSRT protocolabr fallbackNimble connectionsmd5DVR Setting limitssaibufferRIST BondingplayoutControl APIfallbackPORTDVR SettinganalyseStreamIDhotlink protectionultra low latencyRaspberryPi4gpuRaspberrytasks-controlbroadcast videoprogressivewebhookdvr to liveRTMP to SRTvideo streamingQuickTimeartifactsrtsp push androidtuningactionscript 3server ssl errorCSSRist

This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the Privacy Policy. If you want to know more or withdraw your consent to all or some of the cookies, please refer to the Privacy Policy.
By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to the use of cookies.