nague 5 Posted June 26, 2017 Share Posted June 26, 2017 Hi Luke, Most of my media folders are located on samba remote shares, with limited bandwidth (30Mbps). When transcoding or remux is needed, switching audio channel is very slow (from 20s to 1min). Actually, monitoring process on my emby server gives me following sequencing when switching audio: a new ffmpeg thread is open with new audio track, concurrent to the origin ffmpeg thread it takes 20s to 1min to get back video on emby client (depend on the video size / compression) the original ffmpeg thread is closed after 30 more seconds The main issue here is emby opening the video file twice in a limited bandwidth context. 1°) Is the “open” before “close” an intended choice? 2°) What is the trigger to close the original ffmpeg thread? Or why is it so long? Thanks for your help Link to comment Share on other sites More sharing options...
Luke 37345 Posted June 26, 2017 Share Posted June 26, 2017 hi there @@nague, we're very sorry to hear about this. We'd like to help you resolve this. Can we look at an example? Please attach the information requested in how to report a media playback issue. thanks ! Link to comment Share on other sites More sharing options...
nague 5 Posted June 26, 2017 Author Share Posted June 26, 2017 (edited) @@Luke Thanks for your quick answer. At this time, I'm not sure it's an issue, or a regular behavior. Please find in attached file the server logs. Client web: Chrome version 58.0.3029.110 Server : Ubuntu 15.04 Emby Version 3.2.20.0 Movie: movie.mkv Start playing at 23:11 root@emby:~# ps -aux | grep ffmpeg emby 28597 37.6 0.7 118796 24200 ? Rl 23:12 0:02 /var/lib/emby-server/ffmpeg/20160215/ffmpeg -f matroska -codec:0 h264 -codec:1 ac3 -codec:2 ac3 -i file:/mnt/smb/media/Films/Emby/movie.mkv -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:2 -map -0:s -codec:v:0 copy -bsf:v h264_mp4toannexb -copyts -vsync -1 -codec:a:0 aac -strict experimental -ac 6 -ab 384000 -f segment -max_delay 5000000 -avoid_negative_ts disabled -start_at_zero -segment_time 6 -individual_header_trailer 0 -segment_format mpegts -segment_list_type m3u8 -segment_start_number 0 -segment_list /var/lib/emby-server/transcoding-temp/1731c1170461e4658f806109f8ec5f8f.m3u8 -y /var/lib/emby-server/transcoding-temp/1731c1170461e4658f806109f8ec5f8f%d.ts root 28609 0.0 0.0 9492 2048 pts/0 S+ 23:12 0:00 grep --color=auto ffmpeg Switch audio at 23:12 root@emby:~# ps -aux | grep ffmpeg emby 28597 35.6 0.7 118940 24464 ? Rl 23:12 0:12 /var/lib/emby-server/ffmpeg/20160215/ffmpeg -f matroska -codec:0 h264 -codec:1 ac3 -codec:2 ac3 -i file:/mnt/smb/media/Films/Emby/movie.mkv -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:2 -map -0:s -codec:v:0 copy -bsf:v h264_mp4toannexb -copyts -vsync -1 -codec:a:0 aac -strict experimental -ac 6 -ab 384000 -f segment -max_delay 5000000 -avoid_negative_ts disabled -start_at_zero -segment_time 6 -individual_header_trailer 0 -segment_format mpegts -segment_list_type m3u8 -segment_start_number 0 -segment_list /var/lib/emby-server/transcoding-temp/1731c1170461e4658f806109f8ec5f8f.m3u8 -y /var/lib/emby-server/transcoding-temp/1731c1170461e4658f806109f8ec5f8f%d.ts emby 28613 64.3 0.7 118584 24200 ? Rl 23:12 0:01 /var/lib/emby-server/ffmpeg/20160215/ffmpeg -f matroska -codec:0 h264 -codec:1 ac3 -codec:2 ac3 -i file:/mnt/smb/media/Films/Emby/movie.mkv -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 copy -bsf:v h264_mp4toannexb -copyts -vsync -1 -codec:a:0 aac -strict experimental -ac 6 -ab 384000 -f segment -max_delay 5000000 -avoid_negative_ts disabled -start_at_zero -segment_time 6 -individual_header_trailer 0 -segment_format mpegts -segment_list_type m3u8 -segment_start_number 0 -segment_list /var/lib/emby-server/transcoding-temp/1698497d157806c2603243858782da77.m3u8 -y /var/lib/emby-server/transcoding-temp/1698497d157806c2603243858782da77%d.ts root 28623 0.0 0.0 9496 2064 pts/0 R+ 23:12 0:00 grep --color=auto ffmpeg 23:12 Switching audio is ok (around 12 seconds later) root@emby:~# ps -aux | grep ffmpeg emby 28597 34.0 0.7 118940 24464 ? Dl 23:12 0:14 /var/lib/emby-server/ffmpeg/20160215/ffmpeg -f matroska -codec:0 h264 -codec:1 ac3 -codec:2 ac3 -i file:/mnt/smb/media/Films/Emby/movie.mkv -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:2 -map -0:s -codec:v:0 copy -bsf:v h264_mp4toannexb -copyts -vsync -1 -codec:a:0 aac -strict experimental -ac 6 -ab 384000 -f segment -max_delay 5000000 -avoid_negative_ts disabled -start_at_zero -segment_time 6 -individual_header_trailer 0 -segment_format mpegts -segment_list_type m3u8 -segment_start_number 0 -segment_list /var/lib/emby-server/transcoding-temp/1731c1170461e4658f806109f8ec5f8f.m3u8 -y /var/lib/emby-server/transcoding-temp/1731c1170461e4658f806109f8ec5f8f%d.ts emby 28613 87.8 0.7 119080 24464 ? Rl 23:12 0:08 /var/lib/emby-server/ffmpeg/20160215/ffmpeg -f matroska -codec:0 h264 -codec:1 ac3 -codec:2 ac3 -i file:/mnt/smb/media/Films/Emby/movie.mkv -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 copy -bsf:v h264_mp4toannexb -copyts -vsync -1 -codec:a:0 aac -strict experimental -ac 6 -ab 384000 -f segment -max_delay 5000000 -avoid_negative_ts disabled -start_at_zero -segment_time 6 -individual_header_trailer 0 -segment_format mpegts -segment_list_type m3u8 -segment_start_number 0 -segment_list /var/lib/emby-server/transcoding-temp/1698497d157806c2603243858782da77.m3u8 -y /var/lib/emby-server/transcoding-temp/1698497d157806c2603243858782da77%d.ts root 28625 0.0 0.0 9496 1992 pts/0 R+ 23:12 0:00 grep --color=auto ffmpeg 23:13 still two ffmpeg threads root@emby:~# ps -aux | grep ffmpeg emby 28597 27.9 0.7 118940 24464 ? Dl 23:12 0:25 /var/lib/emby-server/ffmpeg/20160215/ffmpeg -f matroska -codec:0 h264 -codec:1 ac3 -codec:2 ac3 -i file:/mnt/smb/media/Films/Emby/movie.mkv -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:2 -map -0:s -codec:v:0 copy -bsf:v h264_mp4toannexb -copyts -vsync -1 -codec:a:0 aac -strict experimental -ac 6 -ab 384000 -f segment -max_delay 5000000 -avoid_negative_ts disabled -start_at_zero -segment_time 6 -individual_header_trailer 0 -segment_format mpegts -segment_list_type m3u8 -segment_start_number 0 -segment_list /var/lib/emby-server/transcoding-temp/1731c1170461e4658f806109f8ec5f8f.m3u8 -y /var/lib/emby-server/transcoding-temp/1731c1170461e4658f806109f8ec5f8f%d.ts emby 28613 45.3 0.7 119080 24464 ? Dl 23:12 0:27 /var/lib/emby-server/ffmpeg/20160215/ffmpeg -f matroska -codec:0 h264 -codec:1 ac3 -codec:2 ac3 -i file:/mnt/smb/media/Films/Emby/movie.mkv -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 copy -bsf:v h264_mp4toannexb -copyts -vsync -1 -codec:a:0 aac -strict experimental -ac 6 -ab 384000 -f segment -max_delay 5000000 -avoid_negative_ts disabled -start_at_zero -segment_time 6 -individual_header_trailer 0 -segment_format mpegts -segment_list_type m3u8 -segment_start_number 0 -segment_list /var/lib/emby-server/transcoding-temp/1698497d157806c2603243858782da77.m3u8 -y /var/lib/emby-server/transcoding-temp/1698497d157806c2603243858782da77%d.ts root 28641 0.0 0.0 9496 2052 pts/0 R+ 23:13 0:00 grep --color=auto ffmpeg 23:14 finally one ffmpeg tread root@emby:~# ps -aux | grep ffmpeg emby 28613 38.7 0.8 119316 24728 ? Dl 23:12 0:34 /var/lib/emby-server/ffmpeg/20160215/ffmpeg -f matroska -codec:0 h264 -codec:1 ac3 -codec:2 ac3 -i file:/mnt/smb/media/Films/Emby/movie.mkv -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 copy -bsf:v h264_mp4toannexb -copyts -vsync -1 -codec:a:0 aac -strict experimental -ac 6 -ab 384000 -f segment -max_delay 5000000 -avoid_negative_ts disabled -start_at_zero -segment_time 6 -individual_header_trailer 0 -segment_format mpegts -segment_list_type m3u8 -segment_start_number 0 -segment_list /var/lib/emby-server/transcoding-temp/1698497d157806c2603243858782da77.m3u8 -y /var/lib/emby-server/transcoding-temp/1698497d157806c2603243858782da77%d.ts root 28652 0.0 0.0 9492 2052 pts/0 S+ 23:14 0:00 grep --color=auto ffmpeg root@emby:~# emby.log Edited June 26, 2017 by nague Link to comment Share on other sites More sharing options...
Luke 37345 Posted June 28, 2017 Share Posted June 28, 2017 @@nague, ok yes there are no errors here. we have to start a new transcoding session so that just might be taking a little time. Link to comment Share on other sites More sharing options...
nague 5 Posted June 29, 2017 Author Share Posted June 29, 2017 @@nague, ok yes there are no errors here. we have to start a new transcoding session so that just might be taking a little time. @Luke the new transcoding session start immediately. The issue here is the previous one which takes almost 2 minutes to stop. It looks like the orphan ffmpeg issue descibe here don't you think ? Link to comment Share on other sites More sharing options...
Luke 37345 Posted June 29, 2017 Share Posted June 29, 2017 Hi @@nague, in order to respond to that I need to see the complete Emby Server log, rather than a snippet, thanks. 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