
Recherche avancée
Autres articles (78)
-
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 -
Amélioration de la version de base
13 septembre 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 (...) -
Emballe médias : à quoi cela sert ?
4 février 2011, parCe plugin vise à gérer des sites de mise en ligne de documents de tous types.
Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;
Sur d’autres sites (6833)
-
dts to m4a (aac) ffmpeg to qaac output issue
10 avril 2014, par user8979Looking to encode 2 dts 5.1 audio sources (
Sonic Landscape
andThe Digital Experience
) to m4a (aac) 5.1 with qaac 2.35. Input piped to qaac using :ffmpeg -report -loglevel verbose -i "input.file" -vn -f wav -codec:a pcm_f32le - | qaac --cvbr 160 --quality 2 --rate=keep --ignorelength --no-delay - -o "output.m4a"
-
Sonic Landscape
duration : 18.848s,qaac
output duration : 18.859s- output .m4a duration mismatch
mediainfo
reports output is 2ch whilemediatab
andffmpeg
report output is 5.1ch (lfe)
-
The Digital Experience
duration : 32.875s,qaac
output duration : 32.875smediainfo
reports output is 2ch whilemediatab
andffmpeg
report output is 5.1ch (lfe)
- what caused the duration mismatch in the first one ? how can it be fixed ?
- is the output 2ch or 5.1ch ?
- if it is 2ch, what
qaac
option(s) leave the channels in output same as input ? - if the output is 5.1ch, does
qaac
then always preserve channels unless explicitly told otherwise ?
- if it is 2ch, what
-
-
pyInstaller : Pack binary executable inside project's executable to run
18 décembre 2023, par zurTLDR ;


I would like to pack the
ffmpeg
executable inside my own executable. Currently I am getting

FileNotFoundError: [Errno 2] No such file or directory: 'ffmpeg'
Skipping ./testFile202312061352.mp4 due to FileNotFoundError: [Errno 2] No such file or directory: 'ffmpeg'



Details :


I am creating executable file using following command :


pyinstaller cli.py \
 --onefile \
 --add-binary /Users/<machineuser>/anaconda3/envs/my_env/bin/ffmpeg:bin
</machineuser>


The code that uses
ffmpeg
is not authored by me. And I would like to keep that part the same.

When I run from command line while
conda
environment is active I can successfully run it aspython
(or perhapsanaconda
) knows where the binaries are. I have a pretty emptycli.py
. That seems to be the entry point and I hope if it is possible I can set thebin
directory's path there ...

I am able to successfully run the application like following :


(my_env) machineUser folder % "dist/cli_mac_001202312051431" ./testFile202312061352.mp4



I would like to run like following :


(base) machineUser folder % "dist/cli_mac_001202312051431" ./testFile202312061352.mp4



I would like to keep the world out side my executable's tmp folder the same. I would not want to change something that will be "left behind" after the exec is terminated.


Question :


Can some one please mention how to modify the
pyinstaller
command or what to change incli.py
to achieve it successfully ?

-
How to write a text in a frame using ffmpeg
21 février 2024, par Jorge Augusto WilchenI need to write a text in every frame before write in the video file, this text will be passed as a argument (std::string or char, whatever you want to best solution). For example, write "Hello World" 24px, color yellow, position 30x30.


How can i do this ?


This is my function that read frames to a AVPacket and write in the video file :


bool VideoRecorder::record_video()
{
 if (recording) {
 AVPacket packet;

 while (recording && av_read_frame(inputFormatContext, &packet) >= 0) {
 AVStream* in_stream = inputFormatContext->streams[packet.stream_index];
 AVStream* out_stream = outputFormatContext->streams[0];

 // Adjustment of DTS and PTS to ensure increasing monoticity
 if (packet.pts != AV_NOPTS_VALUE) {
 packet.pts = av_rescale_q_rnd(packet.pts, in_stream->time_base, out_stream->time_base, AVRounding(AV_ROUND_NEAR_INF | AV_ROUND_PASS_MINMAX));
 }

 if (packet.dts != AV_NOPTS_VALUE) {
 packet.dts = av_rescale_q_rnd(packet.dts, in_stream->time_base, out_stream->time_base, AVRounding(AV_ROUND_NEAR_INF | AV_ROUND_PASS_MINMAX));
 }

 packet.duration = av_rescale_q(packet.duration, in_stream->time_base, out_stream->time_base);

 packet.stream_index = 0;

 av_interleaved_write_frame(outputFormatContext, &packet);

 av_packet_unref(&packet);
 }


 return true;
 }

 std::cerr << "Error recording video. Recording not started or already stopped." << std::endl;
 return false;
}