
Recherche avancée
Médias (1)
-
SWFUpload Process
6 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
Autres articles (81)
-
Gestion générale des documents
13 mai 2011, parMédiaSPIP ne modifie jamais le document original mis en ligne.
Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...) -
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Qu’est ce qu’un éditorial
21 juin 2013, parEcrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
Vous pouvez personnaliser le formulaire de création d’un éditorial.
Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...)
Sur d’autres sites (10078)
-
High pitched audio or no audio at all when converting AVI video to MP4 with FFmpeg [closed]
15 août 2023, par Karen SI'm pretty new to FFmpeg and I'm having trouble converting a video from AVI format to MP4. I'm trying to convert pcm_s16le to aac. No matter what audio stream I use, the resulting audio in the MP4 file is either very high pitched and choppy (stream 1) or the audio stream is silent (stream 2).


The AVI video has two audio streams :


Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
Stream #0:2: Audio: pcm_s16le, 32000 Hz, stereo, s16, 1024 kb/s



In VLC Media Player the video plays fine and it uses the second audio stream.


When I run
ffmpeg -i input.avi -vcodec libx264 -crf 27 output.mp4
in my terminal, the output audio in the MP4 file is very high pitched and choppy in VLC.
This is the codec information for the audio stream in VLC after the conversion :

Codec: MPEG AAC Audio (mp4a)
Type: Audio
Channels: Stereo
Sample rate: 48000 Hz
Bits per sample: 32



When I specify the audio stream and codec the resulting video is silent.


ffmpeg -i input.avi -map 0:v:0 -vcodec libx264 -crf 29 -map 0:a:1 -acodec aac output.mp4



This is the terminal output from FFmpeg :


FILEPATH -i "input.avi" -map 0:v:0 -vcodec libx264 -crf 29 -map 0:a:1 -acodec aac "output.mp4"
ffmpeg version 2023-06-11-git-09621fd7d9-full_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers
 built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
 configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libvpl --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
 libavutil 58. 13.100 / 58. 13.100
 libavcodec 60. 17.100 / 60. 17.100
 libavformat 60. 6.100 / 60. 6.100
 libavdevice 60. 2.100 / 60. 2.100
 libavfilter 9. 8.101 / 9. 8.101
 libswscale 7. 3.100 / 7. 3.100
 libswresample 4. 11.100 / 4. 11.100
 libpostproc 57. 2.100 / 57. 2.100
[avi @ 000002533665a400] Switching to NI mode, due to poor interleaving
Input #0, avi, from 'input.avi':
 Duration: 00:10:40.64, start: 0.000000, bitrate: 28852 kb/s
 Stream #0:0: Video: dvvideo, yuv411p, 720x480 [SAR 32:27 DAR 16:9], 25000 kb/s, SAR 8:9 DAR 4:3, 60k fps, 29.97 tbr, 60k tbn
 Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
 Stream #0:2: Audio: pcm_s16le, 32000 Hz, stereo, s16, 1024 kb/s
File 'output.mp4' already exists. Overwrite? [y/N] y
Stream mapping:
 Stream #0:0 -> #0:0 (dvvideo (native) -> h264 (libx264))
 Stream #0:2 -> #0:1 (pcm_s16le (native) -> aac (native))
Press [q] to stop, [?] for help
[libx264 @ 00000253366702c0] using SAR=8/9
[libx264 @ 00000253366702c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 00000253366702c0] profile High 4:2:2, level 3.0, 4:2:2, 8-bit
[libx264 @ 00000253366702c0] 264 - core 164 r3107 a8b68eb - H.264/MPEG-4 AVC codec - Copyleft 2003-2023 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=29.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'output.mp4':
 Metadata:
 encoder : Lavf60.6.100
 Stream #0:0: Video: h264 (avc1 / 0x31637661), yuv422p(tv, bottom coded first (swapped)), 720x480 [SAR 8:9 DAR 4:3], q=2-31, 29.97 fps, 30k tbn
 Metadata:
 encoder : Lavc60.17.100 libx264
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
 Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 32000 Hz, stereo, fltp, 128 kb/s
 Metadata:
 encoder : Lavc60.17.100 aac
