New submission from Jonathan Haug <jonathanh...@wolke7.net>:

Dear Dev-Team,

I'm using the current svn-version of ffmpeg to transcode AVCHD/MTS clips into
DNxHD for video editing.
This does not work properly when using the "Pre-Rec-function" [1] of my
camcorder, a Panasonic SD 300.
In the transcoded files, video and audio are out of sync.

The command I'm using is:

ffmpeg -i input.MTS -s 1280x720 -deinterlace -r 25 -b 60M -threads 8 -vcodec
dnxhd -acodec pcm_s16le -ar 48000 -ac 2 output.mov

(and I already played a lot with different settings of -async, -vsync an 
-copyts)

Below you will find the ouput of ffmpeg -v 9 -loglevel 99.

If I do _not_ use the Pre-Rec-function, everything works as expected.
You may check this on your own with the following files:

sd300-PreRec-avchd.MTS (original sample from camcorder with PreRec)
http://ubuntuone.com/p/Lij/

sd300-PreRec-dnxhd.mov
http://ubuntuone.com/p/LjM/

sd300-standard-avchd.MTS (original sample from camcorder w/o PreRec)
http://ubuntuone.com/p/Lin/

sd300-standard-dnxhd.mov
http://ubuntuone.com/p/LjN/


[1] The Pre-Rec-function:
Pre-Rec enables the camcorder to continuously record three seconds (while in the
Pre-Rec mode) internal buffer memory. Then, when the Record button is actually
pressed, the three seconds immediately prior are added at the beginning of the 
clip.
(from panasonic.com)


$ ffmpeg -v 9 -loglevel 99 -i sd300-PreRec-avchd.MTS
FFmpeg version SVN-r25553, Copyright (c) 2000-2010 the FFmpeg developers
  built on Oct 23 2010 06:08:20 with gcc 4.4.3
  configuration: --enable-gpl --enable-version3 --enable-nonfree
--enable-postproc --enable-pthreads --enable-libfaac --enable-libmp3lame
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora
--enable-libx264 --enable-libxvid --enable-x11grab
  libavutil     50.32. 3 / 50.32. 3
  libavcore      0. 9. 1 /  0. 9. 1
  libavcodec    52.93. 0 / 52.93. 0
  libavformat   52.84. 0 / 52.84. 0
  libavdevice   52. 2. 2 / 52. 2. 2
  libavfilter    1.53. 0 /  1.53. 0
  libswscale     0.12. 0 /  0.12. 0
  libpostproc   51. 2. 0 / 51. 2. 0
[NULL @ 0x22454c0] Probed with size=2048 and score=100
[mpegts @ 0x22454c0] stream=0 stream_type=1b pid=1011 prog_reg_desc=HDMV
[mpegts @ 0x22454c0] stream=1 stream_type=81 pid=1100 prog_reg_desc=HDMV
[mpegts @ 0x22454c0] stream=2 stream_type=90 pid=1200 prog_reg_desc=HDMV
[h264 @ 0x224b270] Frame num gap 236 0
[h264 @ 0x224b270] Frame num gap 236 1
[h264 @ 0x224b270] Frame num gap 236 2

[ .... 230 similar lines cutted ..... ] 

[h264 @ 0x224b270] Frame num gap 236 232
[h264 @ 0x224b270] Frame num gap 236 233
[h264 @ 0x224b270] Frame num gap 236 234
[h264 @ 0x224b270] no picture
[mpegts @ 0x22454c0] Probe buffer size limit 5000000 reached

Seems stream 0 codec frame rate differs from container frame rate: 50.00 (50/1)
-> 50.00 (50/1)
Input #0, mpegts, from 'temp/sd300-PreRec-avchd.MTS':
  Duration: 00:00:11.48, start: 13.833589, bitrate: 16190 kb/s
  Program 1 
    Stream #0.0[0x1011], 121, 1/90000: Video: h264, yuv420p, 1920x1080 [PAR 1:1
DAR 16:9], 1/50, 50 fps, 50 tbr, 90k tbn, 50 tbc
    Stream #0.1[0x1100], 81, 1/90000: Audio: ac3, 48000 Hz, 5.1, s16, 384 kb/s
    Stream #0.2[0x1200], 25, 1/90000: Subtitle: pgssub
At least one output file must be specified

----------
messages: 12339
priority: normal
status: new
substatus: new
title: AVCHD -> DNxHD: a/v out of sync when using Pre-Rec on camcorder
type: bug

________________________________________________
FFmpeg issue tracker <iss...@roundup.ffmpeg.org>
<https://roundup.ffmpeg.org/issue2319>
________________________________________________

Reply via email to