
Recherche avancée
Autres articles (32)
-
Mise à jour de la version 0.1 vers 0.2
24 juin 2013, parExplications 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 (...) -
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
Soumettre améliorations et plugins supplémentaires
10 avril 2011Si vous avez développé une nouvelle extension permettant d’ajouter une ou plusieurs fonctionnalités utiles à MediaSPIP, faites le nous savoir et son intégration dans la distribution officielle sera envisagée.
Vous pouvez utiliser la liste de discussion de développement afin de le faire savoir ou demander de l’aide quant à la réalisation de ce plugin. MediaSPIP étant basé sur SPIP, il est également possible d’utiliser le liste de discussion SPIP-zone de SPIP pour (...)
Sur d’autres sites (6276)
-
Parsing NAL units using FFMPEG
6 novembre 2013, par 2ndlifeI am new to MPEG-4 and taking baby steps to learn it. I am using FFMPEG as reference.
-
I understand that all mpeg-4 are encoded into NAL units and wrt to FFMPEG av_read_frame() function returns one NAL unit, Am I right ? Is frame a NAL unit ? (though it can be a combination of multiple NALs)
-
I also saw that h264_parser.c implements a function called h264_parse which is calling parse_nal_units() inside, If i need to get NAL units how can I use this parse_nal_units from my main function ?
-
What is av_parse_Parse2() function do ? does it return decoded NAL units ?
-
OR FFMPEG has -vbsf h264_mp4toannexb switch to dump raw NAL units, Can somebody help me understand how I can use the same from my main function ?
Please help me out here...
ash5
-
-
passing script variable of filename with spaces in bash to external program (ffmpeg) fails
13 janvier 2016, par BostonScottShort story : I’m trying to write a script that will use FFmpeg to convert the many files stored in one directory to a "standard" mp4 format and save the converted files in another directory. It’s been a learning experience (a fun one !) since I haven’t done any real coding since using Pascal and FORTRAN on an IBM 370 mainframe was in vogue.
Essentially the script takes the filename, strips the path and extension off it, reassembles the filename with the path and an mp4 extension and calls FFmpeg with some set parameters to do the conversion. If the directory contains only video files with without spaces in the names, then everything works fine. If the filenames contain spaces, then FFmpeg is not able to process the file and moves on to the next one. The error indicates that FFMpeg is only seeing the filename up to the first space. I’ve included both the script and output below.
Thanks for any help and suggestions you may have. If you think I should be doing this in another way, please by all means, give me your suggestions. As I said, it’s been a long time since I did anything like this. I’m enjoying it though.
I’ve include the code first followed by example output.
for file in ./TBC/*.mp4
do
echo "Start of iteration"
echo "Full text of file name:" $file
#Remove everything up to "C/" (filename without path)
fn_orig=${file#*C/}
echo "Original file name:" $fn_orig
#Length of file name
fn_len=${#fn_orig}
echo "Filename Length:" $fn_len
#file name without path or extension
fn_base=${fn_orig:0:$fn_len-4}
echo "Base file name:" $fn_base
#new filename suffix
newsuffix=".conv.mp4"
fn_out=./CONV/$fn_base$newsuffix
echo "Converted file name:" $fn_out
ffmpeg -i $file -metadata title="$fn_orig" -c:v libx264 -c:a libfdk_aac -b:a 128k $fn_out
echo "End of iteration"
echo
done
echo "Script completed"With the ffmpeg line commented out, and two files in the ./TBC directory, this is the output that I get
Start of iteration
Full text of file name: ./TBC/Test file with spaces.mp4
Original filename: Test file with spaces.mp4
Filename Length: 25
Base filename: Test file with spaces
Converted file name: ./CONV/Test file with spaces.conv.mp4
End of iteration
Start of iteration
Full text of file name: ./TBC/Test_file_with_NO_spaces.mp4
Original file name: Test_file_with_NO_spaces.mp4
Filename Length: 28
Base file name: Test_file_with_NO_spaces
Converted file name: ./CONV/Test_file_with_NO_spaces.conv.mp4
End of iteration
Script completedI won’t bother to post the results when ffmpeg is uncommented, other than to state that it fails with the error :
./TBC/Test : No such file or directoryThe script then continues to the next file which completes successfully because it has no spaces in its name. The actual filename is "Test file with spaces.mp4" so you can see that ffmpeg stops after the word "Test" when it encounters a space.
I hope this has been clear and concise and hopefully someone will be able to point me in the right direction. There is a lot more that I want to do with this script such as parsing subdirectories and ignoring non-video files, etc.
I look forward to any insight you can give !
-
Android + ffmpeg + AudioTrack produces bad audio output
12 septembre 2014, par Goddchenhere is what I am trying to do : use an
AudioRecord
and "pipe" the output ofAudioRecord.read(byte[],...)
to an ffmpeg process’ stdin that will convert to a 3gp (AAC) file.The ffmpeg call is as follows :
ProcessBuilder processBuilder = new ProcessBuilder(BINARY.getAbsolutePath(),
"-y",
"-ar", "44100", "-c:a", "pcm_s16le", "-ac", "1","-f","s16le",
"-i", "-",
"-strict", "-2", "-c:a", "aac",
outFile.getAbsolutePath());The AudioRecord is setup as follows :
AudioRecord record = new AudioRecord(/*AudioSource.VOICE_RECOGNITION,*/ AudioSource.MIC,
SAMPLING_RATE,
AudioFormat.CHANNEL_IN_MONO,
AudioFormat.ENCODING_PCM_16BIT,
bufferSize);SAMPLING_RATE = 44100
andbufferSize
is the one returned byAudioRecord.getMinBufferSize(...)
I am writing the data to ffmpeg like this :
try {
IOUtils.write(data, getFFmpegHelper().getCurrentProcessOutputStream());
} catch (Exception e) {
Log.e(Application.LOG_TAG, "Error writing data to ffmpeg process", e);
//TODO notify user, stop the recording, etc...
}So far so good, the ffmpeg runs and created a proper 3gp file. But the audio in the file is totally off. It seems "choppy" (not sure if this is the correct english word ;) ) and also the pace is wrong, is plays too fast.
Check out this sample : http://goddchen.de/android/tmp/tmp.3gp
This is the output of the ffmpeg process :
[s16le @ 0x23634d0] Estimating duration from bitrate, this may be inaccurate
Guessed Channel Layout for Input Stream #0.0 : mono
Input #0, s16le, from 'pipe:':
Duration: N/A, start: 0.000000, bitrate: 705 kb/s
Stream #0:0: Audio: pcm_s16le, 44100 Hz, mono, s16, 705 kb/s
[aformat @ 0x2363100] auto-inserting filter 'auto-inserted resampler 0' between the filter 'src' and the filter 'aformat'
[aresample @ 0x235b0a0] chl:mono fmt:s16 r:44100Hz -> chl:mono fmt:flt r:44100Hz
Output #0, 3gp, to '/data/data/com.test.audio/files/tmp.3gp':
Metadata:
encoder : Lavf54.6.100
Stream #0:0: Audio: aac (mp4a / 0x6134706D), 44100 Hz, mono, flt, 128 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (pcm_s16le -> aac)
size= 3kB time=00:00:00.18 bitrate= 132.5kbits/s
size= 8kB time=00:00:00.55 bitrate= 120.9kbits/s
size= 12kB time=00:00:00.83 bitrate= 121.8kbits/s
size= 16kB time=00:00:01.04 bitrate= 122.8kbits/s
size= 20kB time=00:00:01.32 bitrate= 122.5kbits/s
size= 23kB time=00:00:01.53 bitrate= 121.6kbits/s
size= 27kB time=00:00:01.81 bitrate= 121.0kbits/s
size= 31kB time=00:00:02.11 bitrate= 120.7kbits/s
size= 35kB time=00:00:02.32 bitrate= 123.4kbits/s
video:0kB audio:34kB global headers:0kB muxing overhead 3.031610%