Transcoding Issues

I'm having issues with the transcoded streams.. I'm able to connect, metadata is loading, everything works.. Up until it tries to play... Then it sits at paused (loading)

 

I hope this thread can help identify what the issues are so PlexConnect can function fully on the ATV.

 

Media metadata information can be found in Plex Media Server by going to the file, and then clicking Media Info on the left navigation bar

Some files work, and some don't... It seems there is a file in the opsoneo PlexConnect directory called PlexAPI.py and it held a line of code which specified file compatibilities...

From PlexAPI.py:

plexAccess['X-Plex-Client-Capabilities'] = 'protocols=http-live-streaming,http-mp4-streaming,http-mp4-video,http-mp4-video-720p,http-streaming-video,http-streaming-video-720p;videoDecoders=h264{profile:high&resolution:720&level:41};audioDecoders=aac,mp3,ac3'      

Could it be a part of the PlexConnect workings that prevents files from playing based on their stream type? I'm seeing the temporary ts files load into a directory on the server, so it is transcoding, though it's not wanting to begin playing on the ATV3 side..

Source: https://github.com/opsoneo/PlexConnect (Older source code)

I've found that mp4, m4a, and avi files play without any trouble (begin playing within 3 seconds) of the play screen ... MKV files are having difficulty playing; some never start, but transcode and buffer slightly.

Here's two examples of MKV files .... One works, one doesn't...

Working: TV Show (mkv): http://pastebin.com/1aqHNtpk

Not Working: Movie (mkv) : http://pastebin.com/3NQG6GQ0

What happens if you strip the subtitles out of one of the non-working MKV files? (see here if you do not know how http://bit.ly/14pK9fH )

Removing subtitles from the mkv did not resolve the issue. I removed the old file and refreshed the library. Plex now shows no subtitles for that movie. I will experiment further...

...

From PlexAPI.py:

plexAccess['X-Plex-Client-Capabilities'] = 'protocols=http-live-streaming,http-mp4-streaming,http-mp4-video,http-mp4-video-720p,http-streaming-video,http-streaming-video-720p;videoDecoders=h264{profile:high&resolution:720&level:41};audioDecoders=aac,mp3,ac3'      

...

Please look at XMLConverter.py - find PlexAPI_getTranscodePath().

This is basically the same code as found in opsoneos sources, plus some adjustments.

Please look at XMLConverter.py - find PlexAPI_getTranscodePath().

This is basically the same code as found in opsoneos sources, plus some adjustments.

So do these values match the stream which needs to be, or what can be played? Also, there's a quality = 9 variable . . . does any change to this variable affect the transcoding?

I wasn't able to find any mkv mux settings that worked..... However, the audio is DTS on the ones I am trying; could this be incompatible and a reason it won't stream? 

I will experiment with minor changes to these two..

I tweaked the PlexAPI Client Capabilities string to read:

plexAccess['X-Plex-Client-Capabilities'] = 'protocols=http-live-streaming,http-mp4-streaming,http-mp4-video,http-mp4-video-720p,http-mp4-video-1080p,http-streaming-video,http-streaming-video-720p,http-streaming-video-1080p;videoDecoders=h264{profile:main&resolution:720&level:42};audioDecoders=aac'
 
Dropping ac3 passthrough and adding (probably not necessary) streaming 1080p protocols.....
 
 
And it works. I'm transcoding all mkv files!!  :D

...

Dropping ac3 passthrough and adding (probably not necessary) streaming 1080p protocols.....
...

ac3: We had a longer discussion about this. The trouble is, with this change roidy will only get the aac audio, not the high performance ac3 version. He might not like that.

1080: This is fine for now, aTV2 wouldn't be capable of displaying though. Once the transcoder kicks in, you will get 720 anyways (see: "resolution:720"). This has to made flexible depending on 1) the aTV version you are using and 2) any predefined settings...

Could you please check, if the ac3 change on it's own would work? Does your file has ac3+aac audio streams? Do you have a ac3-capable audio system connected?

Could you please check, if the ac3 change on it's own would work? Does your file has ac3+aac audio streams? Do you have a ac3-capable audio system connected?

Yes... Removing the ac3 passthrough option allows transcoding of movies with ac3 audio.. I don't really have much selection; most of my movies are ac3 only. If I can find one, I would gladly test it.

I've tried a few different settings. I'm curious if a setting is not compatible, what will happen? What I'm dealing with is the h264 compression transcoding; aTV3 are compatible with up to level 4.0, though 4.1 and 4.2 also exist. I am using level 42 (4.2) and have moved my settings to 1080 and high. One other thing which has greatly reduced load (Probably because it's not making changes?) is using quality = 12

