
Recherche avancée
Autres articles (42)
-
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...) -
De l’upload à la vidéo finale [version standalone]
31 janvier 2010, parLe chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
Upload et récupération d’informations de la vidéo source
Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)
Sur d’autres sites (5734)
-
How to debug "Error in pull function & Input buffer exhausted" ?
15 septembre 2021, par user16909319Introduction :


I'm working on a Discord Music Bot for personal use only. Basically, when I play a 2min song with the bot, it plays the song for 1min 30secs, then skips it and plays the next one in the queue. The error is shown below :




Error in Pull Function

IO error : Error number -10054 occurred

[mov,mp4,m4a,3gp,3g2,mj2 @ 0000018f86a6f4c0] Packet corrupt (stream = 0, dts = 11154432).

Input buffer exhausted before END element found

Invalid Data found when processing Input

[mov,mp4,m4a,3gp,3g2,mj2 @ 0000018f86a6f4c0] stream 0, offset 0x3e805c : partial file



The code block which I think is causing the problem :


Search song method


async def search_song(self, amount, song, get_url=False):
 info = await self.bot.loop.run_in_executor(None, lambda: youtube_dl.YoutubeDL(ytdl_format_options).extract_info(
 f"ytsearch{amount}:{song}", download=False, ie_key="YoutubeSearch"))
 if len(info["entries"]) == 0: return None

 return [entry["webpage_url"] for entry in info["entries"]] if get_url else info



Play_song method


async def play_song(self, ctx, song):
 url = pafy.new(song).getbestaudio().url
 ctx.voice_client.play(discord.PCMVolumeTransformer(discord.FFmpegPCMAudio(url, executable="C:/ffmpeg/bin/ffmpeg.exe")),
 after=lambda error: self.bot.loop.create_task(self.check_queue(ctx)))
 ctx.voice_client.source.volume = 0.5



Formatting Options I provided :


ytdl_format_options = {
 'format': 'bestaudio/best',
 'outtmpl': '%(extractor)s-%(id)s-%(title)s.%(ext)s',
 'restrictfilenames': True,
 'noplaylist': True,
 'nocheckcertificate': True,
 'ignoreerrors': True,
 'logtostderr': False,
 'quiet': True,
 'no_warnings': True,
 'default_search': 'auto',
 'source_address': '0.0.0.0'
}



Solutions that I've tried :


- 

- Running it on both Replit and locally.
- Redownloading FFmpeg
- Ensuring FFmpeg, pafy, and youtube_dl are all up to date.








Things to Note :


- 

- Playing a 2mins song, it stops after 1min 30 seconds and displays the error above. (75% of the song)
- Playing a 1hr song, it still continues after 10 minutes.






I do not have much experience in this yet so I'm not entirely sure where in my code is actually causing this issue or other ways which I can use to test and fix the issue.


