
Recherche avancée
Médias (1)
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
Autres articles (37)
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
Support de tous types de médias
10 avril 2011Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)
-
L’utiliser, en parler, le critiquer
10 avril 2011La première attitude à adopter est d’en parler, soit directement avec les personnes impliquées dans son développement, soit autour de vous pour convaincre de nouvelles personnes à l’utiliser.
Plus la communauté sera nombreuse et plus les évolutions seront rapides ...
Une liste de discussion est disponible pour tout échange entre utilisateurs.
Sur d’autres sites (6727)
-
ProcessBuilder is not called when trying to start a process
15 juin 2022, par xnokI am trying to understand more about the ffmpeg usage in JavaCV for android studio and for said task I am trying to use ProcessBuilder. I tried writting a simple program to debug the
pb.start();
Although, I am not getting a response. What I did was to start a default/empty activity and pasted the following program :

package com.example.myapplication;

import androidx.annotation.RequiresApi;
import androidx.appcompat.app.AppCompatActivity;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;

import org.bytedeco.javacpp.Loader;

import android.os.Build;
import android.os.Bundle;
import android.util.Log;

public class MainActivity extends AppCompatActivity {
 static final int cols = 192;
 static final int rows = 108;
 static final String ffmpeg = Loader.load(org.bytedeco.ffmpeg.ffmpeg.class);
 static final String rtmp_url = "test.flv";
 static final String[] command = {ffmpeg,
 "-y",
 "-f", "rawvideo",
 "-vcodec", "rawvideo",
 "-pix_fmt", "bgr24",
 "-s", (Integer.toString(cols) + "x" + Integer.toString(rows)),
 "-r", "10",
 "-i", "pipe:",
 "-c:v", "libx264",
 "-pix_fmt", "yuv420p",
 "-preset", "ultrafast",
 "-f", "flv",
 rtmp_url};
 @RequiresApi(api = Build.VERSION_CODES.O)
 @Override
 protected void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 setContentView(R.layout.activity_main);
 new Thread(t1).start();

 }
 private static Runnable t1 = () -> {
 Log.e("TAG", "void OnCreate called successfully!");
 ProcessBuilder pb = new ProcessBuilder(command).redirectErrorStream(true);
 pb.redirectErrorStream(true);
 try {
 Process process = pb.start();
 BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
 OutputStream writer = process.getOutputStream();
 Log.e("TAG", "Something good happened here");
 } catch (IOException e) {
 e.printStackTrace();
 Log.e("TAG", "Nothing good happened here");
 }
 };


}



My current problem is that I can't seem to start properly the processBuilder process via pb.start() ;


I get the following logs from the logcat panel :


2022-06-14 17:24:46.328 13371-13371/com.example.myapplication E/TAG: void OnCreate called successfully!
2022-06-14 17:24:46.333 13371-13371/com.example.myapplication E/TAG: Nothing good happened here



I'd like to understand why is it skipping the try/catch block and not starting the process ?


EDIT : I made some changes as per @g00se's suggestions and I got the following stack trace from the code above :


2022-06-15 00:32:26.700 29787-29787/? E/USNET: USNET: appName: com.example.myapplication
2022-06-15 00:32:29.328 29787-29828/com.example.myapplication E/TAG: void OnCreate called successfully!
2022-06-15 00:32:29.330 29787-29828/com.example.myapplication E/AndroidRuntime: FATAL EXCEPTION: Thread-4
 Process: com.example.myapplication, PID: 29787
 java.lang.NullPointerException
 at java.lang.ProcessBuilder.start(ProcessBuilder.java:1012)
 at com.example.myapplication.MainActivity.lambda$static$0(MainActivity.java:48)
 at com.example.myapplication.MainActivity$$ExternalSyntheticLambda0.run(Unknown Source:0)
 at java.lang.Thread.run(Thread.java:920)