I have attached my modified XMLConverter.py     ..... Won't work with aTV2 because of the 1080 settings.

Could you please check, if the ac3 change on it's own would work? Does your file has ac3+aac audio streams? Do you have a ac3-capable audio system connected?

Yes... Removing the ac3 passthrough option allows transcoding of movies with ac3 audio.. I don't really have much selection; most of my movies are ac3 only. If I can find one, I would gladly test it.

I've tried a few different settings. I'm curious if a setting is not compatible, what will happen? What I'm dealing with is the h264 compression transcoding; aTV3 are compatible with up to level 4.0, though 4.1 and 4.2 also exist. I am using level 42 (4.2) and have moved my settings to 1080 and high. One other thing which has greatly reduced load (Probably because it's not making changes?) is using quality = 12

I have linked my modified PlexAPI code from XMLConverter.py     ..... Won't work with aTV2 because of the 1080 settings.

http://pastebin.com/GFcJwTX3

Yes... Removing the ac3 passthrough option allows transcoding of movies with ac3 audio.. I don't really have much selection; most of my movies are ac3 only. If I can find one, I would gladly test it.

I've tried a few different settings. I'm curious if a setting is not compatible, what will happen? What I'm dealing with is the h264 compression transcoding; aTV3 are compatible with up to level 4.0, though 4.1 and 4.2 also exist. I am using level 42 (4.2) and have moved my settings to 1080 and high. One other thing which has greatly reduced load (Probably because it's not making changes?) is using quality = 12

I have linked my modified PlexAPI code from XMLConverter.py     ..... Won't work with aTV2 because of the 1080 settings.

http://pastebin.com/GFcJwTX3

I replace with you file and don't working. Can you send me file XMLConverter.py ? Thanks

Just for info

(non-jailbroken) Apple TV 2 plays 1080p just fine, provided that that profile is up to 4.1 and video bit rate has sane value (outputs 720p though). Below is a movie that I'm successfully playing without transcoding via PlexConnect. Note that it plays from iTunes as well, provided that you remux it from MKV to MP4 and do NOT tag it as 1080 HD. I can test more if needed.

General
Format                                   : Matroska
Format version                           : Version 2
File size                                : 11.9 GiB
Overall bit rate                         : 10.6 Mbps

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L4.1
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 4 frames
Codec ID                                 : V_MPEG4/ISO/AVC
Duration                                 : 2h 41mn
Bit rate                                 : 8 171 Kbps
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 23.976 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.164
Stream size                              : 8.98 GiB (75%)
Writing library                          : x264 core 93 r1542 5b86182
Encoding settings                        : cabac=1 / ref=4 / deblock=1:0:0 / analyse=0x3:0x133 / me=umh / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / sliced_threads=0 / nr=0 / decimate=0 / interlaced=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=3 / wpredb=1 / wpredp=2 / keyint=240 / keyint_min=24 / scenecut=40 / intra_refresh=0 / rc_lookahead=30 / rc=2pass / mbtree=1 / bitrate=8171 / ratetol=1.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / aq=1:1.00
 

Just for info

(non-jailbroken) Apple TV 2 plays 1080p just fine, provided that that profile is up to 4.1 and video bit rate has sane value (outputs 720p though). Below is a movie that I'm successfully playing without transcoding via PlexConnect. Note that it plays from iTunes as well, provided that you remux it from MKV to MP4 and do NOT tag it as 1080 HD. I can test more if needed.

General
Format                                   : Matroska
Format version                           : Version 2
File size                                : 11.9 GiB
Overall bit rate                         : 10.6 Mbps

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L4.1
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 4 frames
Codec ID                                 : V_MPEG4/ISO/AVC
Duration                                 : 2h 41mn
Bit rate                                 : 8 171 Kbps
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 23.976 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.164
Stream size                              : 8.98 GiB (75%)
Writing library                          : x264 core 93 r1542 5b86182
Encoding settings                        : cabac=1 / ref=4 / deblock=1:0:0 / analyse=0x3:0x133 / me=umh / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / sliced_threads=0 / nr=0 / decimate=0 / interlaced=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=3 / wpredb=1 / wpredp=2 / keyint=240 / keyint_min=24 / scenecut=40 / intra_refresh=0 / rc_lookahead=30 / rc=2pass / mbtree=1 / bitrate=8171 / ratetol=1.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / aq=1:1.00

