Opened 6 years ago

Last modified 18 months ago

#2162 open defect

ffmpeg does not create PS3 compatible m2ts files

Reported by: britannia Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: mpegts
Cc: jsantiago@fastmail.us Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description (last modified by cehoyos)

I have some movies (mpeg2 video, AC3 audio) that I would like to convert to m2ts.
If I do this with tsMuxerGUI, it plays like a charm on my PS3. If I try this with ffmpeg the PS3 does never recognize the audio track.
I've used "ffmpeg -i sample.vob -acodec copy -vcodec copy sample.m2ts"

Sample files were uploaded to the ftp Server upload.ffmpeg.org:
PS3Issue_Readme.txt
PS3IssueSampleFFMPEG.m2ts
PS3IssueSampleTSMUXERGUI.m2ts

==============================
1.) convert the file with "ffmpeg.exe" -i sample.mkv -acodec copy -vcodec copy -t 7 sampleFFMPEG.m2ts"
==============================

ffmpeg version 1.1 Copyright (c) 2000-2013 the FFmpeg developers
  built on Jan  8 2013 16:16:22 with gcc 4.7.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libg
sm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --e
nable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --e
nable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwben
c --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-
libxvid --enable-zlib
  libavutil      52. 13.100 / 52. 13.100
  libavcodec     54. 86.100 / 54. 86.100
  libavformat    54. 59.106 / 54. 59.106
  libavdevice    54.  3.102 / 54.  3.102
  libavfilter     3. 32.100 /  3. 32.100
  libswscale      2.  1.103 /  2.  1.103
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
Input #0, matroska,webm, from 'sample.mkv':
  Metadata:
    creation_time   : 2013-01-21 07:30:54
  Duration: 00:11:12.24, start: 0.000000, bitrate: 8453 kb/s
    Chapter #0.0: start 0.000000, end 672.238000
    Metadata:
      title           : Chapter 01
    Stream #0:0(eng): Video: mpeg2video (Main), yuv420p, 720x480 [SAR 32:27 DAR
16:9], SAR 186:157 DAR 279:157, 29.97 fps, 29.97 tbr, 1k tbn, 59.94 tbc
    Stream #0:1(eng): Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s (default)
    Metadata:
      title           : 3/2+1
Output #0, mpegts, to 'sampleFFMPEG.m2ts':
  Metadata:
    encoder         : Lavf54.59.106
    Chapter #0.0: start 0.000000, end 7.000000
    Metadata:
      title           : Chapter 01
    Stream #0:0(eng): Video: mpeg2video, yuv420p, 720x480 [SAR 186:157 DAR 279:1
57], q=2-31, 29.97 fps, 90k tbn, 29.97 tbc
    Stream #0:1(eng): Audio: ac3, 48000 Hz, 5.1(side), 448 kb/s (default)
    Metadata:
      title           : 3/2+1
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=  211 fps=0.0 q=-1.0 Lsize=    8038kB time=00:00:07.00 bitrate=9396.6kbits
/s
video:6880kB audio:383kB subtitle:0 global headers:0kB muxing overhead 10.673105
%

==============================
here ist the output of "ffmpeg -i sampleFFMPEG.m2ts"
==============================

ffmpeg version 1.1 Copyright (c) 2000-2013 the FFmpeg developers
  built on Jan  8 2013 16:16:22 with gcc 4.7.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libg
sm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --e
nable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --e
nable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwben
c --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-
libxvid --enable-zlib
  libavutil      52. 13.100 / 52. 13.100
  libavcodec     54. 86.100 / 54. 86.100
  libavformat    54. 59.106 / 54. 59.106
  libavdevice    54.  3.102 / 54.  3.102
  libavfilter     3. 32.100 /  3. 32.100
  libswscale      2.  1.103 /  2.  1.103
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
Input #0, mpegts, from 'sampleFFMPEG.m2ts':
  Duration: 00:00:07.04, start: 1.400000, bitrate: 9353 kb/s
  Program 1
    Metadata:
      service_name    : Service01
      service_provider: FFmpeg
    Stream #0:0[0x100]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420
