Hi there,
I'm having some issues with an app for an LG TV and it's not able to always read the format outputted to the .ts files by ffmpeg. I find it quite strange that it occasionally works, but I'm assuming that ffmpeg guesses certain values based on others to improve the quality etc.
I'm using the url structure that it's used in Plex/Web in Safari:
Oct 25, 2013 14:12:14 [0x80850e000] DEBUG - * path => http://127.0.0.1:32400/library/metadata/130 Oct 25, 2013 14:12:14 [0x80850e000] DEBUG - * mediaIndex => 0 Oct 25, 2013 14:12:14 [0x80850e000] DEBUG - * partIndex => 0 Oct 25, 2013 14:12:14 [0x80850e000] DEBUG - * protocol => hls Oct 25, 2013 14:12:14 [0x80850e000] DEBUG - * offset => 0 Oct 25, 2013 14:12:14 [0x80850e000] DEBUG - * fastSeek => 1 Oct 25, 2013 14:12:14 [0x80850e000] DEBUG - * directPlay => 1 Oct 25, 2013 14:12:14 [0x80850e000] DEBUG - * directStream => 1 Oct 25, 2013 14:12:14 [0x80850e000] DEBUG - * videoQuality => 100 Oct 25, 2013 14:12:14 [0x80850e000] DEBUG - * videoResolution => 1280x720 Oct 25, 2013 14:12:14 [0x80850e000] DEBUG - * maxVideoBitrate => 3724 Oct 25, 2013 14:12:14 [0x80850e000] DEBUG - * subtitleSize => 100 Oct 25, 2013 14:12:14 [0x80850e000] DEBUG - * audioBoost => 100 Oct 25, 2013 14:12:14 [0x80850e000] DEBUG - * session => dffuc2po15w Oct 25, 2013 14:12:14 [0x80850e000] DEBUG - * X-Plex-Version => 1.2.16 Oct 25, 2013 14:12:14 [0x80850e000] DEBUG - * X-Plex-Platform-Version => 7 Oct 25, 2013 14:12:14 [0x80850e000] DEBUG - * X-Plex-Client-Identifier => dffuc2po15w Oct 25, 2013 14:12:14 [0x80850e000] DEBUG - * X-Plex-Platform => Safari Oct 25, 2013 14:12:14 [0x80850e000] DEBUG - * X-Plex-Product => Web Client Oct 25, 2013 14:12:14 [0x80850e000] DEBUG - * X-Plex-Device => Mac Oct 25, 2013 14:12:14 [0x80850e000] DEBUG - * X-Plex-Device-Name => Plex/Web (Safari)
The original files work fine. They are usually formatted correctly anyway and are supported by Safari and the LG TV. I know this because I have 2 apps, one supports transcoding, the other does not and the one that doesn't plays all media perfectly.
From what I've learnt, the transcoding parameters are determined by the platform because I've noticed "Using profile Safari" in the log as well. Basically my question is, can I prevent it from using a pre-defined profile and customise the parameters manually?
Looking at the input and output formats for ffmpeg, there are only minor differences between the format that works and the transcoded output, which doesn't. Here's some samples:
Oct 25, 2013 14:12:14 [0x808137c00] INFO - [Transcoder] Input #0, matroska,webm, from 'http://127.0.0.1:32400/library/parts/104/file.mkv': Oct 25, 2013 14:12:14 [0x80764e800] INFO - [Transcoder] Stream #0:0(eng): Video: h264 (High), yuv420p, 1280x720, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc Oct 25, 2013 14:12:14 [0x807ce2800] INFO - [Transcoder] Stream #0:1: Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s (default)
Oct 25, 2013 14:12:14 [0x807640400] INFO - [Transcoder] Output #0, segment, to 'media-%05d.ts': Oct 25, 2013 14:12:14 [0x80850e000] INFO - [Transcoder] Stream #0:0: Video: h264, yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 23.98 fps, 90k tbn, 23.98 tbc Oct 25, 2013 14:12:14 [0x808137c00] INFO - [Transcoder] Stream #0:1: Audio: aac, 48000 Hz, 5.1, fltp, 384 kb/s (default)
Now it looks like only 2 of the values are different; the added q=2-31 and the 90k tbn value. Now I'm not 100% sure what these values represent, but if I could try and manually configure them maybe I could attempt to alter them to match.
One other example of the streaming url structure I found was for apple tv and this seems to pass what it's capable of. Something like:
X-Plex-Client-Capabilities => protocols=http-live-streaming,http-mp4-streaming,http-streaming-video,http-streaming-video-720p,http-mp4-video,http-mp4-video-720p;videoDecoders=h264{profile:high&resolution:1080&level:51};audioDecoders=mp3,aac{bitrate:160000}
Now, I tried this but it seems to just output the same format. Is there any other changes that could be made to this?