Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#1745 closed defect (fixed)

PS3 compatibility regression

Reported by: SubJunk Owned by:
Priority: important Component: undetermined
Version: git-master Keywords: regression mpegps
Cc: michael Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
Prior to the commit https://github.com/FFmpeg/FFmpeg/commit/967facb it was possible to produce MPEG-2/AC3 files compatible with PS3 and other renderers.
It is still possible, however seeking sometimes produces incompatible files.
I have confirmed that it started with 967facb; f1fdd20 and releases prior to that work perfectly.

How to reproduce:
ffmpeg -ss 2 -i input.mkv -bufsize 7000000 -maxrate 54000000 -f vob output.mpeg

Confirmed with 63951ae (latest)

Here are two files, 7MB each, that show the bug. One was made by f1fdd20 and the other 967facb:

http://www.spirton.com/uploads/FFmpeg/ps3compat-967facb-withbug.mpeg
http://www.spirton.com/uploads/FFmpeg/ps3compat-f1fdd20-withoutbug.mpeg

MediaInfo? doesn't report any difference between the two files except the new one has a "Delay relative to video" of 26.5 hours, whereas the older one (which works) doesn't report a delay.

Change History (18)

comment:1 Changed 4 years ago by cehoyos

  • Keywords regression added
  • Priority changed from normal to important

Please provide command line and complete, uncut console output for current git head.

comment:2 follow-up: Changed 4 years ago by SubJunk

Thanks for the quick response. Here's the info, and it should be noted that I have tried a variety of input formats (AVI, MP4, MKV, etc. using various codecs, mostly XviD or x264 video with AC-3, DTS or MP3 audio, with the same results for each:

$ ffmpeg -ss 183.0 -i input.mkv -t 10 -bufsize 7000000 -maxrate 54000000 -f vob output.mpeg
ffmpeg version N-44552-g4aade44 Copyright (c) 2000-2012 the FFmpeg developers
  built on Sep 18 2012 21:42:13 with gcc 4.7.0 (GCC)
  configuration: --enable-runtime-cpudetect --enable-gpl --enable-nonfree --enable-libcdio --enable-libfaac --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-avisynth --enable-pthreads
 --enable-libfreetype --enable-libmp3lame --disable-ffplay --disable-ffserver --disable-ffprobe
  libavutil      51. 73.101 / 51. 73.101
  libavcodec     54. 56.100 / 54. 56.100
  libavformat    54. 27.101 / 54. 27.101
  libavdevice    54.  2.100 / 54.  2.100
  libavfilter     3. 16.104 /  3. 16.104
  libswscale      2.  1.101 /  2.  1.101
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100
Input #0, matroska,webm, from 'input.mkv':
  Metadata:
    creation_time   : 2012-01-17 19:37:01
  Duration: 00:43:42.08, start: 0.000000, bitrate: 4459 kb/s
    Stream #0:0(eng): Video: h264 (High), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 2k tbc (default)
    Stream #0:1(eng): Audio: ac3, 48000 Hz, 5.1(side), s16, 384 kb/s (default)
Output #0, vob, to 'output.mpeg':
  Metadata:
    encoder         : Lavf54.27.101
    Stream #0:0(eng): Video: mpeg2video, yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 90k tbn, 23.98 tbc (default)
    Stream #0:1(eng): Audio: mp2, 48000 Hz, stereo, s16, 128 kb/s (default)
Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> mpeg2video)
  Stream #0:1 -> #0:1 (ac3 -> mp2)
Press [q] to stop, [?] for help
frame=  240 fps=0.0 q=31.0 Lsize=    1252kB time=00:00:10.00 bitrate=1025.0kbits/s dup=0 drop=31
video:1057kB audio:177kB subtitle:0 global headers:0kB muxing overhead 1.438361%
Last edited 4 years ago by cehoyos (previous) (diff)

comment:3 in reply to: ↑ 2 Changed 4 years ago by cehoyos

  • Status changed from new to open

Replying to SubJunk:

Here's the info, and it should be noted that I have tried a variety of input formats

You could try -acodec ac3 as output codec.

comment:4 Changed 4 years ago by SubJunk

Thanks for the suggestion but it still happens with that. Also the same with -acodec copy.

Edit: It also occurs with -f dvd

Last edited 4 years ago by SubJunk (previous) (diff)

comment:5 Changed 4 years ago by SubJunk

I just tested more and it doesn't happen without audio (-an) so it does seem to be linked to audio.

comment:6 Changed 4 years ago by michael

Can you provide a small input file with which this can be reproduced?
I see no link to the input.mkv that you use, so i cant use that ...

comment:7 Changed 4 years ago by michael

  • Cc michael added

comment:8 Changed 4 years ago by SubJunk

Sure thing. I cut this 13MB sample for you:
http://www.spirton.com/uploads/FFmpeg/1745-Sample.mkv

Using the following CMD on the sample above will produce the incompatible video:
ffmpeg -ss 30.0 -i 1745-Sample.mkv -bufsize 7000000 -maxrate 54000000 -f vob -c:a copy output-withbug.mpeg

While this will produce a compatible video:
ffmpeg -ss 15.0 -i 1745-Sample.mkv -bufsize 7000000 -maxrate 54000000 -f vob -c:a copy output-withoutbug.mpeg

comment:9 Changed 4 years ago by michael

please try if adding -preload 5M or something similar fixes it ? (this is not really a solution but would help narrow down what the problem is)

comment:10 Changed 4 years ago by SubJunk

Yes, that does fix it. It produces a file that has a negative 5 second delay on the audio, so when it starts playing there is no video for 5 seconds, but it does play.

comment:11 Changed 4 years ago by michael

ok, then please try -avoid_negative_ts 1

Version 0, edited 4 years ago by michael (next)

comment:12 Changed 4 years ago by SubJunk

It has the same effect as the preload did; the video plays now but with no video for 5 seconds

comment:13 Changed 4 years ago by michael

ok, next try, -copypriorss 0 possibly with -avoid_negative_ts 1

comment:14 Changed 4 years ago by SubJunk

Looks like we have a winner! :)
It works with just -copypriorss 0, as well as with them both. Thanks for the quick fix!

comment:15 Changed 4 years ago by SubJunk

Tested with another video and it needed both commands to work

comment:16 Changed 4 years ago by SubJunk

This is fixed now, so feel free to close this ticket, and thanks for the fix!

comment:17 Changed 4 years ago by cehoyos

  • Resolution set to fixed
  • Status changed from open to closed

Thank you for testing again!

comment:18 Changed 4 years ago by cehoyos

  • Keywords mpegps added
Note: See TracTickets for help on using tickets.