Serviio ffmpeg fails with valid rtmp streams.
Using the links directly with ffmpeg or ffplay command always works correctly as also documented below.
Note the streams expire and so are declared as expiresimmediately and I have tested as "live=true" and "live=false"
Opened bit bucket ticket 717 https://bitbucket.org/xnejp03/serviio/i ... ranscoding
As live=true:
- Code:
2013-10-04 18:10:23,408 DEBUG [AbstractTranscodingDeliveryEngine] No suitable transcoding job exists yet, start one for client 'Identifier=127.0.0.1, Profile=Flash player'
2013-10-04 18:10:23,408 DEBUG [VideoDeliveryEngine] Extracting new URL for the expired feed item
2013-10-04 18:10:23,408 DEBUG [FeedItemUrlExtractor] Castalba: Starting extraction of url for item: BBC News
2013-10-04 18:10:24,184 DEBUG [FeedItemUrlExtractor] Castalba: call castalba
2013-10-04 18:10:24,187 DEBUG [FeedItemUrlExtractor] Castalba: Extracted Url for http://www.castalba.tv/channel/9417 - 178734?313338303932353039325f3036636161333366646434303938373331643436623037643664386631306266
2013-10-04 18:10:24,188 DEBUG [FeedItemUrlExtractor] Castalba: Finished extraction of url: ContentURLContainer [fileType=VIDEO, contentUrl=rtmp://173.192.70.168/live app=live tcUrl=rtmp://173.192.70.168/live playpath=178734?313338303932353039325f3036636161333366646434303938373331643436623037643664386631306266 pageUrl=http://castalba.tv/channel/9417 swfUrl=http://static.castalba.tv/player5.9.swf live=1, thumbnailUrl=http://castalba.tv/images/zaps/178734.jpg, expiresOn=Fri Oct 04 19:15:00 EDT 2013, expiresImmediately=true, cacheKey=http://www.castalba.tv/channel/9417, live=true, ]
2013-10-04 18:10:24,188 DEBUG [VideoDeliveryEngine] Successfully set new URL for the feed item
2013-10-04 18:10:24,188 DEBUG [FFMPEGWrapper] Invoking FFmpeg to transcode video file: rtmp://173.192.70.168/live app=live tcUrl=rtmp://173.192.70.168/live playpath=178734?313338303932353039325f3036636161333366646434303938373331643436623037643664386631306266 pageUrl=http://castalba.tv/channel/9417 swfUrl=http://static.castalba.tv/player5.9.swf live=1
2013-10-04 18:10:24,189 DEBUG [ProcessExecutor] Starting C:\Program Files\Serviio\bin\\..\lib/ffmpeg.exe -analyzeduration 10000000 -fflags +genpts -threads 8 -i rtmp://173.192.70.168/live app=live tcUrl=rtmp://173.192.70.168/live playpath=178734?313338303932353039325f3036636161333366646434303938373331643436623037643664386631306266 pageUrl=http://castalba.tv/channel/9417 swfUrl=http://static.castalba.tv/player5.9.swf live=1 -y -threads 8 -c:v copy -c:a libmp3lame -b:a 48k -ar 44100 -ac 2 -map 0:0 -map 0:1 -sn -f flv pipe:
2013-10-04 18:10:29,629 DEBUG [TimeoutStreamDelegator] Closing piped input stream and closing related feeder process
2013-10-04 18:10:34,260 DEBUG [SearchManager] Committing search index
2013-10-04 18:10:37,306 WARN [ProcessExecutor] Process cmd has a return code of 1! This is a possible error. Detailed output follows.
libavfilter 3. 77.101 / 3. 77.101
libswscale 2. 3.100 / 2. 3.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 3.100 / 52. 3.100
rtmp://173.192.70.168/live app=live tcUrl=rtmp://173.192.70.168/live playpath=178734?313338303932353039325f3036636161333366646434303938373331643436623037643664386631306266 pageUrl=http://castalba.tv/channel/9417 swfUrl=http://static.castalba.tv/player5.9.swf live=1: Unknown error occurred
but ffmpeg works fine
- Code:
C:\Users\John>ffmpeg -i "rtmp://173.192.70.168/live app=live tcUrl=rtmp://173.19
2.70.168/live playpath=178734?313338303932353039325f3036636161333366646434303938
373331643436623037643664386631306266 pageUrl=http://castalba.tv/channel/9417 swf
Url=http://static.castalba.tv/player5.9.swf live=1"
ffmpeg version N-55020-g768e40b Copyright (c) 2000-2013 the FFmpeg developers
built on Jul 28 2013 18:01:30 with gcc 4.7.3 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetyp
e --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --ena
ble-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-l
ibopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libsp
eex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-
amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --
enable-libxvid --enable-zlib
libavutil 52. 40.100 / 52. 40.100
libavcodec 55. 19.100 / 55. 19.100
libavformat 55. 12.102 / 55. 12.102
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 81.103 / 3. 81.103
libswscale 2. 4.100 / 2. 4.100
libswresample 0. 17.103 / 0. 17.103
libpostproc 52. 3.100 / 52. 3.100
Metadata:
width 512.00
height 288.00
videodatarate 448.00
videocodecid 7.00
audiodatarate 48.00
audiosamplerate 44100.00
Input #0, flv, from 'rtmp://173.192.70.168/live app=live tcUrl=rtmp://173.192.70
.168/live playpath=178734?313338303932353039325f30366361613333666464343039383733
31643436623037643664386631306266 pageUrl=http://castalba.tv/channel/9417 swfUrl=
http://static.castalba.tv/player5.9.swf live=1':
Duration: N/A, start: 0.000000, bitrate: 507 kb/s
Stream #0:0: Video: h264 (Baseline), yuv420p, 512x288 [SAR 1:1 DAR 16:9], 45
8 kb/s, 25 tbr, 1k tbn, 50 tbc
Stream #0:1: Audio: aac, 44100 Hz, stereo, fltp, 49 kb/s
At least one output file must be specified
As live=false
- Code:
2013-10-04 17:55:35,910 DEBUG [VideoDeliveryEngine] Extracting new URL for the expired feed item
2013-10-04 17:55:35,910 DEBUG [FeedItemUrlExtractor] Castalba: Starting extraction of url for item: BBC News
2013-10-04 17:55:36,559 DEBUG [FeedItemUrlExtractor] Castalba: call castalba
2013-10-04 17:55:36,561 DEBUG [FeedItemUrlExtractor] Castalba: Extracted Url for http://www.castalba.tv/channel/9417 - 178734?313338303932343230345f3334343436646162313830363936653631626361653437303365613739623639
2013-10-04 17:55:36,561 DEBUG [FeedItemUrlExtractor] Castalba: Finished extraction of url: ContentURLContainer [fileType=VIDEO, contentUrl=rtmp://159.253.145.164/live app=live tcUrl=rtmp://159.253.145.164/live playpath=178734?313338303932343230345f3334343436646162313830363936653631626361653437303365613739623639 pageUrl=http://castalba.tv/channel/9417 swfUrl=http://static.castalba.tv/player5.9.swf live=1, thumbnailUrl=http://castalba.tv/images/zaps/178734.jpg, expiresImmediately=true, cacheKey=http://www.castalba.tv/channel/9417, live=false, ]
2013-10-04 17:55:36,561 DEBUG [VideoDeliveryEngine] Successfully set new URL for the feed item
2013-10-04 17:55:36,562 DEBUG [FFMPEGWrapper] Invoking FFmpeg to transcode video file: rtmp://159.253.145.164/live app=live tcUrl=rtmp://159.253.145.164/live playpath=178734?313338303932343230345f3334343436646162313830363936653631626361653437303365613739623639 pageUrl=http://castalba.tv/channel/9417 swfUrl=http://static.castalba.tv/player5.9.swf live=1 buffer=100000000
2013-10-04 17:55:36,562 DEBUG [ProcessExecutor] Starting C:\Program Files\Serviio\bin\\..\lib/ffmpeg.exe -analyzeduration 10000000 -fflags +genpts -threads 8 -i rtmp://159.253.145.164/live app=live tcUrl=rtmp://159.253.145.164/live playpath=178734?313338303932343230345f3334343436646162313830363936653631626361653437303365613739623639 pageUrl=http://castalba.tv/channel/9417 swfUrl=http://static.castalba.tv/player5.9.swf live=1 buffer=100000000 -y -threads 8 -c:v copy -c:a libmp3lame -b:a 48k -ar 44100 -ac 2 -map 0:0 -map 0:1 -sn -f flv C:\Windows\Temp\Serviio\transcoding-temp-1000002090003169-flv_player-ORIGINAL.stf
2013-10-04 17:55:36,990 DEBUG [CDSRetrieveMediaServerResource] GET http://localhost:23424/cds/resource/1000002090003169/MEDIA_ITEM/FLV-0/ORIGINAL?profile=flv_player&authToken=d7df83f1e9e84d2b981e74d43860dcf2 HTTP/1.1, headers = [host: localhost:23424,connection: keep-alive,user-agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.66 Safari/537.36,accept: */*,referer: http://localhost:23424/mediabrowser/,accept-encoding: gzip,deflate,sdch,accept-language: en-US,en;q=0.8]
2013-10-04 17:55:36,991 DEBUG [CDSRetrieveMediaServerResource] Creating client with id '127.0.0.1'
2013-10-04 17:55:36,991 DEBUG [ResourceDeliveryProcessor] Resource request accepted. Using client 'Identifier=127.0.0.1, Profile=Flash player'
2013-10-04 17:55:36,991 DEBUG [ResourceDeliveryProcessor] Request for resource 1000002090003169 and type 'MEDIA_ITEM' received
2013-10-04 17:55:36,991 DEBUG [MediaResourceRetrievalStrategy] Getting information about media item 1000002090003169 (online)
2013-10-04 17:55:36,991 DEBUG [OnlineRepositoryDAOImpl] Reading an OnlineRepository (id = 209)
2013-10-04 17:55:36,992 DEBUG [OnlineRepositoryDAOImpl] Reading an OnlineRepository (id = 209)
2013-10-04 17:55:36,993 DEBUG [VideoDeliveryEngine] Retrieving resource information for item 1000002090003169, format FLV and profile Flash player
2013-10-04 17:55:36,993 DEBUG [AbstractTranscodingDeliveryEngine] Getting media info for transcoded version of file rtmp://159.253.143.62/live app=live tcUrl=rtmp://159.253.143.62/live playpath=178734?313338303932323639355f6532336632343632383038393132356461346236353138656438633964646432 pageUrl=http://castalba.tv/channel/9417 swfUrl=http://static.castalba.tv/player5.9.swf live=1
2013-10-04 17:55:36,994 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file rtmp://159.253.143.62/live app=live tcUrl=rtmp://159.253.143.62/live playpath=178734?313338303932323639355f6532336632343632383038393132356461346236353138656438633964646432 pageUrl=http://castalba.tv/channel/9417 swfUrl=http://static.castalba.tv/player5.9.swf live=1: FLV
2013-10-04 17:55:36,994 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file rtmp://159.253.143.62/live app=live tcUrl=rtmp://159.253.143.62/live playpath=178734?313338303932323639355f6532336632343632383038393132356461346236353138656438633964646432 pageUrl=http://castalba.tv/channel/9417 swfUrl=http://static.castalba.tv/player5.9.swf live=1: FLV
2013-10-04 17:55:36,994 DEBUG [VideoDeliveryEngine] Found Format profile for transcoded file rtmp://159.253.143.62/live app=live tcUrl=rtmp://159.253.143.62/live playpath=178734?313338303932323639355f6532336632343632383038393132356461346236353138656438633964646432 pageUrl=http://castalba.tv/channel/9417 swfUrl=http://static.castalba.tv/player5.9.swf live=1: FLV
2013-10-04 17:55:36,994 DEBUG [MediaResourceRetrievalStrategy] Getting information about media item 1000002090003169 (online)
2013-10-04 17:55:36,994 DEBUG [OnlineRepositoryDAOImpl] Reading an OnlineRepository (id = 209)
2013-10-04 17:55:36,995 DEBUG [OnlineRepositoryDAOImpl] Reading an OnlineRepository (id = 209)
2013-10-04 17:55:36,996 DEBUG [VideoDeliveryEngine] Delivering item '1000002090003169' for client 'Identifier=127.0.0.1, Profile=Flash player'
2013-10-04 17:55:36,996 DEBUG [VideoDeliveryEngine] Delivering file 'rtmp://159.253.143.62/live app=live tcUrl=rtmp://159.253.143.62/live playpath=178734?313338303932323639355f6532336632343632383038393132356461346236353138656438633964646432 pageUrl=http://castalba.tv/channel/9417 swfUrl=http://static.castalba.tv/player5.9.swf live=1' using transcoding
2013-10-04 17:55:50,284 WARN [ProcessExecutor] Process cmd has a return code of 1! This is a possible error. Detailed output follows.
libavfilter 3. 77.101 / 3. 77.101
libswscale 2. 3.100 / 2. 3.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 3.100 / 52. 3.100
rtmp://159.253.145.164/live app=live tcUrl=rtmp://159.253.145.164/live playpath=178734?313338303932343230345f3334343436646162313830363936653631626361653437303365613739623639 pageUrl=http://castalba.tv/channel/9417 swfUrl=http://static.castalba.tv/player5.9.swf live=1 buffer=100000000: Unknown error occurred
again ffmpeg works fine
- Code:
C:\Users\John>ffmpeg -i "rtmp://159.253.145.164/live app=live tcUrl=rtmp://159.2
53.145.164/live playpath=178734?313338303932343230345f33343434366461623138303639
36653631626361653437303365613739623639 pageUrl=http://castalba.tv/channel/9417 s
wfUrl=http://static.castalba.tv/player5.9.swf live=1 buffer=100000000: Unknown e
rror occurred
ffmpeg version N-55020-g768e40b Copyright (c) 2000-2013 the FFmpeg developers
built on Jul 28 2013 18:01:30 with gcc 4.7.3 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetyp
e --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --ena
ble-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-l
ibopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libsp
eex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-
amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --
enable-libxvid --enable-zlib
libavutil 52. 40.100 / 52. 40.100
libavcodec 55. 19.100 / 55. 19.100
libavformat 55. 12.102 / 55. 12.102
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 81.103 / 3. 81.103
libswscale 2. 4.100 / 2. 4.100
libswresample 0. 17.103 / 0. 17.103
libpostproc 52. 3.100 / 52. 3.100
Metadata:
width 512.00
height 288.00
videodatarate 448.00
videocodecid 7.00
audiodatarate 48.00
audiosamplerate 44100.00
Input #0, flv, from 'rtmp://159.253.145.164/live app=live tcUrl=rtmp://159.253.1
45.164/live playpath=178734?313338303932343230345f333434343664616231383036393665
3631626361653437303365613739623639 pageUrl=http://castalba.tv/channel/9417 swfUr
l=http://static.castalba.tv/player5.9.swf live=1 buffer=100000000: Unknown error
occurred':
Duration: N/A, start: 0.000000, bitrate: 507 kb/s
Stream #0:0: Video: h264 (Baseline), yuv420p, 512x288 [SAR 1:1 DAR 16:9], 45
8 kb/s, 25 tbr, 1k tbn, 50 tbc
Stream #0:1: Audio: aac, 44100 Hz, stereo, fltp, 49 kb/s
At least one output file must be specified
C:\Users\John>ffmpeg -i "rtmp://159.253.145.164/live app=live tcUrl=rtmp://159.2
53.145.164/live playpath=178734?313338303932343230345f33343434366461623138303639
36653631626361653437303365613739623639 pageUrl=http://castalba.tv/channel/9417 s
wfUrl=http://static.castalba.tv/player5.9.swf live=1 buffer=100000000"
ffmpeg version N-55020-g768e40b Copyright (c) 2000-2013 the FFmpeg developers
built on Jul 28 2013 18:01:30 with gcc 4.7.3 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetyp
e --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --ena
ble-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-l
ibopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libsp
eex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-
amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --
enable-libxvid --enable-zlib
libavutil 52. 40.100 / 52. 40.100
libavcodec 55. 19.100 / 55. 19.100
libavformat 55. 12.102 / 55. 12.102
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 81.103 / 3. 81.103
libswscale 2. 4.100 / 2. 4.100
libswresample 0. 17.103 / 0. 17.103
libpostproc 52. 3.100 / 52. 3.100
Metadata:
width 512.00
height 288.00
videodatarate 448.00
videocodecid 7.00
audiodatarate 48.00
audiosamplerate 44100.00
Input #0, flv, from 'rtmp://159.253.145.164/live app=live tcUrl=rtmp://159.253.1
45.164/live playpath=178734?313338303932343230345f333434343664616231383036393665
3631626361653437303365613739623639 pageUrl=http://castalba.tv/channel/9417 swfUr
l=http://static.castalba.tv/player5.9.swf live=1 buffer=100000000':
Duration: N/A, start: 0.000000, bitrate: 507 kb/s
Stream #0:0: Video: h264 (Baseline), yuv420p, 512x288 [SAR 1:1 DAR 16:9], 45
8 kb/s, 25 tbr, 1k tbn, 50 tbc
Stream #0:1: Audio: aac, 44100 Hz, stereo, fltp, 49 kb/s
At least one output file must be specified
and here is the failure transcoding to mpegts
- Code:
2013-10-04 18:44:16,760 DEBUG [FFMPEGWrapper] Invoking FFmpeg to transcode video file: rtmp://173.192.70.165/live app=live tcUrl=rtmp://173.192.70.165/live playpath=178734?313338303932373132355f3062643936373862313139313330386361633938663264356466393563666338 pageUrl=http://castalba.tv/channel/9417 swfUrl=http://static.castalba.tv/player5.9.swf live=1
2013-10-04 18:44:16,760 DEBUG [ProcessExecutor] Starting C:\Program Files\Serviio\bin\\..\lib/ffmpeg.exe -analyzeduration 10000000 -fflags +genpts -threads 8 -i rtmp://173.192.70.165/live app=live tcUrl=rtmp://173.192.70.165/live playpath=178734?313338303932373132355f3062643936373862313139313330386361633938663264356466393563666338 pageUrl=http://castalba.tv/channel/9417 swfUrl=http://static.castalba.tv/player5.9.swf live=1 -y -threads 8 -c:v copy -bsf:v h264_mp4toannexb -c:a copy -map 0:0 -map 0:1 -sn -f mpegts pipe:
2013-10-04 18:44:30,486 WARN [ProcessExecutor] Process cmd has a return code of 1! This is a possible error. Detailed output follows.
libavfilter 3. 77.101 / 3. 77.101
libswscale 2. 3.100 / 2. 3.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 3.100 / 52. 3.100
rtmp://173.192.70.165/live app=live tcUrl=rtmp://173.192.70.165/live playpath=178734?313338303932373132355f3062643936373862313139313330386361633938663264356466393563666338 pageUrl=http://castalba.tv/channel/9417 swfUrl=http://static.castalba.tv/player5.9.swf live=1: Unknown error occurred