Jump to content

Force AC3 track from multi-audio m4v


mbnwa

Recommended Posts

mbnwa

It would seem my LG Smart TV is transcoding on Play To vs Direct Play - I did add m4v to the default LG Smart TV profile and it now shows under the custom section - maybe it's transcoding on some other format in the file or is this normal even with direct play?

 

Can some sort of regex be used to grep the mapping of the ac3 vs aac stream and output the ac3 stream in place of the first audio track if the device DLNA profile supports ac3 as a direct play format?

 

 

 Url: http://192.168.60.10...rowser/Sessions
2014-05-03 18:19:17.0310 Debug - HttpServer: HTTP POST http://192.168.60.10...Command=PlayNow
2014-05-03 18:19:17.0400 Debug - Dlna: [TV][LG]42LA6200-UA - Received PlayRequest: PlayNow
2014-05-03 18:19:17.0400 Debug - Dlna: Found matching device profile: LG Smart TV
2014-05-03 18:19:17.0880 Debug - Dlna: [TV][LG]42LA6200-UA - Playlist created
2014-05-03 18:19:17.0880 Debug - Dlna: [TV][LG]42LA6200-UA - Playing 1 items
2014-05-03 18:19:17.0880 Debug - Dlna: [TV][LG]42LA6200-UA - SetAvTransport Uri: http://192.168.60.10...;1920;1080;0;41 DlnaHeaders: DLNA.2014-05-03 18:19:17.0990 Info - App: HttpClientManager POST:http://192.168.60.13...0b9/control.xml
2014-05-03 18:19:17.1941 Info - App: HttpClientManager POST: http://192.168.60.13...0b9/control.xml
2014-05-03 18:19:17.8956 Debug - HttpServer: HTTP GET http://192.168.60.10...;1920;1080;0;41
2014-05-03 18:19:17.9396 Info - App: C:\Users\Michael\AppData\Roaming\MediaBrowser-Server\ffmpeg\20140304\ffmpeg.exe -fflags genpts -i file:"S:\Media Storage\TV Shows\Human Target\Season 2\01 Ilsa Pucci (1080p HD).m4v" -map 0:1 -map 0:0 -map -0:s -vcodec copy -bsf h264_mp4toannexb -map_metadata -1 -threads 2 -acodec ac3 -ac 2 -ab 128000 -af "adelay=1,aresample=async=1" "C:\Mediabrowser DB\Transcode\f98de138-8775-6930-047f-e9faeddf6fd5.ts"
2014-05-ORG_PN=MPEG_PS_NTSC;DLNA.ORG_OP=10;DLNA.ORG_CI=1;DLNA.ORG_FLAGS=000000000150000000

 

ffprobe -i output from above TV show example:

    Duration: 00:42:56.77, start: 0.000000, bitrate: 5632 kb/s
    Stream #0:0(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 157 kb/s (default)
    Metadata:
      creation_time   : 2012-01-22 19:11:38
      handler_name    : Apple Sound Media Handler
    Stream #0:1(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [sAR 1:1 DAR 16:9], 5081 kb/s, 23.98 fps, 23.98 tbr, 2997 tbn, 5994 tbc (default)
    Metadata:
      creation_time   : 2012-01-22 19:11:38
      handler_name    : Apple Video Media Handler
    Stream #0:2(eng): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), fltp, 384 kb/s
    Metadata:
      creation_time   : 2012-01-22 19:11:38
      handler_name    : Apple Sound Media Handler
    Stream #0:3: Video: mjpeg, yuvj444p(pc), 640x640 [sAR 72:72 DAR 1:1], 90k tbr, 90k tbn, 90k tbc
 
ffprobe -i output from another TV show (this time the video is 0:0 and aac track is 0:1 however the ac3 track is still 0:2):
     Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1436x1080 [sAR 1:1 DAR 359:270], 10911 kb/s, 23.98 fps, 47.95 tbr, 90k tbn, 180k tbc (default)
    Metadata:
      creation_time   : 2013-12-18 04:11:57
    Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 159 kb/s (default)
    Metadata:
      creation_time   : 2013-12-18 04:11:57
    Stream #0:2(eng): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), fltp, 640 kb/s
    Metadata:
Edited by mbnwa
Link to comment
Share on other sites

This is a transcode not a direct play. It's using the original video but transcoding the audio.

 

Looking at the LG profile, there's nothing in it about direct playing m4v files. What you could do is try adding that. Make it identical to mp4. Let me know if it works, and if so, I'll add it to the next server release.

Link to comment
Share on other sites

mbnwa

The below screenshots is currently how I had the server configured when I took the logs ( I do have a space after the , and before m4v should it all be ran together? I.E it's mp4, m4v vs mp4,m4v

post-3520-0-20845200-1399174484_thumb.png

post-3520-0-09949500-1399174492_thumb.png

Edited by mbnwa
Link to comment
Share on other sites

mbnwa

Ok so that did in fact stop the transcoding from happening however It's still only playing the AAC track and not the AC3 track. At least adding m4v to the container type does stop the transcode

 

Also another oddity came up in the logs this seems to repeat a few times during playback and the web page on my iPad can not play media file or something to that regard but the stream kept playing on the TV

 

2014-05-03 20:46:31.1283 Error - HttpServer: Error receiving web socket message
The remote party closed the WebSocket connection without completing the close handshake.
System.Net.WebSockets.WebSocketException
  at System.Net.WebSockets.WebSocketBase.WebSocketOperation.<Process>d__47.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
  at System.Net.WebSockets.WebSocketBase.<ReceiveAsyncCore>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
  at MediaBrowser.Server.Implementations.HttpServer.NativeWebSocket.<ReceiveBytesAsync>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
  at MediaBrowser.Server.Implementations.HttpServer.NativeWebSocket.<Receive>d__0.MoveNext()
Edited by mbnwa
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...