Hey guys, me again.
I've been attempting to clean up my plugin and one of the items on the list was to narrow down the available media sources and present proper MediaObjects so that clients that can Direct Play will do so, rather than transcode everything.
Here is my MediaObject:
return[MediaObject( video_resolution = int(quality), container = Container.MP4, video_codec = VideoCodec.H264, video_frame_rate = 24, audio_channels = 2, audio_codec = AudioCodec.AAC, optimized_for_streaming = True, parts = [PartObject(key=Callback(PlayVideo, url = link, quality = quality))] ) ]
... and this plays fine in PMC. However, when attempting to play on Android or ATV (via PlexConnect), I get an error telling me the client cannot play this video. However, if I remove the line "audio_channels = 2," the video will play fine (direct), but the audio transcodes on the fly. Being that the video source is definatly stereo AAC, I can't for the life of me figure out why they wont play on my other clients?! The PMS logs show that I seem to be killing the transcoder:
Sep 10, 2013 00:15:12 [0xaaf67b70] ERROR - [Transcoder] Failed to open bitstream filter h264_mp4toannexb for stream 0 with codec cop Sep 10, 2013 00:15:12 [0xa82ffb70] ERROR - [Transcoder] : Invalid argument Sep 10, 2013 00:15:12 [0xac2efb70] DEBUG - Request: GET /video/:/transcode/universal/session/1d4152aa-6d50-456e-aaf2-7f02adbc9598/base/00000.ts [192.168.1.151:45666] (5 live) Sep 10, 2013 00:15:12 [0xac2efb70] DEBUG - Asked for segment 0 from session. Sep 10, 2013 00:15:14 [0xaaf67b70] ERROR - [Transcoder] [mpegts @ 0x92530a0] AAC bitstream not in ADTS format and extradata missing Sep 10, 2013 00:15:14 [0xa82ffb70] ERROR - [Transcoder] av_interleaved_write_frame(): Invalid data found when processing input Sep 10, 2013 00:15:14 [0xac2efb70] DEBUG - Returning segment 0 from session: /mnt/cache/apps/Plex/Temp/plex-transcode-1d4152aa-6d50-456e-aaf2-7f02adbc9598-c5326dd3-5e2d-47e9-91cc-be955c0b48f3/media-00000.ts Sep 10, 2013 00:15:14 [0xac2efb70] DEBUG - Content-Length of /mnt/cache/apps/Plex/Temp/plex-transcode-1d4152aa-6d50-456e-aaf2-7f02adbc9598-c5326dd3-5e2d-47e9-91cc-be955c0b48f3/media-00000.ts is 857656. Sep 10, 2013 00:15:14 [0xaaf67b70] DEBUG - Request: GET /video/:/transcode/universal/session/1d4152aa-6d50-456e-aaf2-7f02adbc9598/base/00001.ts [192.168.1.151:45667] (5 live) Sep 10, 2013 00:15:14 [0xaaf67b70] DEBUG - Asked for segment 1 from session. Sep 10, 2013 00:15:14 [0xaaf67b70] WARN - Transcode runner appears to have died. Sep 10, 2013 00:15:14 [0xaaf67b70] WARN - Timed out waiting for segment.
Am I doing something wrong? Thanks in advance.
Jamie