Thread: FFmpegSource
View Single Post
Old 28th January 2014, 13:33   #1837  |  Link
fvisagie
Registered User
 
Join Date: Aug 2008
Location: Isle of Man
Posts: 588
Not working with Canon HF G30 content

I'm having trouble with output from my Canon HF G30. Frames are skipped, returned out of sequence and/or the total frame count seems wrong. I'm using AVS 2.60 Alpha 4 and FFMS2 2.19 with Haali Media Splitter 20130623 installed and configured for OGM and MPEG PS/TS as per the FFMS2 user manual. Testing was done with progressive encoding so if libav still has PAFF issues those shouldn't apply. The camera can be configured for AVCHD and MP4 output formats, but both produce similar errors. Remuxing AVCHD output to MP4 or MKV also does not help.

Following are some example output clips with problem details. The error list is probably not exhaustive, but I'm at least listing what I've found. I'm using this script to simulate and evaluate scrubbing of each clip:
Code:
source="AVCHD.MTS"

FFIndex(source=source)
FFMS2=AudioDub(FFVideoSource(source=source, fpsnum=50, fpsden=1), FFAudioSource(source=source)).Subtitle("FFMS2", size=36, align=1).Scrub()

LoadPlugin("C:\Program Files\Haali\MatroskaSplitter\avss.dll")
DSS2=DSS2(source).ConvertToYV12(matrix="PC.709", interlaced=false).Subtitle("DSS2", size=36, align=1).Scrub()

StackVertical(FFMS2, DSS2)

function Scrub(clip c) {
    c.ShowFrameNumber(scroll=true, size=36)
    Trim(0,11) + Trim(10,10) + Trim(9,9) + Trim(8,8) + Trim(7,7) + Trim(6,6) + Trim(5,5) + Trim(4,4) + Trim(3,3) + Trim(2,2) + Trim(1,1) + Trim(0,-1)
}
AVCHD.MTS is an untouched AVCHD format recording, and its scrubbed version is scrubbed AVCHD.MTS.avi:
* Frame 0 appears too early in time (i.e. preceding frames aren't shown)
* Rewinding from 10 to 9 the jump is too big and frame 9 is shown twice, and the jump between 6 and 5 is too big
* When the original clip is manually scrolled forward and backward, frames eventually appear closer to the correct time (+/- 4 frames later), but this results in 3 repeated frames at the beginning of the clip. This scrolling forward and backward sometimes causes further frame sequencing problems, even for normal sequential forward access.
* Reverse scrolling from the end of the original clip produces many initial repeats

MP4.MP4 is an untouched MP4 format recording, and its scrubbed version is scrubbed MP4.MP4.avi:
* The first 3 frames are repeats
* Rewinding, frame 9 is out of sequence, the jump from 6 to 5 is too big and the last 3 frames are repeats again
* Manually scrolling forward and backward a larger number of frames than in the script (or repeatedly) seems to remove rewind sequence errors, but the repeated frames at the beginning of the clip remain
* Reverse scrolling from the end of the original clip appears to work correctly, although it seems the last 2 frames aren't shown

AVCHD.MP4 was remuxed from AVCHD.MTS with ffmpeg, and its scrubbed version is scrubbed AVCHD.MP4.avi:
* The first 3 frames are repeats
* Rewinding, frame 9 is a duplicate of 7 and the jump between 6 and 5 is too big and the last 3 frames are repeats again
* Manually scrolling forward and backward a larger number of frames than in the script (or repeatedly) seems to remove rewind sequence errors, but the repeated frames at the beginning of the clip remain
* Reverse scrolling from the end of the original clip appears to work correctly, although it seems the last 2 frames aren't shown

AVCHD.MKV was remuxed from AVCHD.MTS with [edit]DSMux[/edit], and its scrubbed version is scrubbed AVCHD.MKV.avi:
* The first 3 frames are repeats
* Reverse scrolling from the end of the original clip seems to correctly show the last frame, except that it is repeated 4 times before being replaced by a new frame

In summary, with this camera's output FFMS2 fared best with the MKV container, the MKV container combination still had problems with starting/ending frame numbers, and to some extent those problems seem to be shared with all combinations tried.

If I'm doing something wrong, please set me straight. Otherwise, I hope this information can assist towards improving FFMS2. I'd be happy to produce more clips and/or tests if necessary.

On the other hand, please feel free to suggest alternatives if you feel that's appropriate. Although remuxing to MKV might seem usable in theory if one is prepared to tolerate start/end inaccuracies, in practice I'm sitting with 450 clips @ 33GB and that just from 1 trip! With other formats I liked FFMS2 for its frame accuracy and video+audio support; from that point of view something like DSS2 isn't ideal either.

Thanks a lot,
Francois

Last edited by fvisagie; 30th January 2014 at 09:21. Reason: AVCHD.MKV was remuxed from AVCHD.MTS not with ffmpeg but with Haali Media Splitter's DSMux
fvisagie is offline   Reply With Quote