Jump to content

Emby having problems with AVI files


Arkieboy72472

Recommended Posts

Arkieboy72472

I tested my first batch or re-encodes and they work great. Using the "Stats for Nerds" option on the web player shows that emby is happy which makes me happy.

 

Looking forward, I obviously will not re-encode anything that will play, but if it ain't broke, I won't be fixing it. I have about 3TB of stuff of various formats and I am only going to fix what my roku will not play, transcoded or not. All I want is a working stream regardless of how it gets done. I use an HP Z800 with dual 6 core Xeons for my family server so any performance hit is negligible.

 

I have found that, in Handbrake, you have 4 Roku Presets. The maxed out preset works on my roku premiere +, but I am going to try a few to see what works best and fastest. I only support 2 other guests that are family, so if theirs works and mine works, then I am golden.

 

So far I have learned that not AVI files will play. Some will and some won't for reasons that I do not know. If they won't, I just reencode them. If they will, great. Handbreak might not be the best fix, but it is easy and has actually saved me a bit of space. Losing a bit of quality on files doesn't bother me if they are watchable. I am supporting special needs people who just like to see 80's and 90's comedy shows and cartoons. I don't consider this case solved, but I am not smart enough, nor do I have the time to figure it all out. I have too much data to do it all, so I will just go with an as needed basis.

 

I love the support we get here from the Admins. This is why I am not going anywhere and why I will help others who may find themselves in my situation.

Link to comment
Share on other sites

Waldonnis

Yea I believe we used to never allow stream copy from avi but negative user feedback about transcoding forced us to adjust.

 

the frame data you mention is something we don't have though, but maybe you can spot something in the ffprobe output that could allow us to determine that a transcode is needed. t hanks.

 

I'm not sure what there might be to look for, really.  Looking back at some of my test archive, I can't find an AVI file that contains h.264 that actually has is_avc set to 1, so that may not be a reliable indicator.

 

In this case, the lack of PTS will be problematic when remuxing to HLS.  I haven't tried it in an Emby context, but -fflags +genpts will probably be needed to create the streams' PTS values.  Unfortunately, the only way I can think of offhand to tell if this would be needed would be from looking at the first video frame's pkt_pts value (if it's N/A, it'll need timestamps), which isn't exactly the easiest or quickest thing to do during a probe.  Doesn't help that ffprobe's stream info for the video stream shows a 0 start_pts value, which doesn't match the frame dump info's "N/A" (audio does have PTS, which may be where that value is coming from).

 

