Questions tagged [seek]

Seeking is the act of moving around a file or file-like object.

Seeking is the act of moving around a file or file-like object.

ANSI C in section 2.3.12.10 specifies thatfseek has the argument structure:

int fseek(FILE *stream, long offset, int whence);

Where:

  • stream is the FILE object to seek (note that this does not have to physically be a file)
  • offset is how much, relative to the whence argument
  • whence is one of
    • SEEK_SET (offset is computed relative to the start of the file)
    • SEEK_CUR (offset is computed relative to the current position)
    • SEEK_END (offset is computed relative to the end of the file)

The majority of languages based upon C, and even many that aren't, have inherited something similar to fseek, but have probably put it somewhere else (ex. Python's file.seek). Check your language of choice's documentation for details.

537 questions
0
votes
1 answer

Unity / Vuforia How to find seek position in a video?

Im trying to loop a video in a vuforia AR app, my first idea was to split the video in 2 parts and play them separately but there is a gap that happens when the first video ends and the player loads the second video Searching in the Code i found the…
Chico3001
  • 1,853
  • 1
  • 22
  • 43
0
votes
2 answers

how to make the offset drop line while the lines aren't the same length?

def load_from_file(): d = {} # create empty dict file = open("players.txt", "r")# open file for reading line = file.readline() file.close()# we’re done with the file list = line.split(",") prop =…
TeviXor
  • 5
  • 1
  • 3
0
votes
1 answer

Passing an gets.chomp as an argument

input_file = ARGV.first def print_all(f) puts f.read end def rewind(f) f.seek(0) end def print_a_line(line_count, f) puts "#{line_count}, #{f.gets.chomp}" end current_file = open(input_file) puts "First let's print the whole…
Salam.MSaif
  • 209
  • 3
  • 10
0
votes
2 answers

How to seek with DataReader in UWP

I load stream into buffer, and consume that with DataReader. private async Task InitializeDataReader() { IBuffer buffer = await FileIO.ReadBufferAsync(_file).AsTask(); _reader = DataReader.FromBuffer(buffer); _reader.UnicodeEncoding =…
M.kazem Akhgary
  • 18,645
  • 8
  • 57
  • 118
0
votes
1 answer

Flashplayer 10.1, set enhanced seeking to false, without FMS

So I run into this issue that Enhanced Seeking is enabled by default. And I would really like to disable it (long story here). But it seems you can only disable it on the FMS, by adding this setting to the application.xml. But the thing is we are…
Kasper
  • 1,282
  • 4
  • 20
  • 39
0
votes
1 answer

Android::MediaPalyer.seekTo() method not working

I have a problem with seeking with Android MediaPlayer class. I am playing a local video file, drawing it on a surfaceView. It plays ok, but when I call seekTo(msec) it does not seek. Furhermore, I added a listener (OnSeekComplete) and added…
George
  • 3,727
  • 9
  • 31
  • 47
0
votes
0 answers

Issue burning subtitle into video when seeking using Gstreamer

My goal is to transcode a video with burning subtitle(by using textoverlay). I reference Gstreamer tutorial and write a little program to test 2 pipeline: pipeline 1(without subtitle): multiqueue max-size-buffers=10000 max-size-bytes=0…
Tany
  • 33
  • 5
0
votes
1 answer

pyglet Player.seek() causes unexpected results

I am trying to create a video player using the Pyglet for Python 3.4. The current code I have is very basic, and will simply play a file such as this math gif. I want to loop the video until the window is closed, however trying to use player.seek()…
Mattstir
  • 175
  • 10
0
votes
1 answer

ffmpeg dump specific length of video after seeking PICT_TYPE_I keyframe

I have a flv video and want to dump let's say 3s length of the video after first keyframe PICT_TYPE_I meet after 00:39. I ready the document of ffmpeg seeking and quote here ffmpeg -ss 00:23:00 -i Mononoke.Hime.mkv -frames:v 1 out1.jpg This example…
armnotstrong
  • 8,605
  • 16
  • 65
  • 130
0
votes
1 answer

Calculate or Track the seeked / wound / spooled / time for HTML5 Video

i would like to measure the skipped time during video playback if a user skipped some. Using video.currentTime First it looks quite trivial Listen to seeking and get the currentTime A Listen to seekend and get the currentTime B B - A = Seeked…
mons droid
  • 1,038
  • 9
  • 10
0
votes
0 answers

File object methods write() or writelines() start writing at unexpected position in buffer [Python 3.4.3]

Suppose I want to change the first two characters of the second line of the text file text_file to XX. Say text_file has contents: line1 line2 line3 I wrote the following script to accomplish the task: f = open('text_file',…
user793458
0
votes
1 answer

jwplayer seek not working after the jwplayer update (version 7.6)

I am using latest jwplayer version (7.6). After the update seek function is not working. This is my code jwplayer('player').setup ({ 'file': video_url, 'provider': 'video', 'width': '640', 'height': '420', 'image': image_url, …
WP Learner
  • 788
  • 1
  • 13
  • 34
0
votes
0 answers

ffplay seek when pts big than 26.5hour

I use ffmepg record rtsp stream to Ts file, but pts maxsize is 33bit(26.5hours,95443second). When I record more than 26.5 hours, pts will restart from 0. the ffplay can not seek more than 26.5 hours timestamp. How to change the ffplay to support…
hansonzou
  • 11
  • 2
0
votes
1 answer

Using seek() to create a mean pixel value comparing software in .tiff format?

How does PIL handle seek() function to operate within multiframe .tiff files? I'm trying to extract a piece of information (greyscale pixel values) of various frames in the file, but no matter what I set the seek for, EOFE error is raised. Example…
Jericho Jones
  • 157
  • 1
  • 2
  • 11
0
votes
0 answers

Python 2.7 - seek method

I am trying to learn about the functionality of the seek method. So far, I understand that seek offsets the pointer to a specific position within the file as specified by the whence statement, which defaults to 0. seek(0,0) refers to the beginning…
pb_ng
  • 361
  • 1
  • 5
  • 19