[dvvideo @ 000002533879d780] Concealing bitstream errors.41 bitrate= 901.6kbits/s speed=2.01x
 Last message repeated 76 times
[dvvideo @ 000002533878f640] Concealing bitstream errors.43 bitrate= 925.1kbits/s speed=1.97x
 Last message repeated 19 times
[out#0/mp4 @ 00000253366770c0] video:72743kB audio:119kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.649282%
frame=19200 fps= 58 q=-1.0 Lsize= 73335kB time=00:10:40.61 bitrate= 937.8kbits/s speed=1.92x
[libx264 @ 00000253366702c0] frame I:99 Avg QP:28.84 size: 35252
[libx264 @ 00000253366702c0] frame P:4922 Avg QP:31.82 size: 9208
[libx264 @ 00000253366702c0] frame B:14179 Avg QP:36.03 size: 1811
[libx264 @ 00000253366702c0] consecutive B-frames: 1.2% 0.8% 1.1% 97.0%
[libx264 @ 00000253366702c0] mb I I16..4: 13.7% 74.6% 11.7%
[libx264 @ 00000253366702c0] mb P I16..4: 1.7% 6.7% 1.1% P16..4: 38.6% 13.2% 9.3% 0.0% 0.0% skip:29.3%
[libx264 @ 00000253366702c0] mb B I16..4: 0.2% 0.5% 0.0% B16..8: 37.3% 2.8% 0.7% direct: 2.1% skip:56.3% L0:42.5% L1:52.2% BI: 5.3%
[libx264 @ 00000253366702c0] 8x8 transform intra:69.6% inter:71.7%
[libx264 @ 00000253366702c0] coded y,uvDC,uvAC intra: 65.4% 59.0% 8.7% inter: 12.9% 7.0% 0.1%
[libx264 @ 00000253366702c0] i16 v,h,dc,p: 12% 64% 7% 16%
[libx264 @ 00000253366702c0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 11% 26% 26% 5% 6% 5% 8% 5% 8%
[libx264 @ 00000253366702c0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 9% 48% 15% 4% 5% 4% 7% 3% 5%
[libx264 @ 00000253366702c0] i8c dc,h,v,p: 61% 19% 16% 4%
[libx264 @ 00000253366702c0] Weighted P-Frames: Y:3.5% UV:1.3%
[libx264 @ 00000253366702c0] ref P L0: 55.4% 15.5% 20.6% 8.2% 0.3%
[libx264 @ 00000253366702c0] ref B L0: 89.3% 8.2% 2.5%
[libx264 @ 00000253366702c0] ref B L1: 95.5% 4.5%
[libx264 @ 00000253366702c0] kb/s:930.17
[aac @ 00000253382c31c0] Qavg: 65536.000



Could someone point me in the right direction please ? I've tried doing the conversion with Handbrake as well and the audio is still choppy.


-
Have an error running one batch script to concatenate avi files, when a very similar script works fine
1er juillet 2023, par hw22sWhen I run the following bath script to concatenate the .avi files in a folder, I get an error. I am using powershell on a windows computer
Script :


# Set the folder path where the AVI files are located
$folderPath = "C:\Users\HomePC\hswlab\Desktop\videos\eyeblink\022223\2023_04_24\16_15_23\My_WebCam"

# Get all AVI files in the folder
$aviFiles = Get-ChildItem -Path $folderPath -Filter "*.avi" | Sort-Object Name

# Check if there are at least 2 AVI files for concatenation
if ($aviFiles.Count -ge 2) {
 $videoFiles = $aviFiles.FullName

 Write-Host "Input Files for Concatenation:"
 foreach ($file in $aviFiles) {
 Write-Host $file.Name
 }

 $outputFile = Join-Path -Path $folderPath -ChildPath "concatenated.avi"

 # Create the FFmpeg command for concatenation
 $concatArguments = "-f", "concat", "-i", "`"concat:$videoFiles`"", "-c", "copy", "`"$outputFile`""

 $command = "ffmpeg $concatArguments"
 Write-Host "FFmpeg Command: $command"

 try {
 $process = Start-Process -FilePath "ffmpeg" -ArgumentList $concatArguments -NoNewWindow -PassThru -Wait -ErrorAction Stop
 Write-Host "Concatenation complete. Output file: $outputFile"
 } catch {
 Write-Host "Error occurred while executing FFmpeg command:"
 Write-Host "Error message: $($_.Exception.Message)"
 }
} else {
 Write-Host "Not enough AVI files found in the folder for concatenation."
}




Output with error (and no concatenated file is actually produced, needless to say) :


Input Files for Concatenation:
webcam0.avi
webcam1.avi
FFmpeg Command: ffmpeg -f concat -i "concat:C:\Users\HomePC\hswlab\Desktop\videos\eyeblink\022223\2023_04_24\16_15_23\My_WebCam\webcam0.avi C:\Users\HomePC\hswlab\Desktop\videos\eyeblink\022223\2023_04_24\16_15_23\My_WebCam\webcam1.avi" -c copy "C:\Users\HomePC\hswlab\Desktop\videos\eyeblink\022223\2023_04_24\16_15_23\My_WebCam\concatenated.avi"
ffmpeg version 2023-06-27-git-9b6d191a66-essentials_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers
 built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
 configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libvpl --enable-libgme --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-librubberband
 libavutil 58. 13.101 / 58. 13.101
 libavcodec 60. 21.100 / 60. 21.100
 libavformat 60. 9.100 / 60. 9.100
 libavdevice 60. 2.100 / 60. 2.100
 libavfilter 9. 8.102 / 9. 8.102
 libswscale 7. 3.100 / 7. 3.100
 libswresample 4. 11.100 / 4. 11.100
 libpostproc 57. 2.100 / 57. 2.100
[in#0 @ 000001d2f05f1b00] Error opening input: Invalid argument
Concatenation complete. Output file: C:\Users\HomePC\hswlab\Desktop\videos\eyeblink\022223\2023_04_24\16_15_23\My_WebCam\concatenated.avi



But this script, which ostensibly does the same thing to the same files, works fine :


$file1 = "C:\Users\HomePC\hswlab\Desktop\videos\eyeblink\022223\2023_04_24\16_15_23\My_WebCam\webcam0.avi" # Path to the first video file
$file2 = "C:\Users\HomePC\hswlab\Desktop\videos\eyeblink\022223\2023_04_24\16_15_23\My_WebCam\webcam1.avi" # Path to the second video file
$outputFile = "C:\Users\HomePC\hswlab\Desktop\videos\eyeblink\022223\2023_04_24\16_15_23\My_WebCam\concat.avi" # Path to the output concatenated video file

# Create a temporary batch script
$batchScriptPath = [System.IO.Path]::GetTempFileName() + ".bat"
@'
@echo off
ffmpeg -i "%~1" -i "%~2" -filter_complex "[0:v][1:v]concat=n=2:v=1[outv]" -map "[outv]" "%~3"
'@ | Set-Content -Path $batchScriptPath

# Execute the temporary batch script
try {
 & $batchScriptPath $file1 $file2 $outputFile
 Write-Host "Concatenation complete. Output file: $outputFile"
} catch {
 Write-Host "Error occurred while executing FFmpeg command:"
 Write-Host $_.Exception.Message
}

# Remove the temporary batch script
Remove-Item -Path $batchScriptPath -Force




I can't figure out what is wrong with the first script. Any help ?? Thank you !!


Tried many variations on the first script but cannot get it to work.


-
Virginia Consumer Data Protection Act (VCDPA) Guide
27 septembre 2023, par Erin — Privacy