mobamobamoba 5 Posted September 18, 2018 Share Posted September 18, 2018 (edited) I noticed Emby was transcoding an mp4 to a Roku. I knew the bitrate of the file was under 1mbps and the Roku is set for 4mbps so on digging to figure out why Emby was transcoding, I saw the following in the log and was trying to figure out what it meant: Info App: User policy for USERNAME. EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True 2018-09-17 00:13:01.498 Info App: Profile: Roku SG, Path: <PATH TO FILE>.mp4, isEligibleForDirectPlay: True, isEligibleForDirectStream: True 2018-09-17 00:13:01.514 Info App: Profile: VideoCodecProfile, DirectPlay=false. Reason=Roku SG.VideoCodecTag Condition: NotEquals. ConditionValue: mp4v. IsRequired: True. Path: <PATH TO FILE>.mp4 So Emby is transcoding because Roku requires an mp4v (whatever that is)? Thanks. Edited September 18, 2018 by mobamobamoba Link to comment Share on other sites More sharing options...
ebr 14947 Posted September 18, 2018 Share Posted September 18, 2018 Hi. What are the actual contents of that mp4? If you can just post the transcode log from that session, we can see. Thanks. Link to comment Share on other sites More sharing options...
mobamobamoba 5 Posted September 18, 2018 Author Share Posted September 18, 2018 Sure here you go thanks: 2018-09-18 00:40:37.249Application version: 3.5.2.0http://<EMBY SERVER>/963b6b923efa05678ee110b132185680/hls1/main/0.ts?DeviceId=7cb93d8c-c043-5e45-803b-338df26d7372&MediaSourceId=963b6b923efa05678ee110b132185680&VideoCodec=h264,hevc,vp9&AudioCodec=mp3,aac&AudioStreamIndex=1&VideoBitrate=3868710&AudioBitrate=131290&MaxFramerate=61&MaxWidth=3840&MaxHeight=2160&PlaySessionId=5b2d83b77f004516a212b789e2e0a9f4&api_key=9f2d247a76d04926912e5c5c808ea1a5&TranscodingMaxAudioChannels=2&RequireAvc=false&Tag=a0deb331bf09afaae31e65d5a5b9dff5&SegmentContainer=ts&SegmentLength=3&MinSegments=1&BreakOnNonKeyFrames=True&h264-maxrefframes=16&h264-videobitdepth=8&h264-profile=high,main,baseline,constrainedbaseline&h264-level=51&aac-audiochannels=6&TranscodeReasons=VideoCodecNotSupported{"Protocol":"File","Id":"963b6b923efa05678ee110b132185680","Path":"<FILE PATH>.mp4","Type":"Default","Container":"mov,mp4,m4a,3gp,3g2,mj2","Name":"<NAME>","IsRemote":false,"ETag":"a0deb331bf09afaae31e65d5a5b9dff5","RunTimeTicks":26720000000,"ReadAtNativeFramerate":false,"IgnoreDts":false,"IgnoreIndex":false,"GenPtsInput":false,"SupportsTranscoding":true,"SupportsDirectStream":true,"SupportsDirectPlay":true,"IsInfiniteStream":false,"RequiresOpening":false,"RequiresClosing":false,"RequiresLooping":false,"SupportsProbing":true,"VideoType":"VideoFile","MediaStreams":[{"Codec":"mpeg4","CodecTag":"mp4v","Language":"und","TimeBase":"1/12800","CodecTimeBase":"1/25","VideoRange":"SDR","DisplayTitle":"480P MPEG4","IsInterlaced":false,"BitRate":954780,"RefFrames":1,"IsDefault":true,"IsForced":false,"Height":416,"Width":720,"AverageFrameRate":25,"RealFrameRate":25,"Profile":"Advanced Simple Profile","Type":"Video","AspectRatio":"45:26","Index":0,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"PixelFormat":"yuv420p","Level":5},{"Codec":"mp3","CodecTag":"mp4a","Language":"und","TimeBase":"1/48000","CodecTimeBase":"1/48000","DisplayTitle":"Und MP3 stereo Default","IsInterlaced":false,"ChannelLayout":"stereo","BitRate":131290,"Channels":2,"SampleRate":48000,"IsDefault":true,"IsForced":false,"Type":"Audio","Index":1,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Level":0}],"Formats":[],"Bitrate":1093001,"RequiredHttpHeaders":{}}User policy for <USERNAME>: EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True<FFMPEG PATH>ffmpeg.exe -i file:"<FILE PATH>.mp4" -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 h264_nvenc -vf "scale=trunc(min(max(iw\,ih*dar)\,min(3840\,2160*dar))/2)*2:trunc(min(max(iw/dar\,ih)\,min(3840/dar\,2160))/2)*2" -pix_fmt yuv420p -preset default -b:v 2864340 -maxrate 2864340 -bufsize 5728680 -profile:v high -forced-idr 1 -force_key_frames "expr:if(isnan(prev_forced_t),eq(t,t),gte(t,prev_forced_t+3))" -copyts -vsync -1 -codec:a:0 copy -f segment -max_delay 5000000 -avoid_negative_ts disabled -map_metadata -1 -map_chapters -1 -start_at_zero -segment_time 3 -individual_header_trailer 0 -segment_format mpegts -segment_list_type m3u8 -segment_start_number 0 -segment_list "<TRANSCODING PATH>\transcoding-temp\2176ff01aaecf51c046cb5a6c969a2a0.m3u8" -y "<TRANSCODING PATH>\transcoding-temp\2176ff01aaecf51c046cb5a6c969a2a0%d.ts"ffmpeg version 4.0.1 Copyright © 2000-2018 the FFmpeg developers built with gcc 7.3.1 (GCC) 20180710 configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth libavutil 56. 14.100 / 56. 14.100 libavcodec 58. 18.100 / 58. 18.100 libavformat 58. 12.100 / 58. 12.100 libavdevice 58. 3.100 / 58. 3.100 libavfilter 7. 16.100 / 7. 16.100 libswscale 5. 1.100 / 5. 1.100 libswresample 3. 1.100 / 3. 1.100 libpostproc 55. 1.100 / 55. 1.100Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'file:L:\<USERNAME>\Outrageous Fortune\Season 3\<NAME>.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2mp41 creation_time : 2017-12-22T18:06:44.000000Z encoder : Lavf58.2.100 Duration: 00:44:32.00, start: 0.000000, bitrate: 1093 kb/s Stream #0:0(und): Video: mpeg4 (Advanced Simple Profile) (mp4v / 0x7634706D), yuv420p, 720x416 [sAR 1:1 DAR 45:26], 954 kb/s, 25 fps, 25 tbr, 12800 tbn, 25 tbc (default) Metadata: creation_time : 2017-12-22T18:06:44.000000Z handler_name : VideoHandler Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 131 kb/s (default) Metadata: creation_time : 2017-12-22T18:06:44.000000Z handler_name : SoundHandlerStream mapping: Stream #0:0 -> #0:0 (mpeg4 (native) -> h264 (h264_nvenc)) Stream #0:1 -> #0:1 (copy)Press [q] to stop, [?] for help[segment @ 000001b36cef4fc0] Opening '<TRANSCODING PATH>transcoding-temp\2176ff01aaecf51c046cb5a6c969a2a00.ts' for writingOutput #0, segment, to '<TRANSCODING PATH>transcoding-temp\2176ff01aaecf51c046cb5a6c969a2a0%d.ts': Metadata: encoder : Lavf58.12.100 Stream #0:0: Video: h264 (h264_nvenc) (High), yuv420p, 720x416 [sAR 1:1 DAR 45:26], q=-1--1, 2864 kb/s, 25 fps, 90k tbn, 25 tbc (default) Metadata: encoder : Lavc58.18.100 h264_nvenc Side data: cpb: bitrate max/min/avg: 2864340/0/2864340 buffer size: 5728680 vbv_delay: -1 Stream #0:1: Audio: mp3 (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 131 kb/s (default)frame= 51 fps=0.0 q=13.0 size=N/A time=00:00:02.37 bitrate=N/A speed=4.74x [segment @ 000001b36cef4fc0] Opening '<TRANSCODING PATH>transcoding-temp\2176ff01aaecf51c046cb5a6c969a2a0.m3u8.tmp' for writing[segment @ 000001b36cef4fc0] Opening '<TRANSCODING PATH>transcoding-temp\2176ff01aaecf51c046cb5a6c969a2a01.ts' for writing[segment @ 000001b36cef4fc0] Opening '<TRANSCODING PATH>transcoding-temp\2176ff01aaecf51c046cb5a6c969a2a0.m3u8.tmp' for writing[segment @ 000001b36cef4fc0] Opening '<TRANSCODING PATH>transcoding-temp\2176ff01aaecf51c046cb5a6c969a2a02.ts' for writingetc... Link to comment Share on other sites More sharing options...
speechles 1920 Posted September 18, 2018 Share Posted September 18, 2018 (edited) https://emby.media/community/index.php?/topic/62070-issue-with-watching-in-progress-recording-on-roku-tcl-tv/?p=616742 More Info:(from wikipedia) The only official filename extension for MPEG-4 Part 14 files is .mp4. Oh really. So, no wonder mp4v codec doesn't work in MKV. So the restriction for MP4V needs to check the container the media is in @ebr and if it is MKV only apply the restriction to transcode. If it is an MP4 container the mpeg4 part14 actually does play. So making note of this, not sure if you want to add into the code, since adding so much makes troubleshoot things later harder. This is just left on the table for the next meal. Will come back to this again and finish. Putting the little fly net covers over the food. We will be back to eat. So the limitation to limit the mp4v isnt required _IF_ the file is mp4 only if it is mkv. Since we are here lets finish it up. snipped code - no give aways to p _ _ x. Edited September 23, 2018 by speechles Link to comment Share on other sites More sharing options...
mobamobamoba 5 Posted September 18, 2018 Author Share Posted September 18, 2018 I'm not entirely sure I do understand. The file itself - the container - is an MP4 not an MKV. So according to the above, it should direct play right? Link to comment Share on other sites More sharing options...
speechles 1920 Posted September 18, 2018 Share Posted September 18, 2018 (edited) I'm not entirely sure I do understand. The file itself - the container - is an MP4 not an MKV. So according to the above, it should direct play right? The restriction ATM doesn't care what your extension is. Point blank, mp4v as a codec cannot direct play. This was known back then (a few days ago). This was left on the table. The official roku app doesn't track extension. This made this part require a later addition, as to not overwhelm ebr with information overload. Right now there is alot on his plate. You can see above where the mp4v restriction is in the code, I pasted it. In this you can see the extension now will check if it is mkv before applying it. This will fix your issue. @@ebr sorry to put so much in front of you at once. Better to get all this out of the way now. Less interruption for users, less remediation required for posts such as this. Win win all around. Go team emby! Edited September 18, 2018 by speechles Link to comment Share on other sites More sharing options...
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