@@Arkieboy72472, AVI and Roku tend not to play well together (I say this as a fellow Roku owner, and I'm using a Roku to test this case right now because of that).  Still, I'm hopeful that Luke and I can figure out a way to get stream copies to work so you don't have to manually remux to mkv or mp4 if you don't want to...and I'm trying to avoid transcoding video entirely unless absolutely necessary.

 

Actually, I'll amend the above AVI and h.264 don't generally play well together  :P

Link to comment
Share on other sites

@@Waldonnis i also played with -fflags +genpts before the input -i

 

This allowed the ffmpeg process to successfully complete but the video was jumping around, as if it were repeatedly zooming in and out. Audio sounded fine.

Link to comment
Share on other sites

Waldonnis

@@Waldonnis i also played with -fflags +genpts before the input -i

 

This allowed the ffmpeg process to successfully complete but the video was jumping around, as if it were repeatedly zooming in and out. Audio sounded fine.

 

Yeah, it is stutter-y on review compared to the original. I'll keep playing with it.  The output from a remux using mkvmerge seemed okay, so I'm probably just forgetting something with ffmpeg.

Link to comment
Share on other sites

Arkieboy72472

I managed to get the offending files from a torrent. I can always grab them again so that you all can work with samples. Like I said earlier, not all AVI files I have are affected. I almost have all of the files reencoded. Every smart device in my house is a roku of some sort. This issue doesn't affect the web version of emby. I am glad you all are coming up with a solution as AVI is a common file format.

Link to comment
Share on other sites

Happy2Play

I managed to get the offending files from a torrent. I can always grab them again so that you all can work with samples. Like I said earlier, not all AVI files I have are affected. I almost have all of the files reencoded. Every smart device in my house is a roku of some sort. This issue doesn't affect the web version of emby. I am glad you all are coming up with a solution as AVI is a common file format.

 

Can you compare codecs of ones that are and are not affected..

Edited by Happy2Play
Link to comment
Share on other sites

Guest asrequested

Thanks for the heads up. I am going to try and zip the file and send it.

 

Well, for what it's worth, I'm testing playing that video. I tried in the web app, Theater desktop, Theater store app and the Android mobile app (forcing transcoding and direct play). It played correctly, every time. I can't get it to not play.

Link to comment
Share on other sites

Waldonnis

Well, for what it's worth, I'm testing playing that video. I tried in the web app, Theater desktop, Theater store app and the Android mobile app (forcing transcoding and direct play). It played correctly, every time. I can't get it to not play.

 

It's probably just the Roku.  My Android phone was fine, as was web playback on my Windows partition.  Still, if it doesn't direct play on the Roku, a solution should be found to transcode or remux it so it can.  It's just finding the right options that's proving tricky.

 

AVI is a common format, but I wish it wasn't...frequently  :P  I refuse to even use AVI output from the various tools and editors I've used because of the limitations of the container and past problems with it.  Oddly, a remux to mp4 looked much better, so something's different in how the various muxers are handling the stream's information.  I too would like to know what the difference is from AVI files aren't showing the issue.  Maybe I'll take one of my non-AVI-contained h.264 samples and remux to AVI to see if they end up in a more HLS-friendly state and compare from there.

Link to comment
Share on other sites

Guest asrequested

Yeah, it's a crappy container, for sure. If it's remuxed to MKV, does it still have problems? If not, maybe it's easier to just have a blanket instruction to remux all AVI, regardless.

Link to comment
Share on other sites

Waldonnis

Yeah, it's a crappy container, for sure. If it's remuxed to MKV, does it still have problems? If not, maybe it's easier to just have a blanket instruction to remux all AVI, regardless.

 

Yes and no.  The PTS/DTS differences between the ffmpeg (with genpts) and mkvmerge output aren't what I expected to see, and playback of ffmpeg's output is jerky (mkvmerge's is fine).  I've been distracted most of the night, so I still have a lot of things to look at and try.

 

Edit: As stated before, the mp4 remux plays fine, and both pkt_dts and pkt_pts appear to have been completely (re)generated (pkt_dts is the same as the original).  The same cannot be said for the matroska or mpegts remuxes (the mpegts frames' timestamps are even stranger than the matroska file).  I'm wondering if there's a problem with the best effort timestamp estimation with this particular input container/codec combo and it not having PTS set.  I did find a bug report from years ago that was similar, but it had ordering issues as well that don't apply here.  I've also found some discussion indicating that nobody has ever really addressed these cases on the avcodec/ffmpeg side, but didn't look at the code to see if that was the case.

 

I know timestamp generation for h.264 is difficult since it supports variable framerate, but why there's a difference in muxers' output is puzzling without looking deeply at the code.  I'd say that remuxing to matroska file-wise may not be the best idea unless you use mkvmerge (which seems to do it well).  I have no idea what to do with HLS (using mpegts segments) yet, though, as I haven't done many tests with it yet.

Edited by Waldonnis
Link to comment
Share on other sites

Arkieboy72472

Can you compare codecs of ones that are and are not affected..

 

I have deleted the old files. Here is what I can try: Fire up a few videos in roku that I know are AVI. Take note of the how they play and how they are encoded. I will report back and you all can make heads or tails of it.

Link to comment
Share on other sites

Arkieboy72472

Yeah, it's a crappy container, for sure. If it's remuxed to MKV, does it still have problems? If not, maybe it's easier to just have a blanket instruction to remux all AVI, regardless.

 

I have reencoded all files to either MKV or M4V and they all work great. The stats show that they now play directly.

Link to comment
Share on other sites

Guest asrequested

I have reencoded all files to either MKV or M4V and they all work great. The stats show that they now play directly.

Transcoding them probably wasn't necessary. Remuxing would probably have worked.

Link to comment
Share on other sites

Well, for what it's worth, I'm testing playing that video. I tried in the web app, Theater desktop, Theater store app and the Android mobile app (forcing transcoding and direct play). It played correctly, every time. I can't get it to not play.

 

+1

 

Same here, I test many old movies (old one) I have, and all of them played without problem, I was hoping to find one, but could not.

Link to comment
Share on other sites

  • 1 month later...
  • 9 months later...
kosta296
com.emby.embyserver_3.6.0.78.apk

Emby Player 1.6.56g apk google playstore

 

Hi Guys my first time on this forum and speed learning with my Shield TV current generation with Emby installed.

 

I've had playback issues with all my AVI files. None playback at all.

Refresh rate switches then OSD pops up but just black screen and no audio either.

Tried the Playback Correction but no fix. 

 

I turned"OFF"Hardware Acceleration in settings and now AVI files play fine. 

Is this normal ???

 

Trannscoding:Hardware Acceleration: Yes = "Failed Playback." whilst Transcoding is in progress. (Reason Unsupported container)

Transcoding: Hardware Acceleration: Advanced (all Nvidia ticked) "Failed Playback."whilst Transcoding is in progress (Reason Unsupported container)

Transcoding: Hardware Acceleration: NO = "Perfect Playback" all AVI files whilst Transcoding is in progress (Reason Unsupported container)

Link to comment
Share on other sites

  • 4 weeks later...
Allan Cameron

My Emby Server will not play AVI files on any device. I have played back the files on my PC to confirm they work. This does not happen to every AVI file I have, just some ones from an old TV show called COACH. The Audio is mp3, and maybe that is an issue?

 

Tell me what logs are needed, where I find them, and how to post them and I will.

 

This is the first thing I have come across that Emby will not play. I am very thankful as a "plexile" to have emby, but this one little issue is driving me crazy!

 

I would suggest converting all your AVI files to h264 / AAC if you can.

I use HandBrake batch mode. Works awesome and has no noticeable quality change, I encode same bitrate as the AVI files.

This way you will have much better file support across all clients and less trouble in the future with no transcoding needed. I have done this since day 1 and have 0 AVI files in my library.

Edited by Allan Cameron
Link to comment
Share on other sites

  • 2 years later...
wonderwond

im having issues similar also,,,,,,,, everytime I add more movies to my server  they wont show up, even restarting the server, refreshing the directory scans . for example Gunsmoke S01E01.avi

Link to comment
Share on other sites

1 hour ago, wonderwond said:

im having issues similar also,,,,,,,, everytime I add more movies to my server  they wont show up, even restarting the server, refreshing the directory scans . for example Gunsmoke S01E01.avi

Hi.  Please start a new topic with details but the item you gave as an example is not a movie - it is a TV episode.  Exactly how did you "add" it?

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...