PS4 now support DLNA!
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply
Re: PS4 now support DLNA!
Hi Creighton,creighton wrote:Tried both under forced transcoding with FFmpeg, the .flv worked and the .mkv failed as expected.SubJunk wrote:Thanks for the logsI'm very confused now since it seems to me that we are doing the exact same thing in both cases, but the PS4 only likes one. I've made a new build with extra logging to try to uncover what the difference is. Can you please try both files the same way with this version?
http://www.spirton.com/uploads/UMS/UMS-3b723fa.exe
From taking a peek into the log, it seems the command for the .mkv is missing some pipe information? Obviously I know nothing about the underlying code here, just taking a stab in the dark.Code: Select all
C:\Program Files (x86)\Universal Media Server\win32\ffmpeg.exe -fflags +genpts -y -loglevel info -i Z:\test\flv1.flv -ab 384k -c:a ac3 -c:v copy -bsf:v h264_mp4toannexb -f mpegts \\.\pipe\ffmpegvideo_48_1436194527665 C:\Program Files (x86)\Universal Media Server\win32\ffmpeg.exe -i Z:\test\flv1.mkv -vframes 1 -c:v copy -f h264 -bsf h264_mp4toannexb -an -y pipe:
That second FFmpeg command isn't the transcoding one; they are identical. I've copied the following info from the debug log hoping that there would be a difference but there isn't, so I guess there is some other change we aren't logging or I'm not looking at:
flv1.mkv:
Code: Select all
<item id="68" parentID="31" restricted="true">
<dc:title>
[FFmpeg] {Audio: AAC ()}
</dc:title>
<res xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/" protocolInfo="http-get:*:video/mpeg:DLNA.ORG_PN=AVC_TS_MP_HD_AC3_ISO;DLNA.ORG_OP=10" duration="00:41:07.00" resolution="432x240" bitrate="54474" nrAudioChannels="2" sampleFrequency="44100">
http://192.168.1.100:5001/get/65/flv1.mkv
</res>
<upnp:albumArtURI xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/" dlna:profileID="JPEG_TN">
http://192.168.1.100:5001/get/65/thumbnail0000flv1.mkv
</upnp:albumArtURI>
<upnp:albumArtURI xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/" dlna:profileID="JPEG_SM">
http://192.168.1.100:5001/get/65/thumbnail0000flv1.mkv
</upnp:albumArtURI>
<dc:date>2015-07-05T13:15:48</dc:date>
<upnp:class>object.item.videoItem</upnp:class>
</item>
Starting C:\Program Files (x86)\Universal Media Server\win32\ffmpeg.exe -fflags +genpts -y -loglevel info -i Z:\test\flv1.mkv -ab 384k -c:a ac3 -c:v copy -bsf:v h264_mp4toannexb -f mpegts \\.\pipe\ffmpegvideo_45_1436194571972
Code: Select all
<item id="69" parentID="28" restricted="true">
<dc:title>
[FFmpeg] {Audio: AAC ()}
</dc:title>
<res xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/" protocolInfo="http-get:*:video/mpeg:DLNA.ORG_PN=AVC_TS_MP_HD_AC3_ISO;DLNA.ORG_OP=10" duration="00:41:07.00" resolution="432x240" bitrate="55207" nrAudioChannels="2" sampleFrequency="44100">
http://192.168.1.100:5001/get/66/flv1.flv
</res>
<upnp:albumArtURI xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/" dlna:profileID="JPEG_TN">
http://192.168.1.100:5001/get/66/thumbnail0000flv1.flv
</upnp:albumArtURI>
<upnp:albumArtURI xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/" dlna:profileID="JPEG_SM">
http://192.168.1.100:5001/get/66/thumbnail0000flv1.flv
</upnp:albumArtURI>
<dc:date>2014-11-10T19:12:53</dc:date>
<upnp:class>object.item.videoItem</upnp:class>
</item>
Starting C:\Program Files (x86)\Universal Media Server\win32\ffmpeg.exe -fflags +genpts -y -loglevel info -i Z:\test\flv1.flv -ab 384k -c:a ac3 -c:v copy -bsf:v h264_mp4toannexb -f mpegts \\.\pipe\ffmpegvideo_48_1436194527665
Re: PS4 now support DLNA!
Shot in the dark (defined in renderer.conf):
I know some renderers internally parses files diferently, depending on the extension (not only dependent on ProtocolInfo).
So file with mpeg stream inside, with mpeg defined in ProtocolInfo but with invalid extension, some renderers play ok, others not.
So you can try to force all files are sent with mpeg or flv extension to see the difference on PS4.
As SubJunk wrote, the info sent in response seems similar so if file itself is also similar, problem can be extension [or nuances in transcoded file (FFmpeg outputs different file depending on input file)]
Code: Select all
# Specified extension will be added to every file shared by UMS
# Default: ""
UseSameExtension =
So file with mpeg stream inside, with mpeg defined in ProtocolInfo but with invalid extension, some renderers play ok, others not.
So you can try to force all files are sent with mpeg or flv extension to see the difference on PS4.
As SubJunk wrote, the info sent in response seems similar so if file itself is also similar, problem can be extension [or nuances in transcoded file (FFmpeg outputs different file depending on input file)]
Re: PS4 now support DLNA!
Good idea, here's a build that tries that:
http://www.spirton.com/uploads/UMS/UMS-20c8c76.exe
http://www.spirton.com/uploads/UMS/UMS-20c8c76.exe
Re: PS4 now support DLNA!
Well, I think ExSport is onto something good with that idea. The newest test build didn't seem to make a difference, but then I thought to change my testing method.SubJunk wrote:Good idea, here's a build that tries that
Here's the files I used and the results:
Code: Select all
- [flv1.flv] [H264/AAC] - transcode worked with FFmpeg!
- [flv1.mkv] [H264/AAC] - transcode failed.
- [flv1-mkv_rename.flv] - Exact file copy of flv1.mkv, with file extension changed to .flv - transcode worked with FFmpeg!
- [transcode1.mkv] [H264/DTS(Eng)/DTS(Fre)] - transcode failed.
- [transcode1-mkv_rename.flv] - Exact file copy of transcode1.mkv, with file extension changed to .flv - transcode worked with FFmpeg!
- Attachments
-
- 20c8c76a0.zip
- (70.4 KiB) Downloaded 1291 times
Re: PS4 now support DLNA!
So the answer is:
https://github.com/mine260309/ps3medias ... -119219496
- SubJunk incorrectly implemented the tip (Sorry SubJunk!, I know it can be bug in "UseSameExtension =" interpretation
)
- "UseSameExtension =" changes filename on display only and not in URL itself as I expected
https://github.com/mine260309/ps3medias ... -119219496
Re: PS4 now support DLNA!
Now tested (I don't have PS4) and I can confirm "UseSameExtension =" changes displayname only and not URL itself as I expected. 
It means SubJunk have to create another testbuild

It means SubJunk have to create another testbuild

Re: PS4 now support DLNA!
This is exciting! I'll make it in about 9 hours after work
In the meantime if you get a chance creighton can you please check if the same thing works for files that need the video to be transcoded, like the H.265 ones in the test suite, or any video with subtitles?

-
- Posts: 15
- Joined: Mon Nov 26, 2012 9:30 am
Re: PS4 now support DLNA!
Thanks for the ongoing work guys! My PS3 hasn't been retired.... yet! 

Re: PS4 now support DLNA!
Wasn't sure what you meant by a video with subtitles. I failed to mention before that my transcode1.mkv/flv file has internal subtitles. I tried selecting a FFmpeg option from the transcode folder that included subs, but it did not appear to be working (PS4 hung on the spinning loading circle for a very long time, UMS did not seem to be doing anything transcode-wise).SubJunk wrote:This is exciting! I'll make it in about 9 hours after workIn the meantime if you get a chance creighton can you please check if the same thing works for files that need the video to be transcoded, like the H.265 ones in the test suite, or any video with subtitles?
I also picked out a few videos from each category of the test suite and gave them an flv extension. Results...
Code: Select all
AVI-XviD-AC3-2ch - these working fine with FFmpeg
AVI-XviD-MP2-2ch
MKV-H264-FLAC-6ch
MKV-H264-MP2-2ch
MKV-H265-AC3-6ch - these only working with Mencoder
MKV-H265-DTS-6ch
MKV-H265-MP2-2ch
MKV-XviD-AACHE-2ch - these only working with Mencoder
MKV-XviD-AACLC-6ch
MKV-XviD-DTS-6ch
MP4-H264-AACHE-2ch - these working fine with FFmpeg
MP4-H264-AACHE-6ch
MP4-XviD-MP2-2ch - these only working with Mencoder
MP4-XviD-MP3-2ch
-
- Posts: 2
- Joined: Sun Jun 21, 2015 12:02 pm
Re: PS4 now support DLNA!
Interesting!
Using UMS-3b723fa.exe.
First attachment is a log trying to play "12 Monkeys.mkv" that I ripped with makemkv into a mkv container with the original mpgv (mpeg-2) encoding. Has failed with every UMS version including this one.
However, second log attachment is the PS4 playing the same file, simply renamed "12 Monkeys.ts" and it works! Without using the #TRANSCODING folder, too.
It seems that the PS4 is quite interested in the extension of the file it is playing. Which is weird since its still a mkv container; I don't pretend to know why this works.
Not sure this is the answer to all problems, but my biggest issue was that I couldn't play any of the DVDs I had ripped. Now I can. One step closer
Credit to mine260309 in the thread ExSport referred to:
https://github.com/mine260309/ps3medias ... -119219496
Using UMS-3b723fa.exe.
First attachment is a log trying to play "12 Monkeys.mkv" that I ripped with makemkv into a mkv container with the original mpgv (mpeg-2) encoding. Has failed with every UMS version including this one.
However, second log attachment is the PS4 playing the same file, simply renamed "12 Monkeys.ts" and it works! Without using the #TRANSCODING folder, too.
It seems that the PS4 is quite interested in the extension of the file it is playing. Which is weird since its still a mkv container; I don't pretend to know why this works.
Not sure this is the answer to all problems, but my biggest issue was that I couldn't play any of the DVDs I had ripped. Now I can. One step closer

Credit to mine260309 in the thread ExSport referred to:
https://github.com/mine260309/ps3medias ... -119219496
- Attachments
-
- ums_dbg_3b723fa1a-works.zip
- Play same 12 Monkeys.mkv, but just renamed with .ts extension. Works!
- (33.84 KiB) Downloaded 1307 times
-
- ums_dbg_3b723fa1a-fail.zip
- Trying to play 12 Monkeys.mkv, fails.
- (32.47 KiB) Downloaded 1382 times