
Advanced search
Medias (91)
-
GetID3 - Boutons supplémentaires
9 April 2013, by
Updated: April 2013
Language: français
Type: Picture
-
Core Media Video
4 April 2013, by
Updated: June 2013
Language: français
Type: Video
-
The pirate bay depuis la Belgique
1 April 2013, by
Updated: April 2013
Language: français
Type: Picture
-
Bug de détection d’ogg
22 March 2013, by
Updated: April 2013
Language: français
Type: Video
-
Exemple de boutons d’action pour une collection collaborative
27 February 2013, by
Updated: March 2013
Language: français
Type: Picture
-
Exemple de boutons d’action pour une collection personnelle
27 February 2013, by
Updated: February 2013
Language: English
Type: Picture
Other articles (87)
-
MediaSPIP version 0.1 Beta
16 April 2011, byMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
Amélioration de la version de base
13 September 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...) -
Mise à jour de la version 0.1 vers 0.2
24 June 2013, byExplications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1); Installation des dépendances pour Smush; Installation de MediaInfo et FFprobe pour la récupération des métadonnées; On n’utilise plus ffmpeg2theora; On n’installe plus flvtool2 au profit de flvtool++; On n’installe plus ffmpeg-php qui n’est plus maintenu au profit de (...)
On other websites (9702)
-
FFMPEG - Download video in parts and concat, stutter at concat points
23 July 2022, by rnbwSmnMy goal is to download a video (or M3U8) in parts/chunks which I can later concat.


For context, I would like to download videos in an Android Service which may be stopped at any time, so I think chunking is the right approach.


After some time I got the "downloading the parts" right, using this. I would later put that in a function, and for now I chose the chunks to be 30 seconds long.


%offset% = 30 * %part%

ffmpeg -ss %offset% -t 30 -i INPUT_FILE -avoid_negative_ts 1 out%part%.mp4



The first line is just pseudocode, part is starting at 0.
This works fine, downloading 30 second long .mp4 files.


After that I tried merging them together into a single .mp4. For the tests I only downloaded the first few parts.


Concat command:


ffmpeg -safe 0 -f concat -i concat.txt -c copy final.mp4



This would be a very short concat.txt file:


file 'out0.mp4'
file 'out1.mp4'



The concat works but has one problem: At the point where both files are actually combined, so at 30 seconds, there is a small stutter in video and audio.


So what I think is going on is that I download parts that are 30s long, starting at multiples of 30s so there is a small overlap? In the "Details" part of the Windows file properties it also shows a length of 31 seconds, so the video is even longer than I want.


I tried setting the duration of each part in the concat.txt, both to 30s and to 30s - 1 frame


23.98 fps -> 1/23.98 spf = 0.0417s



But with a duration of 30 as well as 29.9583, although it is better, there is still a small stutter.


file 'out0.mp4'
duration 29.9583
file 'out1.mp4'
duration 29.9583



I also tried with a different fileformat, .ts files, but the stutter was still there. I still think my timings are not quite right, but at this point I don't know where the problem is exactly. What do I need to change to remove the small stutter?


-
How to download live streaming videos with HTTP .flv url
20 February 2017, by Sajjad DarvishiI just wanted to record a live stream by downloading this link but it did’nt work by curl , ffmpeg and wget please help me how can i record this?
-
ffmpeg avcodec_parameters_copy crash on android
9 November 2023, by 徐同鹏i'm new to this, and i am trying to create an muxer app out of android ffmpeg, so i compile .so lib through ubuntu with:


API=21
CPU=armv8-a
ARCH=arm64
PREFIX=$(pwd)/android/$CPU/$ARCH
TOOLCHAIN=/root/android-ndk-r21e/toolchains/llvm/prebuilt/linux-x86_64
CROSS_PREFIX=$TOOLCHAIN/bin/aarch64-linux-android-
CC=$TOOLCHAIN/bin/aarch64-linux-android$API-clang
CXX=$TOOLCHAIN/bin/aarch64-linux-android$API-clang++
SYSROOT=$TOOLCHAIN/sysroot
OPTIMIZE_CFLAGS="-march=$CPU"

./configure \
 --prefix=$PREFIX \
 --arch=$ARCH \
 --cpu=$CPU \
 --cross-prefix=$CROSS_PREFIX \
 --cc=$CC \
 --cxx=$CXX \
 --sysroot=$SYSROOT \
 --extra-cflags="-Os -fPIC $OPTIMIZE_CFLAGS" \
 --target-os=android \
 --enable-cross-compile \
 --disable-gpl \
 --enable-shared \
 --disable-static \
 --disable-programs \
 --disable-ffmpeg \
 --disable-ffplay \
 --disable-ffprobe \
 --disable-doc \
 --disable-htmlpages \
 --disable-manpages \
 --disable-txtpages



i also got some c++ code snippet of muxer:


