
Recherche avancée
Médias (3)
-
Valkaama DVD Cover Outside
4 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
Valkaama DVD Label
4 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Image
-
Valkaama DVD Cover Inside
4 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
Autres articles (40)
-
Les formats acceptés
28 janvier 2010, parLes commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
ffmpeg -codecs ffmpeg -formats
Les format videos acceptés en entrée
Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
Les formats vidéos de sortie possibles
Dans un premier temps on (...) -
List of compatible distributions
26 avril 2011, parThe table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...) -
Selection of projects using MediaSPIP
2 mai 2011, parThe examples below are representative elements of MediaSPIP specific uses for specific projects.
MediaSPIP farm @ Infini
The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...)
Sur d’autres sites (8028)
-
Grab frame from video (as Inputstream) using JavaCV in Java
23 janvier 2020, par Praveen GopalI am using JavaCV to grab frame from Video.
I can grab if video is in absolute path. But if video is in HTTP than JavaCV throw error.
url = new URL("http://www.sample-videos.com/video/mp4/720/SampleVideo.mp4");
urlConnection = (HttpURLConnection) url.openConnection();
InputStream inputStream = urlConnection.getInputStream();
Java2DFrameConverter bimConverter = new Java2DFrameConverter();
FFmpegFrameGrabber frameGrabber = new FFmpegFrameGrabber(inputStream);
String output = "C:\\Users\\xxxx\\Downloads\\Test";
frameGrabber.start();
Frame frame;
double frameRate=frameGrabber.getFrameRate();
int imgNum=5;
System.out.println("Video has "+frameGrabber.getFrameRate()+" frames and has frame rate of "+frameRate);
try {
frameGrabber.setFrameNumber(1000);
frame = frameGrabber.grabKeyFrame();
BufferedImage bi = bimConverter.convert(frame);
String path = output+File.separator+imgNum+".jpg";
ImageIO.write(bi,"png", new File(path));
frameGrabber.stop();
frameGrabber.close();
frameGrabber.flush();
} catch (Exception e) {
e.printStackTrace();
}Any help would be helpful.
Thanks in advance. -
How to repair a raw H.264 stream using FFmpeg
13 janvier 2020, par Chris KennedyI apologize if I start rambling or seem incoherent.
Preface : My house caught on fire last week.
I have been trying to get the footage off my security camera system (Zmodo, don’t ever buy this crap) to share with the fire marshal and my insurance. I can’t get it off the "proper" way because the box doesn’t detect any drive or any file system I throw at it, and none of their viewing apps (for Android or Windows) allow video downloads.
I was able to get the files directly from the system’s hard drive, but they’re (of course) messed up in such a way that I can’t just open up VLC (or even Zmodo’s own viewing software !) and view them. I have spent several hours scouring the web for various ways to run it through FFmpeg to see if it can repair the file, but I’ve had no luck so far and my mind is already stretched thin with everything else.
This is the output from ffprobe :
ffprobe version 4.2.1 Copyright (c) 2007-2019 the FFmpeg developers
built with gcc 9.1.1 (GCC) 20190807
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
libpostproc 55. 5.100 / 55. 5.100
[h264 @ 000002479ee1c180] Format h264 detected only with low score of 1, misdetection possible!Then this repeats several dozen times :
Last message repeated 1 times
[h264 @ 000002479ee1de40] decode_slice_header error
[h264 @ 000002479ee1de40] no frame!
[h264 @ 000002479ee1de40] non-existing PPS 0 referencedAnd it finishes off with this :
[h264 @ 000002479ee1c180] Could not find codec parameters for stream 0 (Video: h264, none): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, h264, from '.\recfile_-200102-130000-135959-00001100.264':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: h264, none, 25 fps, 25 tbr, 1200k tbn, 50 tbcI have tried several options with ffmpeg, including force_key_frames, setting the analyzeduration and probesize options to max_int, tried a -c copy, forcibly specified x264, tried to force a specific resolution (which it should all be standard HD video), and several others that I can’t recall at the moment.
The video files are also accompanied by a .IDX file, but I haven’t figured out how important they are if they are at all to the video file.
I can provide links to the smallest video and its associated IDX if needed, but if anyone can think of anything else to try on these files I’d greatly appreciate it.
-
swr_convert float planar to S16
8 janvier 2020, par Kevin KouketsuHow convert using libav API
AV_SAMPLE_FMT_FLTP
toAV_SAMPLE_FMT_S16
I’m trying to figure out how to resample and encode PCM (captured from Microphone) 44.1KHz to AAC 48.0KHz
That’s my resampler initializer :
void initialize_resampler(SwrContext*& resamplerCtx, AVCodecContext* encoder, AVFrame*& rawResampledAudioFrame, AVStream* audioFormatStream)
{
int nb_samples = (encoder->codec->capabilities & AV_CODEC_CAP_VARIABLE_FRAME_SIZE) ? encoder->sample_rate : encoder->frame_size;
int encoderFrameSize = encoder->channels * av_get_bytes_per_sample(encoder->sample_fmt) * encoder->frame_size;
rawResampledAudioFrame = allocate_audioframe(encoder->sample_fmt, encoder->channel_layout, encoder->sample_rate, nb_samples);
// Copy the stream parameters to the muxer
check(avcodec_parameters_from_context(audioFormatStream->codecpar, encoder));
// Create resampler context
resamplerCtx = swr_alloc();
if (resamplerCtx == nullptr)
throw std::runtime_error("Could not allocate resampler context");
// Set options
check(av_opt_set_int(resamplerCtx, "in_channel_count", 2, 0));
check(av_opt_set_int(resamplerCtx, "in_sample_rate", 44100, 0));
check(av_opt_set_sample_fmt(resamplerCtx, "in_sample_fmt", AV_SAMPLE_FMT_S16, 0));
check(av_opt_set_int(resamplerCtx, "out_channel_count", encoder->channels, 0));
check(av_opt_set_int(resamplerCtx, "out_sample_rate", encoder->sample_rate, 0));
check(av_opt_set_sample_fmt(resamplerCtx, "out_sample_fmt", encoder->sample_fmt, 0));
// initialize the resampling context
check(swr_init(resamplerCtx));
}And for resample I’ve this code :
AVPacket pkt{};
while (true)
{
AVPacket input_packet;
av_init_packet(&input_packet);
check(av_read_frame(inputContext, &input_packet));
check(avcodec_send_packet(decoderContext, &input_packet));
check(avcodec_receive_frame(decoderContext, decodedFrame));
// WHAT DO HERE swr_convert(resamplerContext, )
av_packet_unref(&input_packet);
av_init_packet(&pkt);
auto in_stream = inputContext->streams[pkt.stream_index];
auto out_stream = outputContext->streams[pkt.stream_index];
pkt.pts = av_rescale_q_rnd(pkt.pts, in_stream->time_base, out_stream->time_base, (AVRounding)(AV_ROUND_NEAR_INF | AV_ROUND_PASS_MINMAX));
pkt.dts = av_rescale_q_rnd(pkt.dts, in_stream->time_base, out_stream->time_base, (AVRounding)(AV_ROUND_NEAR_INF | AV_ROUND_PASS_MINMAX));
pkt.duration = av_rescale_q(pkt.duration, in_stream->time_base, out_stream->time_base);
pkt.pos = -1;
check(avcodec_send_frame(encoderContext, decodedFrame));
check(avcodec_receive_packet(encoderContext, &pkt));
check(av_interleaved_write_frame(outputContext, &pkt));
av_packet_unref(&pkt);
}REading the docs I can’t figure out what exactly I need to pass to function. I have this code to encode PCM to MP2 (output is
AV_SAMPLE_FMT_S16
)const uint8_t* inPtr[] { const_cast<const>(&pcmData[0]), nullptr, nullptr,nullptr,nullptr,nullptr,nullptr,nullptr };
uint8_t* outPtr[] { &resampledAudioData[0], nullptr, nullptr,nullptr,nullptr,nullptr,nullptr,nullptr };
int resampledSamplesCount{ swr_convert(
resamplerCtx,
outPtr,
maxResampledSamplesCount,
inPtr,
inputSampleCount) };
// Negativo indica erro.
check(resampledSamplesCount);
</const>pcmData is raw data from input
AVPacket
(PCM)What I get here is : MP2 isn’t planar so it uses the same outPtr[0] different from plannar which needs two valid pointers to same writable data. But what I need to pass to inPtr, for example ?
When I try to use the same code, ffmpeg try to write on outPtr[1] which is nullptr.