sle118 4 Posted December 16, 2016 Posted December 16, 2016 (edited) I am facing an issue when trying to play some video content recorded with a Hauppauge HD-PVR box. When trying to playback the content, the resulting image has the wrong aspect ratio (sorry for the large size) In order to try to resolve this, I configured folder sync and marked these shows to sync with the high profile. No joy. So in order to provide an example here, I cut out 1 minute of the video and played it to ensure that the problem was still there. I used ffmpeg for the task, with an option like this ffmpeg -ss 00:00:00 -t 00:00:00 -i [input.mp3|.mp4|...] [ouput.mp3|.mp4|...]Well, there was no issue playing the file... so I wonder what sort of magic ffmpeg had done and looked at the content with MediaInfo This is the original file General Complete name : \\media\Users\Public\Videos\HDPVR\mymovie.MP4 Format : MPEG-4 Format profile : 3GPP Media Release 4 Codec ID : 3gp4 (3gp4/isom) File size : 6.51 GiB Duration : 2 h 49 min Overall bit rate mode : Variable Overall bit rate : 5 484 kb/s Encoded date : UTC 2015-10-02 06:19:58 Tagged date : UTC 2015-10-02 06:19:58 Xtra : WM/MediaClassPrimaryID Video ID : 1 Format : AVC Format/Info : Advanced Video Codec Format profile : Main@L4 Format settings, CABAC : Yes Format settings, ReFrames : 4 frames Format settings, GOP : M=4, N=32 Codec ID : avc1 Codec ID/Info : Advanced Video Coding Duration : 2 h 49 min Bit rate mode : Variable Bit rate : 5 306 kb/s Maximum bit rate : 20.0 Mb/s Width : 1 920 pixels Height : 1 080 pixels Display aspect ratio : 16:9 Frame rate mode : Variable Frame rate : 29.970 (29970/1000) FPS Minimum frame rate : 0.979 FPS Maximum frame rate : 29.973 FPS Original frame rate : 29.970 (30000/1001) FPS Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Interlaced Scan type, store method : Separated fields Scan order : Top Field First Bits/(Pixel*Frame) : 0.085 Stream size : 6.30 GiB (97%) Language : English Encoded date : UTC 2015-10-02 06:19:58 Tagged date : UTC 2015-10-02 06:19:58 Color range : Limited Color primaries : BT.709 Transfer characteristics : BT.709 Matrix coefficients : BT.709 Audio ID : 2 Format : AAC Format/Info : Advanced Audio Codec Format profile : LC Codec ID : 40 Duration : 2 h 49 min Source duration : 2 h 49 min Bit rate mode : Constant Bit rate : 170 kb/s Channel(s) : 2 channels Channel positions : Front: L R Sampling rate : 48.0 kHz Frame rate : 46.875 FPS (1024 spf) Compression mode : Lossy Stream size : 206 MiB (3%) Source stream size : 206 MiB (3%) Language : English Encoded date : UTC 2015-10-02 06:20:04 Tagged date : UTC 2015-10-02 06:20:04And this is the "cutout" file General Complete name : \\media\Users\Public\Videos\HDPVR\short_example.mp4 Format : MPEG-4 Format profile : Base Media Codec ID : isom (isom/iso2/mp41) File size : 65.0 MiB Duration : 2 min 0 s Overall bit rate mode : Variable Overall bit rate : 4 525 kb/s Encoded date : UTC 1970-01-01 00:00:00 Tagged date : UTC 1970-01-01 00:00:00 Writing application : Lavf52.104.0 Video ID : 1 Format : MPEG-4 Visual Format profile : Simple@L1 Format settings, BVOP : No Format settings, QPel : No Format settings, GMC : No warppoints Format settings, Matrix : Default (H.263) Codec ID : 20 Duration : 2 min 0 s Bit rate : 4 478 kb/s Width : 1 920 pixels Height : 1 080 pixels Display aspect ratio : 16:9 Frame rate mode : Constant Frame rate : 29.970 (30000/1001) FPS Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Compression mode : Lossy Bits/(Pixel*Frame) : 0.072 Stream size : 64.1 MiB (99%) Writing library : Lavc52.117.0 Language : English Encoded date : UTC 1970-01-01 00:00:00 Tagged date : UTC 1970-01-01 00:00:00 Audio ID : 2 Format : AAC Format/Info : Advanced Audio Codec Format profile : LC Codec ID : 40 Duration : 2 min 0 s Bit rate mode : Variable Bit rate : 61.0 kb/s Channel(s) : 2 channels Channel positions : Front: L R Sampling rate : 48.0 kHz Frame rate : 46.875 FPS (1024 spf) Compression mode : Lossy Stream size : 897 KiB (1%) Language : English Encoded date : UTC 1970-01-01 00:00:00 Tagged date : UTC 1970-01-01 00:00:00With the fast approaching holidays, it would be nice to get a resolution so I could do some binge watching. I have pasted parts of the log here when starting the stream. It's for a different file, but the pattern is exactly the same http://pastebin.com/zR5QKRZA Can anyone help with this? Edited December 29, 2016 by sle118
Luke 39651 Posted December 16, 2016 Posted December 16, 2016 Hi, can you provide a sample video for testing? thanks !
sle118 4 Posted December 16, 2016 Author Posted December 16, 2016 Existing files are >8gb so they would not be practical. I will try to record a smaller sample over the weekend, as cutting out portions of these files resulted in a working cast... note that the main difference between the 2 files seem to be that the "cut" file is "progressive" as opposed to interlaced. Furthermore, folder sync also shows "interlaced" as well. this leads me to believe that the issue might be caused by Chromecast not properly recognizing the interlaced stream that is sent to it...
sle118 4 Posted December 16, 2016 Author Posted December 16, 2016 What is the best way to share media files?
Luke 39651 Posted December 17, 2016 Posted December 17, 2016 dropbox and google drive are great options.
nzspambot 0 Posted December 17, 2016 Posted December 17, 2016 @@Luke this problem also occurs for me streaming live TV (Aus) but only HD channels so I'm intresting to see what you can find
sle118 4 Posted December 19, 2016 Author Posted December 19, 2016 I am sharing a short example which shows similar behavior, although a bit different. The picture is "compressed" at the top of the screen and the bottom section is filled with artifacts which remind of old TVs when they got "ghost" images from reflections of the signal. As for the content, this is whatever was playing during the record, not a choice https://drive.google.com/file/d/0B5I4AMklqDsqNUMtV0NnYS1EMk0/view?usp=sharing
sle118 4 Posted December 20, 2016 Author Posted December 20, 2016 I have captured the playback on a Galaxy Tab S2. The picture looks green and really bad https://drive.google.com/file/d/0B5I4AMklqDsqX1JnZHhtQTJYZW8/view?usp=sharing
sle118 4 Posted December 20, 2016 Author Posted December 20, 2016 (edited) Arrgh.... looks like this is getting worst and worst. I wanted to reorganize some media on my network file server because I was running out of space on one of the drives. This was a bad move. I ended up having to delete the sync folder which had been transcoding for 5 days now because sync jobs would all fail. I removed the plugin, reinstalled it and attempted to sync again. There are exceptions now in the log, but overall, I think the sync jobs are running... will check in a few hours Application directory: C:\Users\myself\AppData\Roaming\MediaBrowser-Server\System System.InvalidOperationException: Unexpected ProfileConditionType à MediaBrowser.Model.Dlna.ConditionProcessor.IsConditionSatisfied(ProfileCondition condition, Nullable`1 currentValue) à MediaBrowser.Model.Dlna.StreamBuilder.GetVideoDirectPlayProfile(VideoOptions options, MediaSourceInfo mediaSource, MediaStream videoStream, MediaStream audioStream, Boolean isEligibleForDirectPlay, Boolean isEligibleForDirectStream, List`1 allMediaStreams) à MediaBrowser.Model.Dlna.StreamBuilder.BuildVideoItem(MediaSourceInfo item, VideoOptions options) à MediaBrowser.Model.Dlna.StreamBuilder.BuildVideoItem(VideoOptions options) My guess is that the file that's being analysed by the sync job chokes on the content. This is also a file which was recorded by the HDPVR General Complete name : \\server\Videos\myfile.MP4 Format : MPEG-4 Format profile : 3GPP Media Release 4 Codec ID : 3gp4 (3gp4/isom) File size : 4.24 GiB Duration : 2 h 2 min Overall bit rate mode : Variable Overall bit rate : 4 943 kb/s Encoded date : UTC 2016-11-11 02:57:32 Tagged date : UTC 2016-11-11 02:57:32 IsTruncated : Yes Video ID : 1 Format : AVC Format/Info : Advanced Video Codec Format profile : Main@L4 Format settings, CABAC : Yes Format settings, ReFrames : 4 frames Format settings, GOP : M=4, N=32 Codec ID : avc1 Codec ID/Info : Advanced Video Coding Duration : 2 h 2 min Bit rate mode : Variable Bit rate : 4 751 kb/s Maximum bit rate : 20.0 Mb/s Width : 1 920 pixels Height : 1 080 pixels Display aspect ratio : 16:9 Frame rate mode : Variable Frame rate : 29.970 (29970/1000) FPS Minimum frame rate : 0.892 FPS Maximum frame rate : 29.973 FPS Original frame rate : 29.970 (30000/1001) FPS Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Interlaced Scan type, store method : Separated fields Scan order : Top Field First Bits/(Pixel*Frame) : 0.076 Stream size : 4.07 GiB (96%) Language : English Encoded date : UTC 2016-11-11 02:57:32 Tagged date : UTC 2016-11-11 02:57:32 Color range : Limited Color primaries : BT.709 Transfer characteristics : BT.709 Matrix coefficients : BT.709 Audio ID : 2 Format : AAC Format/Info : Advanced Audio Codec Format profile : LC Codec ID : 40 Duration : 2 h 2 min Bit rate mode : Constant Bit rate : 185 kb/s Channel(s) : 2 channels Channel positions : Front: L R Sampling rate : 48.0 kHz Frame rate : 46.875 FPS (1024 spf) Compression mode : Lossy Stream size : 162 MiB (4%) Language : English Encoded date : UTC 2016-11-11 02:57:37 Tagged date : UTC 2016-11-11 02:57:37 Edited December 20, 2016 by sle118
Luke 39651 Posted December 21, 2016 Posted December 21, 2016 Hi @@sle118, can you please attach the complete emby server log? I have your sample file that you provided, i will be testing it shortly. thanks !
sle118 4 Posted December 21, 2016 Author Posted December 21, 2016 (edited) Hi @@sle118, can you please attach the complete emby server log? I have your sample file that you provided, i will be testing it shortly. thanks ! Is there a way to send it to you privately? I don't like exposing my server structure to the general public. FYI, folder sync should handle exceptions nicely when it's processing the video items in the queue. Not doing so results in the queue hanging out there and the temp transcodes to fill up the work drive. I have cloned the repo to try and debug the process right before it derails; it would be nice if the condition evaluation could also dump which condition was unexpected, but short of this now I'll trace manually. Edited December 21, 2016 by sle118
Luke 39651 Posted December 22, 2016 Posted December 22, 2016 Folder sync already does that so we'll need to go over a specific example. you can PM me log files.
Luke 39651 Posted December 23, 2016 Posted December 23, 2016 Hi @@sle118, I tested your sample file and it worked fine for me, both with transcoding and with direct play. the aspect ratio looked fine and the video filled the screen. Did you make sure the problem was occurring with the sample you gave me?
sle118 4 Posted December 23, 2016 Author Posted December 23, 2016 Luke, i will pm you with a new sample file, and its corresponding log when played.On android, the image is interlaced and green.
sle118 4 Posted December 23, 2016 Author Posted December 23, 2016 What I meant to say is that in addition to chromecast's issue with aspect ratio, the same file shows green on my Galaxy Tab S2.
Luke 39651 Posted December 23, 2016 Posted December 23, 2016 @@sle118, i tested this 4gb file on chromecast and did not see any aspect ratio issues, both with direct play and transcoding. What kind of TV do you have? I will now test it on android. Thanks.
Luke 39651 Posted December 23, 2016 Posted December 23, 2016 The sync issue is resolved for the next release, thanks.
sle118 4 Posted December 23, 2016 Author Posted December 23, 2016 (edited) The sync issue is resolved for the next release, thanks. Can you share your findings? Also, I ran ffprobe on the command line and found the following output, which seems to be the root cause of many of my issues. -- NEVERMIND THAT. The file had been truncated to 0 bytes. ffprobe version N-82324-g872b358 Copyright (c) 2007-2016 the FFmpeg developers built with gcc 5.4.0 (GCC) configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fon tconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --e nable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-libr tmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvo rbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --ena ble-zlib libavutil 55. 36.100 / 55. 36.100 libavcodec 57. 66.101 / 57. 66.101 libavformat 57. 57.100 / 57. 57.100 libavdevice 57. 2.100 / 57. 2.100 libavfilter 6. 66.100 / 6. 66.100 libswscale 4. 3.100 / 4. 3.100 libswresample 2. 4.100 / 2. 4.100 libpostproc 54. 2.100 / 54. 2.100 file:\\media\Videos2\myfile.TS: Invalid data found when processing input not good! I'll see if I an find a more recent ffmpeg Edited December 23, 2016 by sle118
Luke 39651 Posted December 23, 2016 Posted December 23, 2016 Do not use the latest 3.2. Stick to 3.1 or earlier.
sle118 4 Posted December 23, 2016 Author Posted December 23, 2016 Do not use the latest 3.2. Stick to 3.1 or earlier. I installed version ffmpeg-3.1.5-win64-static from the following link https://ffmpeg.zeranoe.com/builds/win64/static/
Luke 39651 Posted December 23, 2016 Posted December 23, 2016 If you're on windows then you should just stick to the build that came with the server. you can grab it here if you need to: https://github.com/MediaBrowser/Emby.Resources/tree/master/ffmpeg/windows There is probably nothing wrong with the version that you chose, but it's not realistic for us to test every possible version so customizing it is generally only something you should do if you actually have a reason to do that.
sle118 4 Posted December 23, 2016 Author Posted December 23, 2016 I took the latest build and tried to sync again. Saw the following exception in the logs Constraint: NOT NULL constraint failed: SyncJobs.ItemIds SQLitePCL.pretty.SQLiteException: Une exception de type 'SQLitePCL.pretty.SQLiteException' a été levée. I added the logs to my shared folder. How I did this: - I moved the video file to a folder where auto-sync was enabled - ran sync Note that the movie had been added to another sync job in the past, under a different "batch" of multiple movies. I had cancelled it when I found it to derail the entire sync job. thanks!
Luke 39651 Posted December 23, 2016 Posted December 23, 2016 The changes i've made have not been published yet.
sle118 4 Posted December 23, 2016 Author Posted December 23, 2016 Got it! I sent another video file to the shared folder. That is the original file, full length, for which I posted the picture in the first post. As for the aspect ratio, I'm playing the file on a 65" Haier LCD bought last fall. Other full HD content, for example from Netflix, plays just fine on the cast. I'll check to see if the chrome cast's resolution or sync rate can be changed. This wouldn't explain why I'm getting green interlaced video on the tablet, though.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now