Just for info

(non-jailbroken) Apple TV 2 plays 1080p just fine, provided that that profile is up to 4.1 and video bit rate has sane value (outputs 720p though). Below is a movie that I'm successfully playing without transcoding via PlexConnect. Note that it plays from iTunes as well, provided that you remux it from MKV to MP4 and do NOT tag it as 1080 HD. I can test more if needed.

General
Format                                   : Matroska
Format version                           : Version 2
File size                                : 11.9 GiB
Overall bit rate                         : 10.6 Mbps

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L4.1
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 4 frames
Codec ID                                 : V_MPEG4/ISO/AVC
Duration                                 : 2h 41mn
Bit rate                                 : 8 171 Kbps
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 23.976 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.164
Stream size                              : 8.98 GiB (75%)
Writing library                          : x264 core 93 r1542 5b86182
Encoding settings                        : cabac=1 / ref=4 / deblock=1:0:0 / analyse=0x3:0x133 / me=umh / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / sliced_threads=0 / nr=0 / decimate=0 / interlaced=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=3 / wpredb=1 / wpredp=2 / keyint=240 / keyint_min=24 / scenecut=40 / intra_refresh=0 / rc_lookahead=30 / rc=2pass / mbtree=1 / bitrate=8171 / ratetol=1.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / aq=1:1.00
 

How you did this?

Can you give me your plexconnect folder?

Nem4ara, it might be better if you tell us what your specific issue is.

Please look at the “how to report an issue” link in the sticky at the too of the forum.

Bear in mind since the op of this thread reported his issue a lot of changes to code have been made.

Hi, first of all PlexConnect has been a godsend and I truly thank the people who made my ATV 3 useful again. This has been incredibly helpful and thanks to all the makers of plex for getting this together. I seem to also be having trouble with high resolution videos ie 1080p streams. Just so you know my setup, I have a PMS running on my QNAP T459 Pro II. Processor is a bit weak at 1.8 Dual Core Atom. In general I am able to stream ANY file on my local network just fine. When I stream out of my network using myplex I have some hiccuping with 1080p files. I installed plex connect and was able to stream my 720p files just fine. My 6-12 gb 1080p files stutter every few seconds. It has to reload and it starts again. What can I do to get this working right. I have a raspberry Pi running rasplex and a boxee box. I would love to ditch all of that for this. Is this something that someone can help me with. Thanks so much.

It may well be that the NAS is struggling to transcode or direct stream the 1080P files, without seeing the media information for them it is hard to say.

The PI and desktop clients have much better codec support so probably put no stress on the server.

One option is to use a program, such as iFlicks, to remux your files so that they play natively on the ATV/iOS devices (it is really quick, there is no loss of quality and will also tag them for iTunes/iOS devices).

Also see this if running pre 5.1 firmware:

http://forums.plexapp.com/index.php/topic/70195-users-on-pre-51-firmware-please-read/

I have lots of M4V files that natively play on iTunes and Apple TV. However, when I try to fast forward or skip to a chapter using PlexConnect, playback just freezes and Terminal stops at

Player state: Playing at this time

- Does fast forwarding not work even with native mp4? 

- If the M4V already includes 5.1 surround sound  AC3, will it play as surround or only in stereo using PlexConnect?

I have lots of M4V files that natively play on iTunes and Apple TV. However, when I try to fast forward or skip to a chapter using PlexConnect, playback just freezes and Terminal stops at

Player state: Playing at this time

- Does fast forwarding not work even with native mp4? 

- If the M4V already includes 5.1 surround sound  AC3, will it play as surround or only in stereo using PlexConnect?

It should do, there are some code improvements coming in with regards to pausing, forwarding etc but i am not sure if the code has been added to Github yet.

Multichannel will play but see this:

https://github.com/iBaa/PlexConnect/wiki/FAQ#playback