-
Compiling ffmpeg using MSVC while supporting d3d11va decoders
2 octobre 2019, par TeamolI need to debug a problem in ffmpeg so I was forced to build all libs using MSVC so I get proper pdb files. I have succesfully compiled ffmpeg and I’m able to debug it. The only problem I have is that I cannot use d3d11va.
I’ve tried to enable all configure modifiers I found to enable d3d11va. I use configure script like this.
../../../configure --toolchain=msvc --disable-programs --arch=x86_64 --enable-shared --disable-encoders --disable-muxers --disable-demuxers --enable-demuxer=h264 --enable-demuxer=mov --disable-decoders --enable-decoder=h264 --disable-parsers --enable-parser=h264 --disable-bsfs --disable-protocols --disable-devices --disable-filters --target-os=win32 --extra-cflags="-MD -DWINAPI_FAMILY=WINAPI_FAMILY_APP -D_WIN32_WINNT=0x0A00" --extra-ldflags="-APPCONTAINER WindowsApp.lib"
install prefix ../../../Build/Windows10/x64
source path /c/Users/ffmpeg/Repositories/FFmpeg
C compiler cl.exe
C library msvcrt
ARCH x86 (generic)
big-endian no
runtime cpu detection yes
standalone assembly yes
x86 assembler nasm
MMX enabled yes
MMXEXT enabled yes
3DNow! enabled yes
3DNow! extended enabled yes
SSE enabled yes
SSSE3 enabled yes
AESNI enabled yes
AVX enabled yes
AVX2 enabled yes
AVX-512 enabled yes
XOP enabled yes
FMA3 enabled yes
FMA4 enabled yes
i686 features enabled yes
CMOV is fast yes
EBX available no
EBP available no
debug symbols yes
strip symbols no
optimize for size no
optimizations yes
static no
shared yes
postprocessing support no
network support yes
threading support w32threads
safe bitstream reader yes
texi2html enabled no
perl enabled yes
pod2man enabled yes
makeinfo enabled no
makeinfo supports HTML no
External libraries:
External libraries providing hardware acceleration:
d3d11va
Libraries:
avcodec avdevice avfilter avformat avutil swresample swscale
Programs:
Enabled decoders:
h263 h264 hevc mpeg2video vc1 vp9
Enabled encoders:
Enabled hwaccels:
h264_d3d11va hevc_d3d11va mpeg2_d3d11va vc1_d3d11va vp9_d3d11va wmv3_d3d11va
h264_d3d11va2 hevc_d3d11va2 mpeg2_d3d11va2 vc1_d3d11va2 vp9_d3d11va2 wmv3_d3d11va2
Enabled parsers:
h263 h264 vp9
Enabled demuxers:
h264 mov
Enabled muxers:
Enabled protocols:
Enabled filters:
Enabled bsfs:
null vp9_superframe_split
Enabled indevs:
Enabled outdevs:
License: LGPL version 2.1 or later
libavutil/avconfig.h is unchanged
libavfilter/filter_list.c is unchanged
libavcodec/codec_list.c is unchanged
libavcodec/parser_list.c is unchanged
libavcodec/bsf_list.c is unchanged
libavformat/muxer_list.c is unchanged
libavdevice/indev_list.c is unchanged
libavdevice/outdev_list.c is unchanged
libavformat/protocol_list.c is unchanged
ffbuild/config.sh is unchangedI would expect that this should be enough for d3d11va to work but when I call avcodec_get_hw_config (codec, i) I get empty config.
Any idea where might be the problem ?
-
FFMPEG API and cropping
24 juin 2016, par JguillotI learned how to use FFMPEG API with dranger’s tutorial, and I implemented a video reader using the library SDL to display the video.
I have a HD video 1280*720 (i only worked with mp4) and i want to select a VGA-screen anywhere in the HD video (I mean cropping a VGA screen in a HD video), recuperate the data and display it on screen.
In the FFMPEG API, we can use the function av_picture_crop (here). I get a "yellow" overlay on the cropped video and my application crashes after fews seconds. Before posting here, i read here that the function wasn’t finish yet. But when i reading the code, i don’t find a way to finish it.
This is a part of my code :AVFrame *pFrame = NULL;
AVFrame *pFrameCropped = NULL;
bmp = SDL_CreateYUVOverlay(CODEC_WIDTH, // width
CODEC_HEIGHT, // height
SDL_YV12_OVERLAY, // format
screen); // SDL_Surface to display
sws_ctx = sws_getContext(CODEC_WIDTH, // src width
CODEC_HEIGHT, // src height
pCodecCtx->pix_fmt, // src img format
STREAM_WIDTH, // dest width,
STREAM_HEIGHT, // dest height
AV_PIX_FMT_YUV420P, // dest img format
SWS_BILINEAR, // option to rescalling
NULL, //
NULL, //
NULL //
);
while(
av_read_frame(pFormatCtx,
&packet)>=0)
{
if(packet.stream_index==videoStream)
{
avcodec_decode_video2(pCodecCtx,
pFrame,
&frameFinished,
&packet);
if(frameFinished)
{
SDL_LockYUVOverlay(bmp);
av_picture_crop((AVPicture*)pFrameCropped,
(AVPicture*)pFrame,
(AVPixelFormat)pFrame->format,
150,
300);
pict.data[0] = pFrameCropped->data[0];// "X"
pict.data[1] = pFrameCropped->data[1];
pict.data[2] = pFrameCropped->data[2];
// pict.linesize == number of bytes per line
pict.linesize[0] = pFrameCropped->linesize[0];
pict.linesize[1] = pFrameCropped->linesize[2];
pict.linesize[2] = pFrameCropped->linesize[1];
sws_scale(sws_ctx, // the scaling context previously created with sws_getContext()
(uint8_t const * const *)pFrameCropped->data, // Pointers to the planes of the source slice
pFrame->linesize, // the array containing the strides for each plane of the source image
0, // position in src img processed slice.
// It's number (counted starting from zero)
// in the image of the first row of the slice
CODEC_HEIGHT, // source slice height. Number of rows in the slice
pict.data, // pointers to the planes of the destination image
pict.linesize); // strides for each plane of the destination image
// Unlock SDL_Overlay
SDL_UnlockYUVOverlay(bmp);
}Get the compilation error :
*** glibc detected *** ./HDtoVGA: corrupted double-linked list: 0x08d74e30 ***
In the FFMPEG command line tool, we can crop a video, using vf_crop (here) but I don’t find how to implement the same function in my code.
Do you have any hint to help me ?