zip wrote:can you enable
detailed log and post the actual ffmpeg command it uses to transcode?
ps aux | grep ffmpeg says
ffmpeg -i
rtmp://199.9.255.180/app/jtv_qGqcYEtxU8X8__9x pageUrl=http://www.twitch.tv/whitera swfUrl=http://www-cdn.jtvnw.net/widgets/live_embed_player.r05fd775dce9336fd78d07346bd7e131bc2aa6342.swf?channel=whitera&referer=&userAgent=&channel=whitera swfVfy=1 jtv=e6213bfc91247b17c843e495ad59f0513534b672:{\22swfDomains\22:\20[\22justin.tv\22,\20\22jtvx.com\22,\20\22xarth.com\22,\20\22twitchtv.com\22,\20\22twitch.tv\22,\20\22newjtv.com\22,\20\22jtvnw.net\22,\20\22wdtinc.com\22,\20\22imapweather.com\22,\20\22facebook.com\22,\20\22starcrafting.com\22],\20\22streamName\22:\20\22jtv_qGqcYEtxU8X8__9x\22,\20\22expiration\22:\201337014645.2511461,\20\22server\22:\20\22ams01-video8-2\22} live=1 -y -threads 4 -async 1 -vcodec mpeg2video -b 20000k -maxrate 20000k -bufsize 20000k -r 24000/1001 -g 15 -copyts -acodec ac3 -ab 192k -ac 2 -map 0:0 -map 0:1 -sn -f mpegts pipe:
Please note: The URL can be invalid at some point.
zip wrote:Make sure you're using C/D Samsung profile.
Yes, this is the case.
zip wrote:I don't see anywhere that it should transcode video to mpeg2.
This seems to be caused by me removing the "<Matches container="flv" vCodec="h264" />" line as per the comment "<!-- looks like some (D?) devices play FLV@H264 natively so this could be removed -->" because I thought removing it was an improvement for my TV, since it is a D series (or if it fails, I'd just change it back).
However, after removal, the following case seems to match and also explains the mpeg2video.
<Video targetContainer="mpegts" targetACodec="ac3" targetVCodec="mpeg2video" maxVBitrate="20000">
<Matches container="matroska" vCodec="mpeg2video" />
<Matches container="matroska" vCodec="vp8" />
<Matches container="avi" vCodec="h264" />
<Matches container="avi" vCodec="mjpeg" />
<Matches container="avi" vCodec="dvvideo" />
<Matches container="flv" />
<Matches container="ogg" />
</Video>
After putting that line back in, the following is executed:
ffmpeg -i
rtmp://199.9.255.241/app/jtv_o5181r1wYJLt5urF pageUrl=http://www.twitch.tv/whitera swfUrl=http://www-cdn.jtvnw.net/widgets/live_embed_player.r05fd775dce9336fd78d07346bd7e131bc2aa6342.swf?channel=whitera&referer=&userAgent=&channel=whitera swfVfy=1 jtv=a6c48125c9a9a8e3a50a8ad9c42ab8fdd2897b95:{\22swfDomains\22:\20[\22justin.tv\22,\20\22jtvx.com\22,\20\22xarth.com\22,\20\22twitchtv.com\22,\20\22twitch.tv\22,\20\22newjtv.com\22,\20\22jtvnw.net\22,\20\22wdtinc.com\22,\20\22imapweather.com\22,\20\22facebook.com\22,\20\22starcrafting.com\22],\20\22streamName\22:\20\22jtv_o5181r1wYJLt5urF\22,\20\22expiration\22:\201337015800.8844621,\20\22server\22:\20\22fra01-video5-2\22} live=1 -y -async 1 -vcodec copy -vbsf h264_mp4toannexb -copyts -acodec ac3 -ab 192k -ac 2 -map 0:0 -map 0:1 -sn -f mpegts pipe:
which seems okay to me and the load dropped drastically.
Bottom line: The mentioned statement cannot be removed on its own because that just makes it worse (contrary to what I think the comment implies).
zip wrote:ac3 audio yes (could probably extend the profile to avoid that but would make it difficult to maintain, and ac3 seems to be better supported than aac on the Samung devices).
I guess this is not a problem as audio encoding doesn't cost as much CPU as video encoding does.
jhb50 wrote:AFAIC Samsung cannot play 5.1 natively but if it is really a 4.1 with a bad header value it may.
zip wrote:I never assumed online content can be level 5.1

I don't know whether it really is. Maybe the header is indeed lying. How would I find out?
jhb50 wrote:[...]the fact that he claims it is transcoded to MPEG2VIDEO indicates that some of the information is incorrect[...]
As per above: This seems to be partially my fault, sorry.
jhb50 wrote:[...], and I have no idea what miniDLNA is doing to the file to allow it to play natively.
MiniDLNA is free and open source and the source code is available on e.g. SourceForge.
Some more info:
- Code:
ffmpeg -i "rtmp://199.9.254.242/app/jtv_na9fJvn3itXVIk5O pageUrl=http://www.twitch.tv/whitera swfUrl=http://www-cdn.jtvnw.net/widgets/live_embed_player.r05fd775dce9336fd78d07346bd7e131bc2aa6342.swf?channel=whitera&referer=&userAgent=&channel=whitera swfVfy=1 jtv=a83dc8849ba5441092780c76416758cc39b1cec1:{\22swfDomains\22:\20[\22justin.tv\22,\20\22jtvx.com\22,\20\22xarth.com\22,\20\22twitchtv.com\22,\20\22twitch.tv\22,\20\22newjtv.com\22,\20\22jtvnw.net\22,\20\22wdtinc.com\22,\20\22imapweather.com\22,\20\22facebook.com\22,\20\22starcrafting.com\22],\20\22streamName\22:\20\22jtv_na9fJvn3itXVIk5O\22,\20\22expiration\22:\201337011009.12748,\20\22server\22:\20\22fra01-video14-2\22} live=1" -y -async 1 -vcodec copy -vbsf h264_mp4toannexb -copyts -acodec ac3 -ab 192k -ac 2 -map 0:0 -map 0:1 -sn -f mpegts whitera_dump.mpegts
ffmpeg version 0.8.1-4:0.8.1-0ubuntu1, Copyright (c) 2000-2011 the Libav developers
built on Mar 22 2012 05:09:06 with gcc 4.6.3
This program is not developed anymore and is only provided for compatibility. Use avconv instead (see Changelog for the list of incompatible changes).
Metadata:
author
copyright
description
keywords
rating
title
presetname Custom
creationdate Mon May 14 17:47:45 2012
videodevice XSplitBroadcaster
framerate 25.00
width 1920.00
height 1080.00
videocodecid avc1
avclevel 51.00
avcprofile 100.00
videodatarate 390.62
videokeyframe_frequency0.00
audiodevice VHAudioCustom
audiosamplerate 44100.00
audiochannels 2.00
audioinputvolume 100.00
audiocodecid mp4a
audiodatarate 125.00
bufferSize 1900k
maxBitrate 1900k
xsplitBroadcasterVersion1.3.0.10
xsplitCoreVersion 1.0.1204.1301 Version 1.0
xsplitGameSourceVersion1.1.0.21
xsplitMediaLibVersion 2.0.0.102
[flv @ 0x211e9a0] max_analyze_duration reached
[flv @ 0x211e9a0] Estimating duration from bitrate, this may be inaccurate
Seems stream 0 codec frame rate differs from container frame rate: 2000.00 (2000/1) -> 1000.00 (2000/2)
Input #0, flv, from 'rtmp://199.9.254.242/app/jtv_na9fJvn3itXVIk5O pageUrl=http://www.twitch.tv/whitera swfUrl=http://www-cdn.jtvnw.net/widgets/live_embed_player.r05fd775dce9336fd78d07346bd7e131bc2aa6342.swf?channel=whitera&referer=&userAgent=&channel=whitera swfVfy=1 jtv=a83dc8849ba5441092780c76416758cc39b1cec1:{\22swfDomains\22:\20[\22justin.tv\22,\20\22jtvx.com\22,\20\22xarth.com\22,\20\22twitchtv.com\22,\20\22twitch.tv\22,\20\22newjtv.com\22,\20\22jtvnw.net\22,\20\22wdtinc.com\22,\20\22imapweather.com\22,\20\22facebook.com\22,\20\22starcrafting.com\22],\20\22streamName\22:\20\22jtv_na9fJvn3itXVIk5O\22,\20\22expiration\22:\201337011009.12748,\20\22server\22:\20\22fra01-video14-2\22} live=1':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0.0: Video: h264 (High), yuv420p, 1920x1080, 1k tbr, 1k tbn, 2k tbc
Stream #0.1: Audio: aac, 44100 Hz, stereo, s16
Incompatible sample format 's16' for codec 'ac3', auto-selecting format 'flt'
[mpegts @ 0x2132860] muxrate VBR, pcr every 100 pkts, sdt every 200, pat/pmt every 40 pkts
Output #0, mpegts, to 'whitera_dump.mpegts':
Metadata:
encoder : Lavf53.21.0
Stream #0.0: Video: libx264, yuv420p, 1920x1080, q=2-31, 90k tbn, 1k tbc
Stream #0.1: Audio: ac3, 44100 Hz, stereo, flt, 192 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Press ctrl-c to stop encoding
^Cframe= 2938 fps= 25 q=-1.0 Lsize= 32651kB time=126.54 bitrate=2113.8kbits/s
video:26911kB audio:2966kB global headers:0kB muxing overhead 9.285373%
Received signal 2: terminating.
- Code:
mediainfo whitera_dump.mpegts
General
ID : 1 (0x1)
Complete name : whitera_dump.mpegts
Format : MPEG-TS
File size : 31.9 MiB
Duration : 2mn 5s
Overall bit rate : 2 116 Kbps
Video
ID : 256 (0x100)
Menu ID : 1 (0x1)
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L5.1
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Codec ID : 27
Duration : 2mn 6s
Bit rate : 1 818 Kbps
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Variable
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Stream size : 27.4 MiB (86%)
Audio
ID : 257 (0x101)
Menu ID : 1 (0x1)
Format : AC-3
Format/Info : Audio Coding 3
Mode extension : CM (complete main)
Codec ID : 129
Duration : 2mn 6s
Bit rate mode : Constant
Bit rate : 192 Kbps
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 44.1 KHz
Bit depth : 16 bits
Compression mode : Lossy
Delay relative to video : -80ms
Stream size : 2.90 MiB (9%)
Menu
ID : 4096 (0x1000)
Menu ID : 1 (0x1)
Duration : 2mn 5s
List : 256 (0x100) (AVC) / 257 (0x101) (AC-3)
Service name : Service01
Service provider : Libav
Service type : digital television
Thanks everyone.