Ok then, I'll keep digging.
So far I've found that in all my h264 samples that stutter, ffmpeg remux seems to do something bad to video stream fps. That is, after remux there is no fps whatsover. Here's an example:
- Code:
"C:\Program Files\Serviio\lib\ffmpeg.exe" -i "Leadership_Team _v3.mp4" -y -vcodec copy -vbsf h264_mp4toannexb -copyts -acodec ac3 -ab 384k -ac 1 -map 0:0 -map 0:1 -sn -f mpegts test.ts
Before remux:
- Code:
"C:\Program Files\Serviio\lib\ffmpeg.exe" -i "Leadership_Team _v3.mp4"
ffmpeg version N-31480-g8bc3a48, Copyright (c) 2000-2011 the FFmpeg developers
built on Jul 14 2011 23:37:53 with gcc 4.4.2
configuration: --enable-static --disable-shared --disable-ffplay --disable-ffserver --enable-memalign-hack --enable-libmp3lame --enable-librtmp --extra-libs='-lrtmp -lpolarssl -lws2_32 -lwinmm' --arch=x86 --enable-runtime-cpudetect --enable-pthreads --target-os=mingw32 --cross-prefix=i686-mingw32- --pkg-config=pkg-config
libavutil 51. 11. 0 / 51. 11. 0
libavcodec 53. 8. 0 / 53. 8. 0
libavformat 53. 6. 0 / 53. 6. 0
libavdevice 53. 2. 0 / 53. 2. 0
libavfilter 2. 25. 0 / 2. 25. 0
libswscale 2. 0. 0 / 2. 0. 0
Seems stream 0 codec frame rate differs from container frame rate: 180000.00 (180000/1) -> 50.00 (50/1)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Leadership_Team _v3.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: mp42isomavc1
creation_time : 2011-06-03 14:31:34
encoder : HandBrake 0.9.5 2011010300
Duration: 00:05:39.77, start: 0.000000, bitrate: 461 kb/s
Stream #0.0(und): Video: h264 (Main), yuv420p, 640x360 [PAR 1:1 DAR 16:9], 392 kb/s, 50 fps, 50tbr, 90k tbn, 180k tbc
Metadata:
creation_time : 2011-06-03 14:31:34
Stream #0.1(eng): Audio: aac, 44100 Hz, mono, s16, 62 kb/s
Metadata:
creation_time : 2011-06-03 14:31:34
At least one output file must be specified
After remux:
- Code:
"C:\Program Files\Serviio\lib\ffmpeg.exe" -i test.ts
ffmpeg version N-31480-g8bc3a48, Copyright (c) 2000-2011 the FFmpeg developers
built on Jul 14 2011 23:37:53 with gcc 4.4.2
configuration: --enable-static --disable-shared --disable-ffplay --disable-ffserver --enable-memalign-hack --enable-libmp3lame --enable-librtmp --extra-libs='-lrtmp -lpolarssl -lws2_32 -lwinmm' --arch=x86 --enable-runtime-cpudetect --enable-pthreads --target-os=mingw32 --cross-prefix=i686-mingw32- --pkg-config=pkg-config
libavutil 51. 11. 0 / 51. 11. 0
libavcodec 53. 8. 0 / 53. 8. 0
libavformat 53. 6. 0 / 53. 6. 0
libavdevice 53. 2. 0 / 53. 2. 0
libavfilter 2. 25. 0 / 2. 25. 0
libswscale 2. 0. 0 / 2. 0. 0
[mpegts @ 01a29c60] max_analyze_duration 5000000 reached at 5014400
Seems stream 0 codec frame rate differs from container frame rate: 180000.00 (180000/1) -> 50.00 (50/1)
Input #0, mpegts, from 'test.ts':
Duration: 00:05:39.76, start: 1.400000, bitrate: 927 kb/s
Program 1
Metadata:
service_name : Service01
service_provider: FFmpeg
Stream #0.0[0x100]: Video: h264 (Main), yuv420p, 640x360 [PAR 1:1 DAR 16:9], 50 tbr, 90k tbn, 180k tbc
Stream #0.1[0x101](eng): Audio: ac3, 44100 Hz, mono, s16, 384 kb/s
At least one output file must be specified
Notice that after remux, in stream #0.0; "50 fps" is missing. This likely is the reason why MPCHC reported these ridiculously high frame rates I mentioned earlier: in the lack of actual fps information, it's some kind of estimate based on god knows what. More importantly, this may also be the reason why Bravias stutter. Maybe they're in trouble without the h264 video stream fps information.
I also found this not to be the only case ffmpeg h264 remux is causing problems with mpegts, see:
http://ffmpeg.org/pipermail/ffmpeg-user/2011-April/000514.htmlThere may actually be a bug in ffmpeg h264 remuxing and we may have to transcode because of it. Which could also mean that this case eventually has little or nothing to do with the video resolution.
To be noted: I'm not a guru when it comes to ffmpeg, I just google. Someone with actual expertise: please throw in better ideas, or better yet, a solution on how you make ffmpeg to maintain h264 video stream fps while remuxing to mpegts. If i knew that, I could confirm or rule out this missing fps being an issue.