
Recherche avancée
Autres articles (41)
-
D’autres logiciels intéressants
12 avril 2011, parOn ne revendique pas d’être les seuls à faire ce que l’on fait ... et on ne revendique surtout pas d’être les meilleurs non plus ... Ce que l’on fait, on essaie juste de le faire bien, et de mieux en mieux...
La liste suivante correspond à des logiciels qui tendent peu ou prou à faire comme MediaSPIP ou que MediaSPIP tente peu ou prou à faire pareil, peu importe ...
On ne les connais pas, on ne les a pas essayé, mais vous pouvez peut être y jeter un coup d’oeil.
Videopress
Site Internet : (...) -
Le plugin : Podcasts.
14 juillet 2010, parLe problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
Types de fichiers supportés dans les flux
Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...) -
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 (...)
Sur d’autres sites (4332)
-
FFMPEG Command in Android Failing to Execute
15 janvier 2015, par ZoeI’m trying to execute ffmpeg commands through an android app I’m developing.
I found this post which has been somewhat useful :
Problems with ffmpeg command line on androidand I downloaded a static build of ffmpeg from here : http://ffmpeg.gusari.org/static/
The problem is, when this code runs
public void merge_video(){
String[] ffmpegCommand = new String[5];
ffmpegCommand[0] = "/data/data/com.example.zovideo/ffmpeg";
ffmpegCommand[1] = "-i";
ffmpegCommand[2] = "concat:storage/emulated/0/DCIM/Camera/VID30141106_211509.mp4|storage/emulated/0/DCIM/Camera/VID30141106_211509.mp4";
ffmpegCommand[3] = "copy";
ffmpegCommand[4] = "storage/emulated/0/DCIM/ZoVideo/Output.mp4";
try {
Process ffmpegProcess = new ProcessBuilder(ffmpegCommand).redirectErrorStream(true).start();
String line;
BufferedReader reader = new BufferedReader(new InputStreamReader(ffmpegProcess.getInputStream()));
Log.d(null, "*******Starting FFMPEG");
while((line = reader.readLine())!=null){
Log.d(null, "***"+line+"***");
}
Log.d(null,"****ending FFMPEG****");
} catch (IOException e) {
e.printStackTrace();
}
}It fails when trying to start the process with
Java.io.IOException: Error running exec(). Command: [/data/data/com.example.zovideo/ffmpeg, -i, concat:storage/emulated/0/DCIM/Camera/VID30141106_211509.mp4|storage/emulated/0/DCIM/Camera/VID30141106_211509.mp4, copy, storage/emulated/0/DCIM/ZoVideo/Output.mp4] Working Directory: null Environment: [ANDROID_ROOT=/system, EMULATED_STORAGE_SOURCE=/mnt/shell/emulated, LOOP_MOUNTPOINT=/mnt/obb, LD_PRELOAD=libsigchain.so, ANDROID_BOOTLOGO=1, EMULATED_STORAGE_TARGET=/storage/emulated, EXTERNAL_STORAGE=/storage/emulated/legacy, SYSTEMSERVERCLASSPATH=/system/framework/services.jar:/system/framework/ethernet-service.jar:/system/framework/wifi-service.jar, ANDROID_SOCKET_zygote=10, PATH=/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin, ANDROID_DATA=/data, ANDROID_ASSETS=/system/app, ASEC_MOUNTPOINT=/mnt/asec, BOOTCLASSPATH=/system/framework/core-libart.jar:/system/framework/conscrypt.jar:/system/framework/okhttp.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/ims-common.jar:/system/framework/mms-common.jar:/system/framework/android.policy.jar:/system/framework/apache-xml.jar, ANDROID_PROPERTY_WORKSPACE=9,0, ANDROID_STORAGE=/storage]
I understand from the stackoverflow post I mentioned above that the ffmpeg static build needs to be on my device otherwise my app cannot use it.
However I’m unsure how to get it in the /data/data/com.example.zovideo folder as needed.
I have done is download the latest static ffmpeg build from http://ffmpeg.gusari.org/static/ and copied it into my libs/armeabi and libs/armeabi-v7a folders but this obviously hasn’t succeeded in getting into the data/data folder when my app is installed onto my device.
(I feel like I’m being an idiot by copy/pasting the files but I don’t know what else to do. I don’t know how to compile it myself - I have compiled ffmpeg using a Roman10 tutorial but this produces .so files which from which I understand is not what I need)So I’m a little stuck.
Any advice is greatly appreciated. Thanks -
ffmpeg concatenation audio out of sync
24 août 2014, par av8rSo I am attempted to concat clips from a camcorder with anintro and ending clip. All my videos have two streams Video and Audio 0:0 and 0:1 and all the streams are h264 for video and AAC for audio. The into and ending clips were created from a single jpeg image and the audio tracks are silent. The concat portion of my script was created by burke and is the MultiMedia concat script (mcat). If I concat the camcorder clips with my script they come out okay, just slightly off but really not very noticeable when I add the intro and ending clips with the camera clips the final output video is horribly out of sync. The audio/video sync is progressive and as such becomes worse and the video runs. I am not sure what I am doing wrong or what is going wrong to fix this issue. Any help would be much appreciated. Below is the script.
#!/bin/bash
CD="/Applications/CocoaDialog.app/Contents/MacOS/CocoaDialog"
catnum=$($CD standard-inputbox --no-newline \
--title "Video Controls" \
--informative-text "Please enter the catalog number for this sermon.")
[[ $(head -n1 <<< "$catnum") == "2" ]]
catnum=$(tail -n1 <<<"$catnum")
output="$catnum.MP4"
psp_dir="psp/$catnum/"
qhd_dir="qhd/$catnum/"
psp_ts="$psp_dir$catnum-%04d.ts"
qhd_ts="$qhd_dir$catnum-%04d.ts"
EXTRA_OPTIONS='-vcodec libx264 -x264opts opencl -crf 23 -preset faster -acodec libfdk_aac -ac 2 -ar 44100 -ab 128k'
#qhd='-c:v vp9 -map 0 -f segments -segment_time 10 -segment_list $last.m3u8 - segment_format mpegts -s 960x540 -minrate 200k -maxrate 650k -c:a libfdk_aac -strict experimental -ac 1 -ar 22050 -ab 64k'
#psp='-c:v vp9 -map 0 -f segments -segment_time 10 -segment_list $last.m3u8 -segment_format mpegts -s 480x272 -minrate 200k -maxrate 650k -c:a libfdk_aac -strict experimental -ac 1 -ar 22050 -ab 64k'
# OLD Extra_options -vcodec libx264 -crf 23 -preset medium -acodec aac -strict experimental -ac 2 -ar 44100 -ab 128k
TMP=/tmp
files=input/*.MP4
fade_temp=processing/fade_tmp.mp4
fade_temp1=processing/fade_tmp1.mp4
intro='intro.mp4 '
ending='ending.mp4'
rm -f $TMP/mcs_*
rm -f /tmp/hpipe
# mkfifo /tmp/hpipe
fade() {
first=${@:1:1}
second=${@:2:1}
last=${@:$#:1}
sec=$(/usr/local/bin/ffmpeg -i $last 2>&1 | grep "Duration"| cut -d ' ' -f 4 | sed s/,// |awk '{ split($1, A, ":"); print 3600*A[1] + 60*A[2] + A[3] - 1 }')
#sec=`bc <<< $finvidsec-1`
echo "$first and $last"
echo "*** The Time of the Last clip in sec:$sec ***"
ffmpeg -y -i $first -c:v libx264 -x264opts opencl -af "afade=t=in:ss=0:d=1" -vf "fade=in:st=0:d=1:color=white" -pix_fmt yuv420p $fade_temp 2>/dev/null null
ffmpeg -y -i $last -c:v libx264 -x264opts opencl -af "afade=t=out:st=$sec:d=1" -vf "fade=t=out:st=$sec:d=1:color=white" -pix_fmt yuv420p $fade_temp1 2>/dev/null null
mv -f $fade_temp $first
mv -f $fade_temp1 $last
}
concat() {
first=${@:1:1}
second=${@:2:1}
last=${@:$#:1}
len=$(($#-2))
inputs=${@:2:$len}
mkfifo $TMP/mcs_a1 $TMP/mcs_v1
fps=$(ffmpeg -i $first 2>&1 | awk '/fps/{for(f=1;f<=NF;f++){if($f~/^fps,*$/){print $(f-1)}}}')
ffmpeg -y -i $first -vn -f u16le -acodec pcm_s16le -ac 2 -ar 44100 $TMP/mcs_a1 2>/dev/null null &
ffmpeg -y -r $fps -i $first -an -f yuv4mpegpipe -vcodec rawvideo -r 29.97 $TMP/mcs_v1 2>/dev/null null &
all_a=$TMP/mcs_a1
all_v=$TMP/mcs_v1
i=2
for f in $inputs
do
mkfifo $TMP/mcs_a$i $TMP/mcs_v$i
fps=$(ffmpeg -i $f 2>&1 |awk '/fps/{for(f=1;f<=NF;f++){if($f~/^fps,*$/){print $(f-1)}}}')
ffmpeg -y -i $f -vn -f u16le -acodec pcm_s16le -ac 2 -ar 44100 $TMP/mcs_a$i 2>/dev/null null &
{ ffmpeg -y -r $fps -i $f -an -f yuv4mpegpipe -vcodec rawvideo -r 29.97 - 2>/dev/null null | tail -n +2 > $TMP/mcs_v$i ; } &
all_a="$all_a $TMP/mcs_a$i"
all_v="$all_v $TMP/mcs_v$i"
let i++
done
mkfifo $TMP/mcs_a_all
mkfifo $TMP/mcs_v_all
cat $all_a > $TMP/mcs_a_all &
cat $all_v > $TMP/mcs_v_all &
ffmpeg -f u16le -acodec pcm_s16le -ac 2 -ar 44100 -i $TMP/mcs_a_all \
-f yuv4mpegpipe -vcodec rawvideo -i $TMP/mcs_v_all \
$EXTRA_OPTIONS \
$last
rm -f $TMP/mcs_*
#sec=$(/usr/local/bin/ffmpeg -i $last 2>&1 | grep "Duration"| cut -d ' ' -f 4 | sed s/,// |awk '{ split($1, A, ":"); print 3600*A[1] + 60*A[2] + A[3] - 0.5 }')
}
hls() {
first=${@:1:1}
mkdir $psp_dir $qhd_dir
ffmpeg -i $first -f ssegment -bsf h264_mp4toannexb -map 0 -segment_time 10 - segment_list $psp_dir$catnum.m3u8 -segment_format mpegts \
-c:v libx264 -s 480x272 -profile:v baseline -level 3.1 -r 29.97 -g 29.97 \
-keyint_min 90 -x264opts "keyint=90:min-keyint=90:no-scenecut" \
-bufsize 650 -minrate 1 -maxrate 650 \
-c:a libfdk_aac -ar 22050 -ac 1 -ab 32k $psp_ts \
-f ssegment -bsf h264_mp4toannexb -map 0 -segment_time 10 -segment_list $qhd_dir$catnum.m3u8 -segment_format mpegts \
-c:v libx264 -s 960x540 -profile:v baseline -level 3.1 -r 29.97 -g 29.97 \
-keyint_min 90 -x264opts "keyint=90:min-keyint=90:no-scenecut" \
-bufsize 950 -minrate 1 -maxrate 950 \
-c:a libfdk_aac -ar 22050 -ac 1 -ab 32k $qhd_ts
}
fade $files
concat $intro $files $ending $output
hls $output -
FFmpeg stream extraction modifies subtitles [closed]
21 mai 2024, par user18812922I have a video with the following ffprobe output :


Input #0, matroska,webm, from 'video.mkv':
 Metadata:
 title : Video - 01
 creation_time : 2021-07-14T02:49:59.000000Z
 ENCODER : Lavf58.29.100
 Duration: 00:22:57.28, start: 0.000000, bitrate: 392 kb/s
 Chapters:
 Chapter #0:0: start 0.000000, end 86.169000
 Metadata:
 title : Opening
 Chapter #0:1: start 86.169000, end 641.266000
 Metadata:
 title : Part A
 Chapter #0:2: start 641.266000, end 651.359000
 Metadata:
 title : Eyecatch
 Chapter #0:3: start 651.359000, end 1286.160000
 Metadata:
 title : Part B
 Chapter #0:4: start 1286.160000, end 1356.355000
 Metadata:
 title : Ending
 Chapter #0:5: start 1356.355000, end 1376.876000
 Metadata:
 title : Preview
 Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv, bt709), 854x480 [SAR 1280:1281 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn (default)
 Metadata:
 DURATION : 00:22:56.959000000
 Stream #0:1(eng): Audio: vorbis, 48000 Hz, stereo, fltp (default)
 Metadata:
 title : English [FLAC 2.0]
 DURATION : 00:22:57.278000000
 Stream #0:2(jpn): Audio: vorbis, 48000 Hz, stereo, fltp
 Metadata:
 title : Japanese [FLAC 2.0]
 DURATION : 00:22:57.276000000
 Stream #0:3(eng): Subtitle: ass (ssa)
 Metadata:
 title : Signs and Songs [FMA1394/Redc4t]
 DURATION : 00:22:51.090000000
 Stream #0:4(eng): Subtitle: ass (ssa)
 Metadata:
 title : English [FMA1394/Redc4t]
 DURATION : 00:22:51.090000000
 Stream #0:5(eng): Subtitle: hdmv_pgs_subtitle (pgssub), 1920x1080
 Metadata:
 title : Full English Retail
 DURATION : 00:22:51.120000000
 Stream #0:6: Attachment: ttf
 Metadata:
 filename : 8bitoperator.ttf
 mimetype : application/x-truetype-font
 Stream #0:7: Attachment: ttf
 Metadata:
 filename : Cabin-Bold.ttf
 mimetype : application/x-truetype-font
 Stream #0:8: Attachment: ttf
 Metadata:
 filename : calibrib.ttf
 mimetype : application/x-truetype-font
 Stream #0:9: Attachment: ttf
 Metadata:
 filename : daniel_0.ttf
 mimetype : application/x-truetype-font
 Stream #0:10: Attachment: ttf
 Metadata:
 filename : DEATH_FONT.TTF
 mimetype : application/x-truetype-font
 Stream #0:11: Attachment: ttf
 Metadata:
 filename : Dominican.ttf
 mimetype : application/x-truetype-font
 Stream #0:12: Attachment: ttf
 Metadata:
 filename : gishabd.ttf
 mimetype : application/x-truetype-font
 Stream #0:13: Attachment: ttf
 Metadata:
 filename : PATRICK_0.TTF
 mimetype : application/x-truetype-font
 Stream #0:14: Attachment: ttf
 Metadata:
 filename : Qlassik-Medium.ttf
 mimetype : application/x-truetype-font
Unsupported codec with id 98304 for input stream 6
Unsupported codec with id 98304 for input stream 7
Unsupported codec with id 98304 for input stream 8
Unsupported codec with id 98304 for input stream 9
Unsupported codec with id 98304 for input stream 10
Unsupported codec with id 98304 for input stream 11
Unsupported codec with id 98304 for input stream 12
Unsupported codec with id 98304 for input stream 13
Unsupported codec with id 98304 for input stream 14



I am trying to extract the subtitles, edit them and reattach them to the video.
(I need my program to do that so I don't want to use other software)


Command 1


ffmpeg -i video.mkv -map 0:3 -c:s ssa subs.ass
ffmpeg -i video.mkv -i subs.ass -map 0 -map -0:s -map 1 -c copy out.mkv



Command 2


ffmpeg -i video.mkv -map 0:3 subs.ass
ffmpeg -i video.mkv -i subs.ass -map 0 -map -0:s -map 1 -c copy out.mkv



Command 3


ffmpeg -i video.mkv -map 0:3 subs.srt
ffmpeg -i video.mkv -i subs.srt -map 0 -map -0:s -map 1 -c copy out.mkv



Command 4


ffmpeg -i video.mkv -map 0:3 subs.srt
ffmpeg -i subs.srt subs.ass
ffmpeg -i video.mkv -i subs.ass -map 0 -map -0:s -map 1 -c copy out.mkv



Command 5


ffmpeg -i video.mkv -map 0:3 subs.ass
ffmpeg -i subs.ass subs.srt
ffmpeg -i video.mkv -i subs.srt -map 0 -map -0:s -map 1 -c copy out.mkv



The problem


After extraction the subtitles seem to be really quick, meaning they are displayed and disappear really quickly.


For example the first subtitle is as follows in srt :


1
00:00:03,100 --> 00:00:03,560
<font face="Dominican" size="77" color="#f7f7f7">Within the spreading darkness</font>



Now, in srt it also has wrong size but I assume that's because of the conversion from ass to srt.


If I reattach the subtitle file in the video and open it, it is displayed and disappears way too fast and it doesn't match the original subtitles in the video.


(ie, the original video subtitles are showing for at least a second)


Expected behaviour


The subtitles should be displayed for the same duration as the original subtitles.


NOTE


It's my first question for ffmpeg related issues so feel free to ask me for anything else you may need.


UPDATE 1


I realized that the subtitles were ok for the timings as they had the same line multiple times, so the problem for not playing is something else.


Example of the file


1
00:00:03,100 --> 00:00:03,560
<font face="Dominican" size="77" color="#f7f7f7">Within the spreading darkness</font>

2
00:00:03,560 --> 00:00:04,650
<font face="Dominican" size="77" color="#f7f7f7">Within the spreading darkness</font>

3
00:00:04,650 --> 00:00:05,100
<font face="Dominican" size="77" color="#f7f7f7">Within the spreading darkness</font>



So the problem is that VLC doesn't show more than the first subtitle.


The strange thing is when I use the below command


ffmpeg -i video.mkv -i subs.srt -map 0 -map -0:s -map 1 -c copy -c:s subrip out.mkv



Then more lines of the subtitle (but not all) play.


It stops at the 17th line.


I believe that's an encoder's problem ? but I really don't know.


Also what I noticed is that VLC stops the subtitles but Windows Media Player (Windows 11 version) display the subtitles correctly even after the 17th line.


BUT, if I add subtitles from another video they are played correctly in both VLC and Windows Media Player.


Update 2
As @Gyan said in his answer I should use the following command


ffmpeg -i video.mkv -map 0:3 -c:s copy subs.ass



But then if I attach the subs again with


ffmpeg -i video.mkv -i subs.ass -map 0 -map -0:s -map 1 -c copy -c:s ass out.mkv



The subtitles show up to 17th line in both VLC and Windows Media Player.


or


ffmpeg -i video.mkv -i .\subs.ass -map 0 -map -0:s -map 1 -c copy out.mkv



The subtitles do not show up at all. (Not even in Windows Media Player)