Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
3rd March 2012, 22:00 | #1501 | Link | |
Excessively jovial fellow
Join Date: Jun 2004
Location: rude
Posts: 1,100
|
Quote:
edit: like so: Code:
C:\> ffmsindex FFmpegSource2 indexing app Usage: ffmsindex [options] inputfile [outputfile] If no output filename is specified, inputfile.ffindex will be used. Options: -f Force overwriting of existing index file, if any (default: no) -v Set FFmpeg verbosity level. Can be repeated for more verbosity. (default: no messages printed) -p Disable progress reporting. (default: progress reporting on) -c Write timecodes for all video tracks to outputfile_track00.tc.txt (default: no) -k Write keyframes for all video tracks to outputfile_track00.kf.txt (default: no) -t N Set the audio indexing mask to N (-1 means index all tracks, 0 means index none, default: 0) -d N Set the audio decoding mask to N (mask syntax same as -t, default: 0) -a NAME Set the audio output base filename to NAME (default: input filename) -s N Set audio decoding error handling. See the documentation for details. (default: 0) -m NAME Force the use of demuxer NAME (default, lavf, matroska, haalimpeg, haaliogg) |
|
4th March 2012, 12:14 | #1504 | Link |
RipBot264 author
Join Date: May 2006
Location: Poland
Posts: 7,806
|
key_frame_number/fps
__________________
Windows 7 Image Updater - SkyLake\KabyLake\CoffeLake\Ryzen Threadripper |
5th March 2012, 18:53 | #1508 | Link |
Excessively jovial fellow
Join Date: Jun 2004
Location: rude
Posts: 1,100
|
Assuming the video track has track number 0 (use FFMS_GetFirstIndexedTrackOfType if unsure), that you have indexed the file and have the index object handy (if you have already opened the video, just use FFMS_GetTrackFromVideo instead of FFMS_GetTrackFromIndex):
Code:
FFMS_Track *track = FFMS_GetTrackFromIndex(index, 0); const FFMS_TrackTimeBase *timebase = FFMS_GetTimeBase(track); const FFMS_FrameInfo *current_frame; std::vector<int> timecodes; int num_frames = FFMS_GetNumFrames(track); for (int i = 0; i < num_frames; i++) { current_frame = FFMS_GetFrameInfo(track, i); if (current_frame->KeyFrame) { // true if frame is a keyframe. // do something? } int timestamp = (int)((current_frame->PTS * timebase->Num) / timebase->Den); // wallclock milliseconds timecodes.push_back(timestamp); } Of course you can use any data structure of your liking to store the list of integer timestamps, I just used a std::vector for this example. You could also store the timestamps as floats or doubles if you wanted to. Last edited by TheFluff; 5th March 2012 at 19:01. |
5th March 2012, 21:03 | #1511 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
|
GetFrame() is the only way to get that. Containers only contain keyframe flags and nothing else so full decoding is always needed.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
5th March 2012, 22:52 | #1512 | Link | |
Registered User
Join Date: Oct 2009
Posts: 10
|
Quote:
The only problem with this is that my computer can play 1080p through FFVideoSource, but not with threads=1 (it gets probably 15-20fps), which means I'll still have to switch back and forth to have realtime playback during editing and quality video during encoding. This is still much better than the alternative, using FFMS for editing and MPEGAutoIndex for encoding (it also is not fast enough for realtime on my computer), and therefore index/whatever files specific to both, and more script lines. Thanks again. :-) |
|
15th March 2012, 13:05 | #1513 | Link |
RipBot264 author
Join Date: May 2006
Location: Poland
Posts: 7,806
|
again i would like to ask someone to compile r666 for me (nice number btw
TGOYNE seems to fixed corrupted frames in mkv with vc1.
__________________
Windows 7 Image Updater - SkyLake\KabyLake\CoffeLake\Ryzen Threadripper |
16th March 2012, 13:25 | #1515 | Link | |
もこたんインしたお!
Join Date: Jan 2008
Location: Finland / Japan
Posts: 512
|
Built a standard ffms2 with Release configuration. Available here.
Quote:
Edit: iFail -- I had two ffms source code folders and I had run svn up on the wrong one >_> Compiling anew. Edit2: File replaced, now this should really be r666.
__________________
[I'm human, no debug]
Last edited by JEEB; 16th March 2012 at 14:03. |
|
16th March 2012, 16:45 | #1516 | Link |
RipBot264 author
Join Date: May 2006
Location: Poland
Posts: 7,806
|
Thanks JEEB!!!
__________________
Windows 7 Image Updater - SkyLake\KabyLake\CoffeLake\Ryzen Threadripper |
16th March 2012, 17:57 | #1517 | Link |
Registered User
Join Date: Dec 2002
Posts: 5,565
|
The following interlaced H.264 sample will not work correctly in ffms2 (tested 2.17, r644, r666):
http://www.mediafire.com/?ubxfydr4owr2rmo Multi-threaded: insanity, decoder delivers empty frame after first(?) frame 1 thread: jumping back and forth |
16th March 2012, 18:11 | #1519 | Link |
Registered User
Join Date: Dec 2002
Posts: 5,565
|
Yes, you're probably correct:
http://forum.doom9.org/showthread.ph...12#post1558212 So I presume the problem is already known and we have to be patient. |
Thread Tools | Search this Thread |
Display Modes | |
|
|