No Audio with VLC Encoder on PS3

For help and support with PS3 Media Server in general
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply.

No Audio with VLC Encoder on PS3

Postby mastro » Wed May 22, 2013 9:56 pm

Hi,

I've an MKV video:

Code: Select all
General
Unique ID                                : 175204326088181688923547159269582376928 (0x83CF20346CCA8957BB5DDD1FD3910FE0)
Complete name                            :/tmp/my.mkv
Format                                   : Matroska
Format version                           : Version 1
File size                                : 220 MiB
Duration                                 : 22mn 45s
Overall bit rate                         : 1 350 Kbps
Encoded date                             : UTC 2009-04-19 12:01:32
Writing application                      : mkvmerge v2.0.2 ('You're My Flame') built on Feb 21 2007 23:40:55
Writing library                          : libebml v0.7.7 + libmatroska v0.8.1

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L4.0
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 8 frames
Codec ID                                 : V_MPEG4/ISO/AVC
Duration                                 : 22mn 45s
Nominal bit rate                         : 1 207 Kbps
Width                                    : 1 280 pixels
Height                                   : 720 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 23.976 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.055
Writing library                          : x264 core 67 r1139M 1024283
Encoding settings                        : cabac=1 / ref=8 / deblock=1:1:1 / analyse=0x3:0x133 / me=umh / subme=7 / psy_rd=0.6:0.0 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / chroma_qp_offset=-2 / threads=3 / nr=0 / decimate=1 / mbaff=0 / bframes=16 / b_pyramid=1 / b_adapt=1 / b_bias=0 / direct=3 / wpredb=0 / keyint=250 / keyint_min=25 / scenecut=40 / rc=2pass / bitrate=1207 / ratetol=1.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / pb_ratio=1.30 / aq=0
Language                                 : Japanese
Default                                  : Yes
Forced                                   : No

Audio
ID                                       : 2
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format profile                           : HE-AAC / LC
Codec ID                                 : A_AAC
Duration                                 : 22mn 45s
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 48.0 KHz / 24.0 KHz
Compression mode                         : Lossy
Language                                 : Japanese
Default                                  : Yes
Forced                                   : No

Text
ID                                       : 3
Format                                   : ASS
Codec ID                                 : S_TEXT/ASS
Codec ID/Info                            : Advanced Sub Station Alpha
Compression mode                         : Lossless
Language                                 : Italian
Default                                  : Yes
Forced                                   : No




I try to execute that on the PS3 but I get different results:
  • tsmuxer: video + audio, smooth but no subtitles
  • mencoder: video + audio + subtitle, but sluggish (keep interrupting itself)
  • ffmpeg: video + audio, smooth but no subtitles
  • vlc: video + subtitle, smooth but no audio

Now I think VLC would work just fine if it wouldn't for the fact that it is decoding to mp2a the audio stream, this is what VLC is decoding:
Code: Select all
vlc -I dummy "/tmp/my.mkv" --audio-track=0 --sub-track=0 --sout '#transcode{scale=1.0,strict-rc=,samplerate=0,soverlay=,channels=2,ab=128,vb=4096,keyint=16,acodec=mp2a,vcodec=mp2v,}:std{access=file,mux=ps,dst="/tmp/ps3mediaserver/VLC1369252572363.ps"}' "vlc://quit"


Code: Select all
General
Complete name                            : /tmp/my-vlc.mpg
Format                                   : MPEG-PS
File size                                : 598 MiB
Duration                                 : 22mn 44s
Overall bit rate mode                    : Variable
Overall bit rate                         : 3 677 Kbps

Video
ID                                       : 224 (0xE0)
Format                                   : MPEG Video
Commercial name                          : HDV 720p
Format version                           : Version 2
Format profile                           : Main@High 1440
Format settings, BVOP                    : No
Format settings, Matrix                  : Default
Format settings, GOP                     : N=12
Duration                                 : 22mn 44s
Bit rate mode                            : Variable
Bit rate                                 : 3 476 Kbps
Width                                    : 1 280 pixels
Height                                   : 720 pixels
Display aspect ratio                     : 16:9
Frame rate                               : 23.976 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Compression mode                         : Lossy
Bits/(Pixel*Frame)                       : 0.157
Time code of first frame                 : 00:00:00:00
Time code source                         : Group of pictures header
Stream size                              : 566 MiB (95%)

Audio
ID                                       : 192 (0xC0)
Format                                   : MPEG Audio
Format version                           : Version 2
Format profile                           : Layer 2
Duration                                 : 22mn 44s
Bit rate mode                            : Constant
Bit rate                                 : 128 Kbps
Channel(s)                               : 2 channels
Sampling rate                            : 24.0 KHz
Compression mode                         : Lossy
Delay relative to video                  : 44ms
Stream size                              : 20.8 MiB (3%)



PS3 doesn't support Mp2 audio format (according to PS3renderers/PS3.conf) and the acodec=mp2a is hardcoded in the sources: https://github.com/ps3mediaserver/ps3me ... .java#L100


With mencoder:

Code: Select all
mencoder -ss 0 "/tmp/my.mkv" -msglevel statusline=2 -oac lavc -of mpeg -mpegopts format=mpeg2:muxrate=500000:vbuf_size=1194:abuf_size=64 -ovc lavc -channels 6 -lavdopts debug=0:threads=2 -lavcopts autoaspect=1:vcodec=mpeg2video:acodec=ac3:abitrate=448:threads=2:keyint=5:vqscale=1:vqmin=2 -ass -ass-color ffffff00 -ass-border-color 00000000 -ass-font-scale 1.0 -font Arial -ass-force-style FontName=Arial,Outline=1,Shadow=0,MarginV=40 -nofontconfig -sid 0 -ofps 24000/1001 -lavdopts fast -mc 0 -noskip -af lavcresample=48000 -srate 48000 -o /tmp/ps3mediaserver/mencoder1369256103885


Obtaining a file of this format:
Code: Select all
General
Complete name                            : /tmp/my-mencoder.mpg
Format                                   : MPEG-PS
File size                                : 1.27 GiB
Duration                                 : 22mn 44s
Overall bit rate mode                    : Variable
Overall bit rate                         : 8 020 Kbps

Video
ID                                       : 224 (0xE0)
Format                                   : MPEG Video
Commercial name                          : HDV 720p
Format version                           : Version 2
Format profile                           : Main@High 1440
Format settings, BVOP                    : No
Format settings, Matrix                  : Default
Format settings, GOP                     : N=5
Duration                                 : 22mn 44s
Bit rate mode                            : Variable
Bit rate                                 : 7 412 Kbps
Width                                    : 1 280 pixels
Height                                   : 720 pixels
Display aspect ratio                     : 16:9
Frame rate                               : 23.976 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Compression mode                         : Lossy
Bits/(Pixel*Frame)                       : 0.335
Time code of first frame                 : 00:00:00:00
Time code source                         : Group of pictures header
Stream size                              : 1.18 GiB (92%)

Audio
ID                                       : 189 (0xBD)-128 (0x80)
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Mode extension                           : CM (complete main)
Format settings, Endianness              : Big
Muxing mode                              : DVD-Video
Duration                                 : 22mn 44s
Bit rate mode                            : Constant
Bit rate                                 : 448 Kbps
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 48.0 KHz
Bit depth                                : 16 bits
Compression mode                         : Lossy
Stream size                              : 72.9 MiB (6%)



Why is the audio converted to AC-3 if AAC is supported by the PS3 ?

Here's my environment:
  • OS: Linux, Gentoo 64 bit
  • ps3mediaserver: 1.81.0
  • vlc: 2.0.6
  • tsmuxer: 1.10.6-r1
  • mplayer (mencoder): 1.1.1
  • ffmpeg: 1.0.7

Is anyone else experiencing this issue?

thank you very much
mastro
 
Posts: 7
Joined: Wed May 22, 2013 9:39 pm

Re: No Audio with VLC Encoder on PS3

Postby chocolateboy » Fri May 24, 2013 12:26 am

mastro wrote:PS3 doesn't support Mp2 audio format (according to PS3renderers/PS3.conf)


It does (it's called "mpa" in the renderer confs):

PS3.conf wrote:Supported = f:mpegps|mpegts v:mpeg1|mpeg2|mp4|h264 a:ac3|lpcm|aac|mpa m:video/mpeg


acodec=mp2a is hardcoded in the sources


There was an issue with the AC-3 (VLC: "a52") encoder. The VLC code was tested on VLC 2.0.2 almost a year ago, so the issue may have been fixed since then. I'll have a look.

Why is the audio converted to AC-3 if AAC is supported by the PS3 ?


Making the FFmpeg engine remux where possible is being worked on. Patches are welcome for the VLC engine.
chocolateboy
Project Member
 
Posts: 2580
Joined: Wed Sep 16, 2009 10:05 am

Re: No Audio with VLC Encoder on PS3

Postby mastro » Fri May 31, 2013 1:17 pm

chocolateboy wrote:
mastro wrote:PS3 doesn't support Mp2 audio format (according to PS3renderers/PS3.conf)


It does (it's called "mpa" in the renderer confs):


Ok, why then it doesn't play any sound?

chocolateboy wrote:
PS3.conf wrote:Supported = f:mpegps|mpegts v:mpeg1|mpeg2|mp4|h264 a:ac3|lpcm|aac|mpa m:video/mpeg


acodec=mp2a is hardcoded in the sources


There was an issue with the AC-3 (VLC: "a52") encoder. The VLC code was tested on VLC 2.0.2 almost a year ago, so the issue may have been fixed since then. I'll have a look.



Which kind of issue?

Anyway if the mp2 format is by PS3 I don't see why it doesn't play.
Did you get a change to look at it?


chocolateboy wrote:
Why is the audio converted to AC-3 if AAC is supported by the PS3 ?


Making the FFmpeg engine remux where possible is being worked on. Patches are welcome for the VLC engine.



I don't know so well ffmpeg to provide a reliable patch :)

I was just thinking that the reason it is so sluggish (I don't know how to describe it in english) is that the stream is too big / to heavy and the playback is faster then the decoding / transfering.

Maybe avoiding to remux when not necessary may speed up the process.
Anyway ffmpeg doesn't support subtitles so it wouldn't be applicable to me, that was just curiosity ;)


Thank you very much in advance!
mastro
 
Posts: 7
Joined: Wed May 22, 2013 9:39 pm

Re: No Audio with VLC Encoder on PS3

Postby edsonmarquezani » Sun Jun 02, 2013 2:18 am

I have the same issue with memcoder here, and I would like to use it, because it is the more complete backend for transcoding (especially for subtitles), as far as I could see.

Do you know what would be the cause of that slow playback? It really doesn't happen with Tsmuxer or VLC. Any guess on how to fix it?

Thank you.
edsonmarquezani
 
Posts: 1
Joined: Sun Jun 02, 2013 2:11 am

Re: No Audio with VLC Encoder on PS3

Postby mastro » Sun Jun 02, 2013 10:17 am

Also, do you know of any way I could quickly test VLC streaming on my PS3 by changing the command, executing it, trying on the PS3 and iterate the process until I could make it work?

This way I would be able to actually contribute something :)

But I don't know how to stream to my PS3 without using ps3mediaserver
mastro
 
Posts: 7
Joined: Wed May 22, 2013 9:39 pm

Re: No Audio with VLC Encoder on PS3

Postby chocolateboy » Sun Jun 02, 2013 3:35 pm

edsonmarquezani wrote:Do you know what would be the cause of that slow playback? It really doesn't happen with Tsmuxer or VLC.


If you have an issue with MEncoder, either use FFmpeg or VLC (recommended), or create a new thread and post the requested details.

mastro wrote:Also, do you know of any way I could quickly test VLC streaming on my PS3 by changing the command, executing it, trying on the PS3 and iterate the process until I could make it work?


You can experiment with Transcoding Settings -> VLC Video -> Custom Options, but due to the way VLC options are bundled together not everything can be customised.
chocolateboy
Project Member
 
Posts: 2580
Joined: Wed Sep 16, 2009 10:05 am

Re: No Audio with VLC Encoder on PS3

Postby mastro » Sun Jun 02, 2013 3:54 pm

chocolateboy wrote:
mastro wrote:Also, do you know of any way I could quickly test VLC streaming on my PS3 by changing the command, executing it, trying on the PS3 and iterate the process until I could make it work?


You can experiment with Transcoding Settings -> VLC Video -> Custom Options, but due to the way VLC options are bundled together not everything can be customised.


I already tried that, but that only allow you to "add" stuff.

I wanted to "change" all the parameters given to VLC.. (specifically audio codec parameters)

Now it's like this (see it from logs):
Code: Select all
vlc -I dummy "/tmp/my.mkv" --audio-track=0 --sub-track=0 --sout '#transcode{scale=1.0,strict-rc=,samplerate=0,soverlay=,channels=2,ab=128,vb=4096,keyint=16,acodec=mp2a,vcodec=mp2v,}:std{access=file,mux=ps,dst="/tmp/ps3mediaserver/VLC1369252572363.ps"}' "vlc://quit"


And adding options to that I can't do much.
mastro
 
Posts: 7
Joined: Wed May 22, 2013 9:39 pm

Re: No Audio with VLC Encoder on PS3

Postby chocolateboy » Sun Jun 02, 2013 4:16 pm

mastro wrote:
chocolateboy wrote:There was an issue with the AC-3 (VLC: "a52") encoder.

Which kind of issue?


The issue reported in the comment I linked to.

Did you get a change to look at it?


Yes. It will be included along with other VLC fixes in the next release.

mastro wrote:I don't know so well ffmpeg to provide a reliable patch


As I said:

chocolateboy wrote:Patches are welcome for the VLC engine.


Anyway ffmpeg doesn't support subtitles so it wouldn't be applicable to me


Like I said, improvements to the FFmpeg engine are being worked on (including subtitle support).

I wanted to "change" all the parameters given to VLC.. (specifically audio codec parameters)


Instructions for building PMS from source can be found here and here. You can set up a build environment in a few minutes on Linux.
chocolateboy
Project Member
 
Posts: 2580
Joined: Wed Sep 16, 2009 10:05 am

Re: No Audio with VLC Encoder on PS3

Postby mastro » Sun Jun 02, 2013 5:01 pm

chocolateboy wrote:
mastro wrote:
chocolateboy wrote:There was an issue with the AC-3 (VLC: "a52") encoder.

Which kind of issue?


The issue reported in the comment I linked to.


Ups, didn't see the link.

chocolateboy wrote:
Did you get a change to look at it?


Yes. It will be included along with other VLC fixes in the next release.


Great!

chocolateboy wrote:
mastro wrote:I don't know so well ffmpeg to provide a reliable patch


As I said:

chocolateboy wrote:Patches are welcome for the VLC engine.


Anyway ffmpeg doesn't support subtitles so it wouldn't be applicable to me


As I said, improvements to the FFmpeg engine are being worked on (including subtitle support).


I didn't get this was coming soon. Thanks.

chocolateboy wrote:
I wanted to "change" all the parameters given to VLC.. (specifically audio codec parameters)


Instructions for building PMS from source can be found here and here. You can set up a build environment in a few minutes on Linux.


I see.
So you suggest to change the code itself, recompile and try again. I suppose it can be done :)
I just hoped in some quicker way. I'll let you know ;)
mastro
 
Posts: 7
Joined: Wed May 22, 2013 9:39 pm

Re: No Audio with VLC Encoder on PS3

Postby chocolateboy » Sun Jun 02, 2013 10:24 pm

I've run a longer test (with VLC 2.0.5) and have reproduced the audio dropout issue with AC-3 audio (after 45 minutes), so unfortunately we'll need to stick with MP2 until that's fixed.
chocolateboy
Project Member
 
Posts: 2580
Joined: Wed Sep 16, 2009 10:05 am

Next

Return to General Help and Support

Who is online

Users browsing this forum: Bing [Bot], Yahoo [Bot] and 10 guests