You are not logged in.

#1 2009-07-14 10:31:23

whoops
Member
Registered: 2009-03-19
Posts: 891

[solved] ffmpeg/x264 = "corrupt pictures" between keyframes?

Hi!


I could really use some hints on figuring out how that works / what's wrong...:

So I converted some videos to x264 with ffmpeg; quality is good, but when starting playback anywhere in the middle, I get "random-squares-TV" for a few seconds... From the look & feel of it I'd guess there have to be some sort of important "refresh frames", that are not "compressed on the time axis" and are used as sort of estimation base for the following frames. So if I click on the time line between two of those uncompressed frames, a "blank picture" is taken as starting point for 3D (x/y/t) compression/estimation/thing-stuff or whatever, resulting in corrupt video until the next "full refresh picture" comes along, even though the video is OK if played trough from beginning to end.

- Does it sound as if I converted the video wrong or is my "decoder application" / video player just too lazy to look up what the last "refresh picture" was while scrolling trough the video (quickly searching for something is rendered absolutely impossible, as I get only corrupted video unless I let it play for some seconds)?
- Could someone please translate some of my improvised gibberish terms into real technical term, so I've got some keywords to search for?


Thanks!

Last edited by whoops (2009-07-16 00:14:09)

Offline

#2 2009-07-15 23:18:57

DrZaius
Member
Registered: 2008-01-02
Posts: 193

Re: [solved] ffmpeg/x264 = "corrupt pictures" between keyframes?

Show your complete FFmpeg command and the complete FFmpeg output.  You didn't mention the video player you are using.  I believe your description could be translated as:

Scrubbing video corrupts playback in foo player until, I assume, the next keyframe is reached.

Last edited by DrZaius (2009-07-15 23:21:23)

Offline

#3 2009-07-16 00:00:34

whoops
Member
Registered: 2009-03-19
Posts: 891

Re: [solved] ffmpeg/x264 = "corrupt pictures" between keyframes?

Aaaah... thanks so far!
I thought that would be a more common/simple problem (didn't do anything too special I think) that a lot of people would already know / have solved - so as that might not be the case after all, here some details:

I converted some videos like this:

find ./ -exec ffmpeg -i "{}" -pass 1 -passlogfile "{}.log" -an -vcodec libx264 -threads 0 -vpre fastfirstpass -y /tmp/firstpass.avi \; -exec ffmpeg -i "{}" -pass 2 -passlogfile "{}.log" -vcodec libx264 -vpre hq -threads 0 -y "{}.2.avi" \;

They were different formats... some divx (converted some years ago), some mjpeg or something (digicam) and misc ones... all the same result.

- gstreamer apps (I use whaawmp) show me "square tv"
- mplayer does not let me hop around on the timeline at all (smplayer just does not react, gnome-mplayer shows a grey "untouchable" timeline)
- vlc refuses to play the movies (does nothing)

THAT sound like something - mplayer says:

Debug: MplayerProcess::parseLine: 'Could not determine number of frames (for absolute seek).'

vlc says:

avi demux error: avi module discarded (invalid file)
missing picture in access unit
non-existing PPS referenced
sps_id out of range
FMO not supported
reference overflow (pps)
QPainter::begin: Paint device returned engine == 0, type: 1
QPainter::begin: Paint device returned engine == 0, type: 1
missing picture in access unit
FMO not supported
non-existing PPS referenced
FMO not supported
missing picture in access unit
QPainter::begin: Paint device returned engine == 0, type: 1

... gonna google for keyframes now - still don't get what I did wrong.

Offline

#4 2009-07-16 00:11:23

whoops
Member
Registered: 2009-03-19
Posts: 891

Re: [solved] ffmpeg/x264 = "corrupt pictures" between keyframes?

Whaa, that's impossible! Just did another test run to post the ffmpeg output here... the videos I get now are fine.

I used the absolute same command line (echoe'd it to a file) as before... the only thing I changed on the system were recent repo updated and recompiling some stuff from abs, (among them ffmpeg-thumbnailer and ffmpeg - doing "random recompiling" ATM due to several problems with libjpeg).

So - no idea what it was, now it's good.

Offline

Board footer

Powered by FluxBB