-
C# console app to process FFMPEG jpg stream output
15 septembre 2014, par Gabriel BarzolaI am looking some tip or idea in order to process an stream of jpg files created by a fFMPEG command.
There is a way to split the outpuStream to capture each jpg file ?
Here is the command
ffmpeg -i rtsp ://somertsp:554 -an -f image2pipe -vf fps=fps=5 -I execute that command using a C# application.
Here is a example code
class Program
{
private static BackgroundWorker worker;
private static MemoryStream buffer = new MemoryStream();
private static BinaryWriter bufferWriter = new BinaryWriter(buffer);
static void Main(string[] args)
{
string file = @"C:\ffmpeg\bin\ffmpeg.exe";
string arguments = @"-i rtsp://xxx:yyy@v5demo.wavestore.com:554/rtsp/00004 -an -f image2pipe -vf fps=fps=5 -qscale 0 -";
var processStartInfo = new ProcessStartInfo(file, arguments);
processStartInfo.CreateNoWindow = false;
processStartInfo.RedirectStandardError = true;
processStartInfo.RedirectStandardOutput = true;
processStartInfo.UseShellExecute = false;
worker = new BackgroundWorker();
worker.DoWork += worker_DoWork;
worker.WorkerReportsProgress = true;
worker.ProgressChanged += worker_ProgressChanged;
var process = new Process();
process.StartInfo = processStartInfo;
process.Start();
worker.RunWorkerAsync(process);
process.WaitForExit();
}
static void worker_ProgressChanged(object sender, ProgressChangedEventArgs e)
{
// save the image
}
static void worker_DoWork(object sender, DoWorkEventArgs e)
{
try
{
var internalWorker = sender as BackgroundWorker;
Process p = e.Argument as Process;
buffer = new MemoryStream();
bufferWriter = new BinaryWriter(buffer);
using (var reader = new BinaryReader(p.StandardOutput.BaseStream))
{
while (true)
{
//get the jpg image
}
}
}
catch (Exception ex)
{
// Log the error, continue processing the live stream
}
}
} -
cannot seek to frame 0 in opencv ?
12 décembre 2017, par WangFor some video I cannot seek to frame <11 with
cap.set(cv2.CAP_PROP_POS_FRAMES, x)
. Any x <11 will result in seek to frame 11th. any x<=0 will result in seek to frame 10th.
Why does this happen ? How can I fix this ?def check_frame_seek(fname, frames, x, msec=False, seek=True):
cap = cv2.VideoCapture(fname)
_info = "start frame: {:d}; seek to {}".format(
int(cap.get(cv2.CAP_PROP_POS_FRAMES)),
x
)
if seek:
if msec:
_ret = cap.set(cv2.CAP_PROP_POS_MSEC, x)
_info +="ms;"
else:
_ret = cap.set(cv2.CAP_PROP_POS_FRAMES, x)
_info +="frame;"
_info += "support seek?({});".format(_ret)
_ret, framenow = cap.read()
if _ret:
for _i, _frame in enumerate(frames):
if not _frame is None:
if (np.all(framenow == _frame)):
_info +="loaded=={}.".format(_i)
else:
_info += "cannot read."
cap.release()
print(_info)
def load_all_frames(fname):
cap = cv2.VideoCapture(fname)
frames = []
_ret, _frame = cap.read()
while (_ret):
print(
"frame: {:d}".format(
int(cap.get(cv2.CAP_PROP_POS_FRAMES))
)
)
frames.append(_frame)
_ret, _frame = cap.read()
print(
"total frame number: {}; cap.get = {}".format(
len(frames),
cap.get(cv2.CAP_PROP_FRAME_COUNT)
)
)
return frames
def main():
fname = "video"
frames = load_all_frames(fname)
check_frame_seek(fname, frames, 0)
check_frame_seek(fname, frames, -1)
check_frame_seek(fname, frames, 49)
check_frame_seek(fname, frames, 50)
check_frame_seek(fname, frames, 51)
check_frame_seek(fname, frames, 1)
check_frame_seek(fname, frames, 10)
check_frame_seek(fname, frames, 11)
check_frame_seek(fname, frames, 12)
check_frame_seek(fname, frames, 30)The out put is :
total frame number: 50; cap.get = 49.0
[h264 @ 0x55aabd321540] Missing reference picture
[h264 @ 0x55aabd321540] decode_slice_header error
[h264 @ 0x55aabd350120] Missing reference picture
[h264 @ 0x55aabd3505e0] Missing reference picture
[h264 @ 0x55aabd350aa0] reference picture missing during reorder
[h264 @ 0x55aabd350aa0] reference picture missing during reorder
[h264 @ 0x55aabd350aa0] reference picture missing during reorder
[h264 @ 0x55aabd350aa0] Missing reference picture
[h264 @ 0x55aabd350aa0] Missing reference picture
[h264 @ 0x55aabd350aa0] Missing reference picture
[h264 @ 0x55aabd321540] Missing reference picture
[h264 @ 0x55aabd350120] mmco: unref short failure
[h264 @ 0x55aabd350aa0] reference picture missing during reorder
[h264 @ 0x55aabd350aa0] Missing reference picture
start frame: 0; seek to 0frame;support seek?(True);loaded==10.
start frame: 0; seek to -1frame;support seek?(True);loaded==10.
start frame: 0; seek to 49frame;support seek?(True);loaded==49.
start frame: 0; seek to 50frame;support seek?(True);loaded==49.
start frame: 0; seek to 51frame;support seek?(True);loaded==49.
start frame: 0; seek to 1frame;support seek?(True);loaded==11.
start frame: 0; seek to 10frame;support seek?(True);loaded==11.
start frame: 0; seek to 11frame;support seek?(True);loaded==11.
start frame: 0; seek to 12frame;support seek?(True);loaded==12.
start frame: 0; seek to 30frame;support seek?(True);loaded==30.The ffprobe result of the problematic videos :
Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1920x1080 [SAR 16:15 DAR 256:135], 50 fps, 50 tbr, 90k tbn, 100 tbc
The ffmpeg :
ffmpeg version 3.3.3
configuration: --extra-libs=-ldl --prefix=/opt/ffmpeg --mandir=/usr/share/man --enable-avresample --disable-debug --enable-nonfree --enable-gpl --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-decoder=amrnb --disable-decoder=amrwb --enable-libpulse --enable-libfreetype --enable-gnutls --disable-ffserver --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-libvorbis --enable-libtheora --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libspeex --enable-libass --enable-avisynth --enable-libsoxr --enable-libxvid --enable-libvidstab --enable-libwavpack --enable-nvenc --enable-libzimg
libavutil 55. 58.100 / 55. 58.100
libavcodec 57. 89.100 / 57. 89.100
libavformat 57. 71.100 / 57. 71.100
libavdevice 57. 6.100 / 57. 6.100
libavfilter 6. 82.100 / 6. 82.100
libavresample 3. 5. 0 / 3. 5. 0
libswscale 4. 6.100 / 4. 6.100
libswresample 2. 7.100 / 2. 7.100
libpostproc 54. 5.100 / 54. 5.100