#include 
#include <string>
#include 
#include <iostream>
#include <fstream>
#include 

using namespace std;

extern "C" {
#include <libavcodec></libavcodec>avcodec.h>
#include <libavformat></libavformat>avformat.h>
#include <libavutil></libavutil>opt.h>
#include <libswresample></libswresample>swresample.h>
}

//cout
#ifndef LOG_TAG
#define LOG_TAG "recite.debug"
#include <android></android>log.h>
#define debug(...) __android_log_print(ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__)
#endif
//cout

string jstringToStdString(JNIEnv* env, jstring jstr) {
 if (jstr == NULL) {
 return "";
 }
 char* chars = (char*)env->GetStringUTFChars(jstr, NULL);
 string ret(chars);
 env->ReleaseStringUTFChars(jstr, chars);
 return ret;
}

void FFMPEG_Callback(void* ptr, int level, const char* fmt, va_list vl)
{
 //if(level != 32) return;
 char buffer[1024];
 vsprintf(buffer, fmt, vl);
 debug("msg : [%d] %s", level, buffer);
}

//Java_com_example_recite_display_tabs_Setting_run
extern "C" JNIEXPORT int JNICALL
Java_com_example_recite_util_Bilibili_compose(JNIEnv * env, jclass obj, jstring audioSrc, jstring videoSrc, jstring dest)
{
 int ret;
 av_log_set_callback(&FFMPEG_Callback);
 // const char* input_video_file_name = "payphone.mp4";
 // const char* input_audio_file_name = "payphone.mp3";
 // const char* output_file_name = "out.mp4";
 const char* input_audio_file_name = (const char*)env->GetStringUTFChars(audioSrc, NULL);
 const char* input_video_file_name = (const char*)env->GetStringUTFChars(videoSrc, NULL);
 const char* output_file_name = (const char*)env->GetStringUTFChars(dest, NULL);

 debug("video src: %s", input_video_file_name);
 debug("audio src: %s", input_audio_file_name);
 debug("dest src: %s", output_file_name);

 AVFormatContext* ifmt_ctx_v = NULL, * ifmt_ctx_a = NULL;
 AVFormatContext* ofmt_ctx = NULL;

 int in_stream_index_v = -1;
 int in_stream_index_a = -1;

 int out_stream_index_v = -1;
 int out_stream_index_a = -1;

 debug("<--------------- input file info --------------->\n");

 if ((ret = avformat_open_input(&ifmt_ctx_v, input_video_file_name, NULL, NULL)) < 0) {
 debug("Cannot open input file\n");
 return ret;
 }
 if ((ret = avformat_find_stream_info(ifmt_ctx_v, NULL)) < 0) {
 debug("Cannot find stream information\n");
 return ret;
 }
 ret = av_find_best_stream(ifmt_ctx_v, AVMEDIA_TYPE_VIDEO, -1, -1, NULL, 0);
 if (ret < 0) {
 debug("Cannot find video stream\n");
 return ret;
 }
 in_stream_index_v = ret;
 av_dump_format(ifmt_ctx_v, 0, input_video_file_name, 0);

 if ((ret = avformat_open_input(&ifmt_ctx_a, input_audio_file_name, NULL, NULL)) < 0) {
 debug("Cannot open input file\n");
 return ret;
 }
 if ((ret = avformat_find_stream_info(ifmt_ctx_a, NULL)) < 0) {
 debug("Cannot find stream information\n");
 return ret;
 }
 ret = av_find_best_stream(ifmt_ctx_a, AVMEDIA_TYPE_AUDIO, -1, -1, NULL, 0);
 if (ret < 0) {
 debug("Cannot find audio stream\n");
 return ret;
 }
 in_stream_index_a = ret;
 av_dump_format(ifmt_ctx_a, 0, input_audio_file_name, 0);

 ret = avformat_alloc_output_context2(&ofmt_ctx, NULL, NULL, output_file_name);
 if (ret < 0) {
 debug("Cannot open output file\n");
 return ret;
 }
 if (in_stream_index_v >= 0) {
 AVStream* in_stream = ifmt_ctx_v->streams[in_stream_index_v];
 AVStream* out_stream = avformat_new_stream(ofmt_ctx, NULL);
 debug("\n<--------------- crash begin --------------->\n");
** //the code crashes here on android **
*** ret = avcodec_parameters_copy(out_stream->codecpar, in_stream->codecpar);***
 debug("\n<--------------- crash end --------------->\n");
 out_stream->codecpar->codec_tag = 0;

 out_stream_index_v = out_stream->index;
 }


// blah...blah...

</fstream></iostream></string>


I have already rebuild .so lib twice, it's not working.
can anyone please tell me why the code works fine on Linux(pc), but it crashes on android?
and i am not really sure how to debug c++ code in android... any help would be appreciated, tks in advance!!!