p, 720x480 [SAR 32:27 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:1[0x101](eng): Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, 5.1
(side), fltp, 448 kb/s
At least one output file must be specified

==============================
then I have "posprocessed" the sampleFFMPEG.m2ts with tsMuxerGUI
here ist the output of "ffmpeg -i sampleTSMUXERGGUI.m2ts"
==============================

ffmpeg version 1.1 Copyright (c) 2000-2013 the FFmpeg developers
  built on Jan  8 2013 16:16:22 with gcc 4.7.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libg
sm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --e
nable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --e
nable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwben
c --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-
libxvid --enable-zlib
  libavutil      52. 13.100 / 52. 13.100
  libavcodec     54. 86.100 / 54. 86.100
  libavformat    54. 59.106 / 54. 59.106
  libavdevice    54.  3.102 / 54.  3.102
  libavfilter     3. 32.100 /  3. 32.100
  libswscale      2.  1.103 /  2.  1.103
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
Input #0, mpegts, from 'sampleTSMUXERGUI.m2ts':
  Duration: 00:00:07.04, start: 600.000000, bitrate: 8894 kb/s
  Program 1
    Stream #0:0[0x1011]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv42
0p, 720x480 [SAR 32:27 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:1[0x1100](eng): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side
), fltp, 448 kb/s
At least one output file must be specified

==============================
The differences that I see between ffmpeg output and tsMuxerGUI output are the track IDs and then "ac3 ([129][0][0][0] / 0x0081)" vs. "(AC-3 / 0x332D4341)".

Change History (12)

comment:1 Changed 6 years ago by cehoyos

  • Description modified (diff)
  • Keywords mpegts added

Is the problem also reproducible with current git head?

I have an unrelated question:
I am assuming that the PS3 is able to play (some) avi files, depending on the used codec:
$ ffmpeg -i input -an -qscale 10 -vcodec msmpeg4 outmsmpeg4.avi
$ ffmpeg -i input -an -qscale 10 -vcodec wmv2 outwmv2.avi

If you find a working video codec, could you test if both stereo ac-3 and multichannel ac-3 are played ok?
$ ffmpeg -i input -qscale 10 -vcodec msmpeg4 -acodec ac3 -ac 6 out6.avi
$ ffmpeg -i input -qscale 10 -vcodec msmpeg4 -acodec ac3 -ac 2 out2.avi

comment:2 Changed 6 years ago by britannia

To answer the not ticket related question:
unfortunately PS3 does neither accept msmpeg4 nor wmv2

comment:3 Changed 6 years ago by cehoyos

Does the PS3 support avi at all? Which video-codecs in avi?

comment:4 Changed 5 years ago by richardpl

  • Component changed from undetermined to avformat

You could try forcing audio tag.

comment:5 Changed 5 years ago by britannia

Just "-tag:a" ?
Are there any options for this argument ?

comment:6 Changed 5 years ago by cehoyos

It takes an option (the tag) but it is unfortunately irrelevant for your problem.

Did you already test current git head?

comment:7 follow-up: Changed 5 years ago by britannia

I just double checked with git-9efcfbe (64bit, Windows). Same behavior. No audio is "recognized" by the PS3.

Can someone explain the difference between

([129][0][0][0] / 0x0081) (ffmpeg output, not found on PS3) and
(AC-3 / 0x332D4341) (tsMuxer output, plays fine on PS3)

?

I tried also with

-tag:a ac3
-tag:a AC-3
-tag:a 0x332D4341

but it had no influence on the output file.

comment:8 in reply to: ↑ 7 Changed 5 years ago by cehoyos

  • Status changed from new to open
  • Version changed from unspecified to git-master

Replying to britannia:

I tried also with

-tag:a ac3
-tag:a AC-3
-tag:a 0x332D4341

but it had no influence on the output file.

As said -tag has absolutely no relevance for your problem.

comment:9 Changed 4 years ago by vagifzeynalov

Hello!

As I discovered that it is the mpegts container issue, not the ac3 codec.

For example, when I converting a VOB file to the M2TS format the result is incorrect.
But if convert the same file to the MP4 format, then it will be the right result.
And PS3 can play it perfectly!

comment:10 in reply to: ↑ description Changed 4 years ago by rusghon

Hello!

This problem may have a relationship to Tickets #2173 and #2330.
This is because tsMuxer create compatible m2ts files and ffmpeg cannot in these Tickets.

comment:11 Changed 23 months ago by mboufleur

This is probably an audio descriptor issue in Transport Stream. Ticket #5837 also has some more information about it, as well as a discussion in the following link from ffmpeg-user list:
http://ffmpeg.org/pipermail/ffmpeg-user/2016-September/033536.html

comment:12 Changed 18 months ago by jlsantiago0

  • Cc jsantiago@fastmail.us added
Note: See TracTickets for help on using tickets.