fengshaun 0 Posted December 17, 2015 Posted December 17, 2015 (edited) Hi, When I try watching a tv show from my collection on emby's web client, I only get speech audio from the right speaker, but the laugh tracks and background music play through both speakers. The audio is also noticeably softer (lower volume). When I try watching the same show through emby's windows client (emby theatre), the audio sounds just fine. This makes me think that transcoding is doing something to the audio which it shouldn't, but I can't figure out how to resolve this issue. Is there a way to fix the audio issues perhaps by changing the transcoding options somewhere? I couldn't find any way to change transcoding parameters neither would I know how they should be changed to fix this audio issue. Thanks. {"Protocol":"File","Id":"672bad259f19493ff72c57c421292508","Path":"/mpool/tvshows/Show/Show S01E02.mkv","Type":"Default","Container":"mkv","Name":"1080P/H264/AC3","RunTimeTicks":12905920000,"ReadAtNativeFramerate":false,"SupportsTranscoding":true,"SupportsDirectStream":true,"SupportsDirectPlay":true,"RequiresOpening":false,"RequiresClosing":false,"VideoType":"VideoFile","MediaStreams":[{"Codec":"h264","Language":"eng","IsInterlaced":false,"BitRate":7937968,"BitDepth":8,"RefFrames":4,"IsDefault":true,"IsForced":false,"Height":1066,"Width":1920,"AverageFrameRate":23.97602,"RealFrameRate":23.97602,"Profile":"High","Type":"Video","AspectRatio":"16:9","Index":0,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"PixelFormat":"yuv420p","Level":41,"IsAnamorphic":false,"IsCabac":false},{"Codec":"ac3","IsInterlaced":false,"ChannelLayout":"5.1","BitRate":384000,"Channels":6,"SampleRate":48000,"IsDefault":true,"IsForced":false,"Type":"Audio","Index":1,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Level":0}],"PlayableStreamFileNames":[],"Formats":[],"Bitrate":7937968,"RequiredHttpHeaders":{}} /usr/local/bin/ffmpeg -ss 00:03:51.000 -i file:"/mpool/tvshows/Show/Show S01E02.mkv" -map_metadata -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 libx264 -pix_fmt yuv420p -preset superfast -crf 23 -b:v 7937968 -maxrate 7937968 -bufsize 15875936 -vsync vfr -profile:v high -level 41 -force_key_frames "expr:gte(t,n_forced*3)" -vf "scale=trunc(oh*a/2)*2:min(ih\,1080)" -flags -global_header -sc_threshold 0 -output_ts_offset 00:03:51.000 -codec:a:0 aac -strict experimental -ac 6 -ab 320000 -af "adelay=1,aresample=async=1" -hls_time 3 -start_number 77 -hls_list_size 0 -y "/var/db/emby-server/transcoding-temp/c893d6372de4d5435a4b48f1993077af.m3u8" ffmpeg version 2.8.3 Copyright (c) 2000-2015 the FFmpeg developers built with FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512 configuration: --prefix=/usr/local --mandir=/usr/local/man --datadir=/usr/local/share/ffmpeg --pkgconfigdir=/usr/local/libdata/pkgconfig --enable-shared --enable-gpl --enable-postproc --enable-avfilter --enable-avresample --enable-pthreads --disable-libstagefright-h264 --disable-libutvideo --disable-libsoxr --cc=cc --extra-cflags='-msse -I/usr/local/include/vorbis -I/usr/local/include' --extra-ldflags='-L/usr/local/lib ' --extra-libs=-lpthread --disable-libaacplus --disable-indev=alsa --disable-outdev=alsa --disable-libopencore-amrnb --disable-libopencore-amrwb --enable-libass --disable-libbs2b --disable-libcaca --disable-libcdio --disable-libcelt --disable-libdc1394 --disable-debug --disable-htmlpages --enable-libfaac --disable-libfdk-aac --enable-ffserver --disable-libflite --disable-fontconfig --disable-libfreetype --disable-frei0r --disable-libfribidi --disable-libgme --disable-libgsm --enable-iconv --disable-libilbc --disable-indev=jack --disable-ladspa --enable-libmp3lame --disable-libbluray --disable-libv4l2 --disable-indev=v4l2 --disable-outdev=v4l2 --enable-mmx --disable-libmodplug --disable-openal --disable-indev=openal --disable-opencl --disable-libopencv --disable-opengl --enable-libopenh264 --enable-libopenjpeg --disable-libopus --disable-libpulse --disable-indev=pulse --disable-outdev=pulse --disable-libquvi --enable-runtime-cpudetect --enable-librtmp --enable-libschroedinger --disable-ffplay --disable-outdev=sdl --disable-libsmbclient --disable-libsnappy --disable-libspeex --enable-sse --disable-libssh --enable-libtheora --disable-libtwolame --disable-vaapi --disable-vdpau --disable-libvidstab --enable-libvorbis --disable-libvo-aacenc --disable-libvo-amrwbenc --enable-libvpx --disable-libwavpack --disable-libwebp --disable-x11grab --enable-libx264 --enable-libx265 --disable-libxcb --enable-libxvid --disable-outdev=xv --disable-libzmq --disable-libzvbi --disable-gnutls --enable-openssl --enable-version3 --enable-nonfree libavutil 54. 31.100 / 54. 31.100 libavcodec 56. 60.100 / 56. 60.100 libavformat 56. 40.101 / 56. 40.101 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 40.101 / 5. 40.101 libavresample 2. 1. 0 / 2. 1. 0 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 2.101 / 1. 2.101 libpostproc 53. 3.100 / 53. 3.100 Input #0, matroska,webm, from 'file:/mpool/tvshows/Show/Show S01E02.mkv': Metadata: encoder : libebml v1.3.1 + libmatroska v1.4.2 creation_time : 2015-12-11 05:55:02 Duration: 00:21:30.59, start: 0.000000, bitrate: 7937 kb/s Stream #0:0(eng): Video: h264 (High), yuv420p, 1920x1066, SAR 1:1 DAR 960:533, 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default) Metadata: BPS : 7555803 BPS-eng : 7555803 DURATION : 00:21:29.956000000 DURATION-eng : 00:21:29.956000000 NUMBER_OF_FRAMES: 30928 NUMBER_OF_FRAMES-eng: 30928 NUMBER_OF_BYTES : 1218331678 NUMBER_OF_BYTES-eng: 1218331678 _STATISTICS_WRITING_APP: mkvmerge v8.4.0 ('A better way to fly') 64bit _STATISTICS_WRITING_APP-eng: mkvmerge v8.4.0 ('A better way to fly') 64bit _STATISTICS_WRITING_DATE_UTC: 2015-12-11 05:55:02 _STATISTICS_WRITING_DATE_UTC-eng: 2015-12-11 05:55:02 _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES Stream #0:1: Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s (default) Metadata: BPS : 384000 BPS-eng : 384000 DURATION : 00:21:30.592000000 DURATION-eng : 00:21:30.592000000 NUMBER_OF_FRAMES: 40331 NUMBER_OF_FRAMES-eng: 40331 NUMBER_OF_BYTES : 61948416 NUMBER_OF_BYTES-eng: 61948416 _STATISTICS_WRITING_APP: mkvmerge v8.4.0 ('A better way to fly') 64bit _STATISTICS_WRITING_APP-eng: mkvmerge v8.4.0 ('A better way to fly') 64bit _STATISTICS_WRITING_DATE_UTC: 2015-12-11 05:55:02 _STATISTICS_WRITING_DATE_UTC-eng: 2015-12-11 05:55:02 _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES [libx264 @ 0x808c9ff00] using SAR=1/1 [libx264 @ 0x808c9ff00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2 [libx264 @ 0x808c9ff00] profile High, level 4.1 Output #0, hls, to '/var/db/emby-server/transcoding-temp/c893d6372de4d5435a4b48f1993077af.m3u8': Metadata: encoder : Lavf56.40.101 Stream #0:0: Video: h264 (libx264), yuv420p, 1920x1066 [SAR 1:1 DAR 960:533], q=-1--1, 7937 kb/s, 23.98 fps, 90k tbn, 23.98 tbc (default) Metadata: encoder : Lavc56.60.100 libx264 Stream #0:1: Audio: aac, 48000 Hz, 5.1, fltp, 320 kb/s (default) Metadata: encoder : Lavc56.60.100 aac Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264)) Stream #0:1 -> #0:1 (ac3 (native) -> aac (native)) Press [q] to stop, [?] for help frame= 40 fps=0.0 q=24.0 size=N/A time=00:00:02.15 bitrate=N/A frame= 108 fps=108 q=23.0 size=N/A time=00:00:05.22 bitrate=N/A frame= 127 fps= 85 q=21.0 size=N/A time=00:00:05.67 bitrate=N/A frame= 187 fps= 93 q=22.0 size=N/A time=00:00:08.29 bitrate=N/A frame= 259 fps=103 q=23.0 size=N/A time=00:00:11.24 bitrate=N/A frame= 319 fps=106 q=24.0 size=N/A time=00:00:13.86 bitrate=N/A frame= 387 fps=110 q=23.0 size=N/A time=00:00:16.78 bitrate=N/A frame= 460 fps=115 q=23.0 size=N/A time=00:00:19.62 bitrate=N/A ... video:102299kB audio:7653kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown [libx264 @ 0x808c9ff00] frame I:66 Avg QP:18.11 size:142607 [libx264 @ 0x808c9ff00] frame P:1388 Avg QP:19.48 size: 41636 [libx264 @ 0x808c9ff00] frame B:3262 Avg QP:20.85 size: 11512 [libx264 @ 0x808c9ff00] consecutive B-frames: 5.8% 4.3% 5.2% 84.7% [libx264 @ 0x808c9ff00] mb I I16..4: 10.3% 43.1% 46.6% [libx264 @ 0x808c9ff00] mb P I16..4: 6.0% 8.2% 2.1% P16..4: 66.2% 0.0% 0.0% 0.0% 0.0% skip:17.6% [libx264 @ 0x808c9ff00] mb B I16..4: 0.9% 0.6% 0.1% B16..8: 26.3% 0.0% 0.0% direct:15.7% skip:56.5% L0:38.5% L1:49.5% BI:11.9% [libx264 @ 0x808c9ff00] 8x8 transform intra:46.9% inter:51.3% [libx264 @ 0x808c9ff00] coded y,uvDC,uvAC intra: 56.2% 73.9% 34.7% inter: 10.9% 24.9% 0.9% [libx264 @ 0x808c9ff00] i16 v,h,dc,p: 47% 23% 20% 9% [libx264 @ 0x808c9ff00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 21% 20% 22% 6% 6% 6% 6% 6% 8% [libx264 @ 0x808c9ff00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 26% 10% 7% 6% 7% 7% 6% 8% [libx264 @ 0x808c9ff00] i8c dc,h,v,p: 34% 26% 27% 12% [libx264 @ 0x808c9ff00] Weighted P-Frames: Y:0.7% UV:0.5% [libx264 @ 0x808c9ff00] kb/s:4260.56 Edited December 17, 2015 by fengshaun
Luke 39631 Posted December 17, 2015 Posted December 17, 2015 i can't reproduce this problem but you could try running the ffmpeg command line outside of emby and testing the segments manually. you could try various changes such as audio channels, switching aac to mp3, etc.
fengshaun 0 Posted December 18, 2015 Author Posted December 18, 2015 Alright, as long as it's just me, then I can probably figure out what wrong. Would you please post your ffmpeg configuration and command line in one of your transcoding logs so I have something to compare to get started? Thanks!
Luke 39631 Posted December 18, 2015 Posted December 18, 2015 the command line is in the log above: /usr/local/bin/ffmpeg -ss 00:03:51.000 -i file:"/mpool/tvshows/Show/Show S01E02.mkv" -map_metadata -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 libx264 -pix_fmt yuv420p -preset superfast -crf 23 -b:v 7937968 -maxrate 7937968 -bufsize 15875936 -vsync vfr -profile:v high -level 41 -force_key_frames "expr:gte(t,n_forced*3)" -vf "scale=trunc(oh*a/2)*2:min(ih\,1080)" -flags -global_header -sc_threshold 0 -output_ts_offset 00:03:51.000 -codec:a:0 aac -strict experimental -ac 6 -ab 320000 -af "adelay=1,aresample=async=1" -hls_time 3 -start_number 77 -hls_list_size 0 -y "/var/db/emby-server/transcoding-temp/c893d6372de4d5435a4b48f1993077af.m3u8" a couple changes you could try are reducing audio channels: /usr/local/bin/ffmpeg -ss 00:03:51.000 -i file:"/mpool/tvshows/Show/Show S01E02.mkv" -map_metadata -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 libx264 -pix_fmt yuv420p -preset superfast -crf 23 -b:v 7937968 -maxrate 7937968 -bufsize 15875936 -vsync vfr -profile:v high -level 41 -force_key_frames "expr:gte(t,n_forced*3)" -vf "scale=trunc(oh*a/2)*2:min(ih\,1080)" -flags -global_header -sc_threshold 0 -output_ts_offset 00:03:51.000 -codec:a:0 aac -strict experimental -ac 2 -ab 128000 -af "adelay=1,aresample=async=1" -hls_time 3 -start_number 77 -hls_list_size 0 -y "/var/db/emby-server/transcoding-temp/c893d6372de4d5435a4b48f1993077af.m3u8" and switching to mp3 /usr/local/bin/ffmpeg -ss 00:03:51.000 -i file:"/mpool/tvshows/Show/Show S01E02.mkv" -map_metadata -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 libx264 -pix_fmt yuv420p -preset superfast -crf 23 -b:v 7937968 -maxrate 7937968 -bufsize 15875936 -vsync vfr -profile:v high -level 41 -force_key_frames "expr:gte(t,n_forced*3)" -vf "scale=trunc(oh*a/2)*2:min(ih\,1080)" -flags -global_header -sc_threshold 0 -output_ts_offset 00:03:51.000 -codec:a:0 libmp3lame -ac 6 -ab 320000 -af "adelay=1,aresample=async=1" -hls_time 3 -start_number 77 -hls_list_size 0 -y "/var/db/emby-server/transcoding-temp/c893d6372de4d5435a4b48f1993077af.m3u8"
fengshaun 0 Posted December 18, 2015 Author Posted December 18, 2015 Thanks! It seems it's the transcoding that's the problem. I have since tried to watch the same video with firefox on linux and windows and chrome on windows. Firefox on linux and chrome on windows are fine, but firefox on windows is not. firefox on linux transcodes to vp9 video and and vorbis audio. firefox on windows and chrome on windows have identical ffmpeg lines and try to do h264 using libx264 and aac audio: -map_metadata -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 libx264 -pix_fmt yuv420p -preset superfast -crf 23 -b:v 2168083 -maxrate 2168083 -bufsize 4336166 -vsync vfr -profile:v high -level 41 -force_key_frames "expr:gte(t,n_forced*3)" -vf "scale=min(iw\,1280):trunc(ow/dar/2)*2" -flags -global_header -sc_threshold 0 -output_ts_offset 00:13:51.000 -codec:a:0 aac -strict experimental -ac 6 -ab 320000 -af "adelay=1,aresample=async=1" -hls_time 3 -start_number 277 -hls_list_size 0 -y So, is it possible to change ffmpeg options in emby?
fengshaun 0 Posted December 18, 2015 Author Posted December 18, 2015 (edited) Yes, sorry. aac with -ac 2 plays fine in vlc in both windows and linux. mp3lame doesn't support -ac 6, so I had to remove -ac 6 and then it played fine everywhere too. both play fine in both vlc on android and android's vanilla video player. Did you want any other information? edit: both aac -ac 2 and mp3lame work with mpv on linux. edit2: both also work with windows media player on windows. Edited December 18, 2015 by fengshaun
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