Opened 9 years ago
Closed 8 years ago
#5125 closed defect (invalid)
mpg frames flick
Reported by: | rhbc73 | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | unspecified | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Generated a mpg file from a single png image. Command line below
$ ffmpeg.exe -loop 1 -i 001.png -t 30 -target pal-dvd a30.mpg ffmpeg version N-77715-gfc703f5 Copyright (c) 2000-2016 the FFmpeg developers built with gcc 5.2.0 (GCC) configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib libavutil 55. 12.100 / 55. 12.100 libavcodec 57. 21.100 / 57. 21.100 libavformat 57. 21.101 / 57. 21.101 libavdevice 57. 0.100 / 57. 0.100 libavfilter 6. 23.100 / 6. 23.100 libswscale 4. 0.100 / 4. 0.100 libswresample 2. 0.101 / 2. 0.101 libpostproc 54. 0.100 / 54. 0.100 Input #0, png_pipe, from '001.png': Duration: N/A, bitrate: N/A Stream #0:0: Video: png, rgba(pc), 720x576 [SAR 3779:3779 DAR 5:4], 25 fps, 25 tbr, 25 tbn, 25 tbc Output #0, dvd, to 'a30.mpg': Metadata: encoder : Lavf57.21.101 Stream #0:0: Video: mpeg2video (Main), yuv420p, 720x576 [SAR 1:1 DAR 5:4], q=2-31, 6000 kb/s, 25 fps, 90k tbn, 25 tbc Metadata: encoder : Lavc57.21.100 mpeg2video Side data: unknown side data type 10 (24 bytes) Stream mapping: Stream #0:0 -> #0:0 (png (native) -> mpeg2video (native)) Press [q] to stop, [?] for help frame= 750 fps=196 q=2.0 Lsize= 10748kB time=00:00:29.96 bitrate=2938.8kbits/s speed=7.82x video:10489kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2.465228%
Play the generated mpg in ffplay or MPC-HOME, you can notice flick every 0.5 second.
The mp4 file generated by the same image doesn't have this problem. Command line is
ffmpeg.exe -loop 1 -i 001.png -t 30 mp4_30.mp4
Attachments (1)
Change History (12)
by , 9 years ago
comment:1 by , 9 years ago
follow-up: 3 comment:2 by , 9 years ago
I tested the following:
$ ffplay -autoexit a30.mpg ffplay version N-77711-gc3c22be Copyright (c) 2003-2016 the FFmpeg developers built with gcc 4.7 (SUSE Linux) configuration: --enable-gpl libavutil 55. 12.100 / 55. 12.100 libavcodec 57. 21.100 / 57. 21.100 libavformat 57. 21.101 / 57. 21.101 libavdevice 57. 0.100 / 57. 0.100 libavfilter 6. 23.100 / 6. 23.100 libswscale 4. 0.100 / 4. 0.100 libswresample 2. 0.101 / 2. 0.101 libpostproc 54. 0.100 / 54. 0.100 [NULL @ 0x7fd7b8001dc0] start time for stream 0 is not set in estimate_timings_from_pts Input #0, mpeg, from 'a30.mpg': Duration: 00:00:29.96, start: 0.540000, bitrate: 2938 kb/s Stream #0:0[0x1bf]: Data: dvd_nav_packet Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv), 720x576 [SAR 1:1 DAR 5:4], max. 9000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc 30.50 M-V: 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
While I don't understand the word flick I didn't see anything out of the ordinary (just a static image), please elaborate!
comment:3 by , 9 years ago
Replying to cehoyos:
I tested the following:
$ ffplay -autoexit a30.mpg ffplay version N-77711-gc3c22be Copyright (c) 2003-2016 the FFmpeg developers built with gcc 4.7 (SUSE Linux) configuration: --enable-gpl libavutil 55. 12.100 / 55. 12.100 libavcodec 57. 21.100 / 57. 21.100 libavformat 57. 21.101 / 57. 21.101 libavdevice 57. 0.100 / 57. 0.100 libavfilter 6. 23.100 / 6. 23.100 libswscale 4. 0.100 / 4. 0.100 libswresample 2. 0.101 / 2. 0.101 libpostproc 54. 0.100 / 54. 0.100 [NULL @ 0x7fd7b8001dc0] start time for stream 0 is not set in estimate_timings_from_pts Input #0, mpeg, from 'a30.mpg': Duration: 00:00:29.96, start: 0.540000, bitrate: 2938 kb/s Stream #0:0[0x1bf]: Data: dvd_nav_packet Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv), 720x576 [SAR 1:1 DAR 5:4], max. 9000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc 30.50 M-V: 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0While I don't understand the word flick I didn't see anything out of the ordinary (just a static image), please elaborate!
Hi,
Please just play https://dl.dropboxusercontent.com/u/89678527/a30.mpg using ffplay in full screen mode. Ideally, you should see "still" playback - because each frame is same. But actually you can see (especially at the low part of screen) some scene change (small difference between frames), you can see the changes several times per second!
follow-up: 6 comment:4 by , 9 years ago
Works fine here:
$ md5sum a30.mpg 574bfcdbc218b24a41e80dcaeab417e3 a30.mpg $ ffplay -fs -autoexit a30.mpg ffplay version N-77711-gc3c22be Copyright (c) 2003-2016 the FFmpeg developers built with gcc 4.7 (SUSE Linux) configuration: --enable-gpl libavutil 55. 12.100 / 55. 12.100 libavcodec 57. 21.100 / 57. 21.100 libavformat 57. 21.101 / 57. 21.101 libavdevice 57. 0.100 / 57. 0.100 libavfilter 6. 23.100 / 6. 23.100 libswscale 4. 0.100 / 4. 0.100 libswresample 2. 0.101 / 2. 0.101 libpostproc 54. 0.100 / 54. 0.100 [NULL @ 0x7f5a14001dc0] start time for stream 0 is not set in estimate_timings_from_pts Input #0, mpeg, from 'a30.mpg': Duration: 00:00:29.96, start: 0.540000, bitrate: 2938 kb/s Stream #0:0[0x1bf]: Data: dvd_nav_packet Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv), 720x576 [SAR 1:1 DAR 5:4], max. 9000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc 30.50 M-V: 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
No tearing.
Try to enable vsync in your graphics card driver.
comment:5 by , 9 years ago
Component: | undetermined → ffplay |
---|
comment:6 by , 9 years ago
Replying to cehoyos:
Works fine here:
$ md5sum a30.mpg 574bfcdbc218b24a41e80dcaeab417e3 a30.mpg $ ffplay -fs -autoexit a30.mpg ffplay version N-77711-gc3c22be Copyright (c) 2003-2016 the FFmpeg developers built with gcc 4.7 (SUSE Linux) configuration: --enable-gpl libavutil 55. 12.100 / 55. 12.100 libavcodec 57. 21.100 / 57. 21.100 libavformat 57. 21.101 / 57. 21.101 libavdevice 57. 0.100 / 57. 0.100 libavfilter 6. 23.100 / 6. 23.100 libswscale 4. 0.100 / 4. 0.100 libswresample 2. 0.101 / 2. 0.101 libpostproc 54. 0.100 / 54. 0.100 [NULL @ 0x7f5a14001dc0] start time for stream 0 is not set in estimate_timings_from_pts Input #0, mpeg, from 'a30.mpg': Duration: 00:00:29.96, start: 0.540000, bitrate: 2938 kb/s Stream #0:0[0x1bf]: Data: dvd_nav_packet Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv), 720x576 [SAR 1:1 DAR 5:4], max. 9000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc 30.50 M-V: 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0No tearing.
Try to enable vsync in your graphics card driver.
Thanks Cehoyos,
I'll try to enable it tomorrow. But as I said, play it in MPC-HOME has the same problem. And play the mp4 file in both player is perfect (that means not a ffplay or Video card settings problem?)
comment:7 by , 9 years ago
Hi, could you guys have another look at this issue?
If I extra frames from the video (total 750 frames in this video) using
ffmpeg.exe -i a30.mpg %03d.jpg
Then only the first 5 jpg is visually good, others are not good.
see https://dl.dropboxusercontent.com/u/89678527/001.jpg
and https://dl.dropboxusercontent.com/u/89678527/010.jpg
I've provided the source image and command line to generate the mpg
ffmpeg.exe -loop 1 -i 001.png -t 30 -target pal-dvd a30.mpg
you should be able to reproduce it easily.
follow-up: 9 comment:8 by , 9 years ago
How is this related to the tearing issue you originally described?
comment:9 by , 9 years ago
Replying to cehoyos:
How is this related to the tearing issue you originally described?
Hi cehoyos, I've enabled vsync on my Win10 machine and still can see it.
The problem I want to point out is, I created a mpg video from a single image, but this video file when played, especially on TV, you can see difference between frames clearly.
Did you see it? Do you think it's tearing issue? If yes, why the MP4 generated by the same image plays good on the same machine and the issue only exists for mpg file? And why only the first several images dumped out look good?
comment:10 by , 9 years ago
Try to adjust the ratecontrol parameters, try 2 pass, try anything that improves quality per bitrate. Also if you arent constraint by the DVD VBV restrictions then remove them. The issue is very likely caused be VBV/bitrate constraints and the highly detailed image requireing mich larger key frames than P frames. So keyframes end up lower quality.
You can also use a larger gop size or encode intra only or encode with constant qp instead of a target bitrate
comment:11 by , 8 years ago
Component: | ffplay → undetermined |
---|---|
Resolution: | → invalid |
Status: | new → closed |
No reply, so I close this as invalid. Reopen if you think otherwise.
I've put output files here:
https://dl.dropboxusercontent.com/u/89678527/a30.mpg
https://dl.dropboxusercontent.com/u/89678527/mp4_30.mp4