
Recherche avancée
Médias (91)
-
Les Miserables
9 décembre 2019, par
Mis à jour : Décembre 2019
Langue : français
Type : Textuel
-
VideoHandle
8 novembre 2019, par
Mis à jour : Novembre 2019
Langue : français
Type : Video
-
Somos millones 1
21 juillet 2014, par
Mis à jour : Juin 2015
Langue : français
Type : Video
-
Un test - mauritanie
3 avril 2014, par
Mis à jour : Avril 2014
Langue : français
Type : Textuel
-
Pourquoi Obama lit il mes mails ?
4 février 2014, par
Mis à jour : Février 2014
Langue : français
-
IMG 0222
6 octobre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Image
Autres articles (78)
-
Le profil des utilisateurs
12 avril 2011, parChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...) -
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. -
Configurer la prise en compte des langues
15 novembre 2010, parAccéder à la configuration et ajouter des langues prises en compte
Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)
Sur d’autres sites (8201)
-
Transcoding/ Converting mpeg to h264 using ffmpeg h264_nvenc
15 septembre 2024, par MustafaI'm trying to transcode a video rendered by Davinci Resolve, using
ffmpeg
from mpeg4 to h264, on Ubuntu, using the following command.

ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -i input.mov -c:a copy -c:v h264_nvenc -b:v 8M -preset 7 output-h264_nvenc-p7.mp4 -v verbose



And my Nvidia card is
NVIDIA GeForce GTX 1650
.

I'm gettting the following error :


[mpeg4 @ 0x55a893ed3200] Video width 3840 not within range from 48 to 2032
[mpeg4 @ 0x55a893ed3200] Failed setup for format cuda: hwaccel initialisation returned error.



And here's the complete output. The command produces an output but its quality is significantly less than the original.


built with gcc 13 (Ubuntu 13.2.0-23ubuntu4)
 configuration: --enable-nonfree --enable-cuda-nvcc --enable-libnpp --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64 --disable-static --enable-shared --enable-gpl --enable-libx264
 libavutil 59. 36.100 / 59. 36.100
 libavcodec 61. 13.100 / 61. 13.100
 libavformat 61. 5.101 / 61. 5.101
 libavdevice 61. 2.101 / 61. 2.101
 libavfilter 10. 2.102 / 10. 2.102
 libswscale 8. 2.100 / 8. 2.100
 libswresample 5. 2.100 / 5. 2.100
 libpostproc 58. 2.100 / 58. 2.100
-vsync is deprecated. Use -fps_mode
Passing a number to -vsync is deprecated, use a string argument as described in the manual.
Selecting decoder 'mpeg4' because of requested hwaccel method cuda
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input.mov':
 Metadata:
 major_brand : qt 
 minor_version : 512
 compatible_brands: qt 
 creation_time : 2024-09-15T04:25:29.000000Z
 encoder : Blackmagic Design DaVinci Resolve
 Duration: 00:20:34.87, start: 0.000000, bitrate: 347243 kb/s
 Stream #0:0[0x1]: Video: mpeg4 (Simple Profile), 1 reference frame (mp4v / 0x7634706D), yuv420p(bt709/bt709/unknown, left), 3840x2160 [SAR 1:1 DAR 16:9], 345703 kb/s, 60 fps, 60 tbr, 15360 tbn (default)
 Metadata:
 creation_time : 2024-09-15T04:25:29.000000Z
 handler_name : VideoHandler
 vendor_id : 
 encoder : MPEG4 Video
 timecode : 01:00:00:00
 Stream #0:1[0x2]: Audio: pcm_s16le (lpcm / 0x6D63706C), 48000 Hz, stereo, s16, 1536 kb/s (default)
 Metadata:
 creation_time : 2024-09-15T04:25:29.000000Z
 handler_name : SoundHandler
 vendor_id : [0][0][0][0]
 Stream #0:2[0x3](eng): Data: none (tmcd / 0x64636D74) (default)
 Metadata:
 creation_time : 2024-09-15T04:25:29.000000Z
 handler_name : TimeCodeHandler
 timecode : 01:00:00:00
[out#0/mp4 @ 0x55a8929e8d80] No explicit maps, mapping streams automatically...
[vost#0:0/h264_nvenc @ 0x55a8929f5880] Created video stream from input stream 0:0
[aost#0:1/copy @ 0x55a893867080] Created audio stream from input stream 0:1
Stream mapping:
 Stream #0:0 -> #0:0 (mpeg4 (native) -> h264 (h264_nvenc))
 Stream #0:1 -> #0:1 (copy)
[vost#0:0/h264_nvenc @ 0x55a8929f5880] Starting thread...
[vf#0:0 @ 0x55a8929f17c0] Starting thread...
[vist#0:0/mpeg4 @ 0x55a89293a100] [dec:mpeg4 @ 0x55a8929f4440] Starting thread...
[in#0/mov,mp4,m4a,3gp,3g2,mj2 @ 0x55a8929e0600] Starting thread...
Press [q] to stop, [?] for help
[mpeg4 @ 0x55a893ed3200] NVDEC capabilities:
[mpeg4 @ 0x55a893ed3200] format supported: yes, max_mb_count: 8192
[mpeg4 @ 0x55a893ed3200] min_width: 48, max_width: 2032
[mpeg4 @ 0x55a893ed3200] min_height: 16, max_height: 2032
[mpeg4 @ 0x55a893ed3200] Video width 3840 not within range from 48 to 2032
[mpeg4 @ 0x55a893ed3200] Failed setup for format cuda: hwaccel initialisation returned error.
[graph -1 input from stream 0:0 @ 0x75c970002e40] w:3840 h:2160 pixfmt:yuv420p tb:1/15360 fr:60/1 sar:1/1 csp:bt709 range:unknown
[graph -1 input from stream 0:0 @ 0x75c970002e40] video frame properties congruent with link at pts_time: 0
[h264_nvenc @ 0x55a8929e62c0] Using device cuda0 (type cuda) with h264_nvenc encoder.
[h264_nvenc @ 0x55a8929e62c0] Loaded Nvenc version 12.2
[h264_nvenc @ 0x55a8929e62c0] Nvenc initialized successfully
[h264_nvenc @ 0x55a8929e62c0] The selected preset is deprecated. Use p1 to p7 + -tune or fast/medium/slow.
Output #0, mp4, to 'output-h264_nvenc-p7.mp4':
 Metadata:
 major_brand : qt 
 minor_version : 512
 compatible_brands: qt 
 encoder : Lavf61.5.101
 Stream #0:0: Video: h264 (Main), 1 reference frame (avc1 / 0x31637661), yuv420p(tv, bt709/bt709/unknown, progressive, left), 3840x2160 [SAR 1:1 DAR 16:9], q=2-31, 8000 kb/s, 60 fps, 15360 tbn (default)
 Metadata:
 creation_time : 2024-09-15T04:25:29.000000Z
 handler_name : VideoHandler
 vendor_id : 
 timecode : 01:00:00:00
 encoder : Lavc61.13.100 h264_nvenc
 Side data:
 cpb: bitrate max/min/avg: 0/0/8000000 buffer size: 16000000 vbv_delay: N/A
 Stream #0:1: Audio: pcm_s16le (ipcm / 0x6D637069), 48000 Hz, stereo, s16, 1536 kb/s (default)
 Metadata:
 creation_time : 2024-09-15T04:25:29.000000Z
 handler_name : SoundHandler
 vendor_id : [0][0][0][0]



How can I find the cause of the error and resolve it ?


Also is there a way to improve the quality of the output video as it's much lower than the original ? I tried doing the same conversion using
libxh264
(using the CPU) and that produced a far better video.

-
ffmpeg python subprocess error only on ubuntu
19 avril 2017, par WongerIm working on an application that is splitting videos from youtube into images. I work on a macbook pro for development, but our app servers run on an ubuntu 12.04 server. The current code on our servers running right now is the following
ffmpeg -i {video_file} -vf fps={fps}
which we run via a subprocess Popen function call in python. This has very slow performance because it is essentially playing back the whole video file to get the frames. I found another SO post that said you could use -accurate_seek -ss to grab single frames at a specific time, but I am facing some issues with that. When i run the command via command line when SSH into our dev server, it works fine, but when i run it via a subprocess Popen call in python, i get the following error :
(standard_in) 1: syntax error
ffmpeg version 3.2.4-static http://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 5.4.1 (Debian 5.4.1-5) 20170205
configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-5 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gray --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg
libavutil 55. 34.101 / 55. 34.101
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.101 / 57. 56.101
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
Option accurate_seek (enable/disable accurate seeking with -ss) cannot be applied to output url test.mkv -- you are trying to apply an input option to an output file or vice versa. Move this option before the file it belongs to.
Error parsing options for output file test.mkv.
Error opening output files: Invalid argumentpython code :
import subprocess
command = "for i in {0..3} ; do ffmpeg -accurate_seek -ss `echo $i*60.0 | bc` -i test.mkv -frames:v 1 images/test_img_$i.jpg ; done"
process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr = subprocess.STDOUT, shell=True)
output = process.communicate()
print output[0].replace('\\n' , '\n')The thing is, when i run this on my OSX terminal, it works fine, but there is some issue with doing it in ubuntu. Does anyone have experience with this issue ?
Output when i run the same exact code in osx :
ffmpeg version 3.0.2 Copyright (c) 2000-2016 the FFmpeg developers
built with Apple LLVM version 7.3.0 (clang-703.0.31)
configuration: --prefix=/usr/local/Cellar/ffmpeg/3.0.2 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libxvid --enable-libvpx --enable-vda
libavutil 55. 17.103 / 55. 17.103
libavcodec 57. 24.102 / 57. 24.102
libavformat 57. 25.100 / 57. 25.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 31.100 / 6. 31.100
libavresample 3. 0. 0 / 3. 0. 0
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Input #0, matroska,webm, from 'test.mkv':
Metadata:
COMPATIBLE_BRANDS: iso6avc1mp41
MAJOR_BRAND : dash
MINOR_VERSION : 0
ENCODER : Lavf57.25.100
Duration: 00:02:10.20, start: 0.007000, bitrate: 2729 kb/s
Stream #0:0: Video: h264 (High), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
Metadata:
HANDLER_NAME : VideoHandler
DURATION : 00:02:10.172000000
Stream #0:1(eng): Audio: opus, 48000 Hz, stereo, fltp (default)
Metadata:
DURATION : 00:02:10.201000000
[swscaler @ 0x7f9b4b008000] deprecated pixel format used, make sure you did set range correctly
Output #0, image2, to 'images/test_img_0.jpg':
Metadata:
COMPATIBLE_BRANDS: iso6avc1mp41
MAJOR_BRAND : dash
MINOR_VERSION : 0
encoder : Lavf57.25.100
Stream #0:0: Video: mjpeg, yuvj420p(pc), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 23.98 fps, 23.98 tbn, 23.98 tbc (default)
Metadata:
HANDLER_NAME : VideoHandler
DURATION : 00:02:10.172000000
encoder : Lavc57.24.102 mjpeg
Side data:
unknown side data type 10 (24 bytes)
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> mjpeg (native))
Press [q] to stop, [?] for help
frame= 1 fps=0.0 q=7.2 Lsize=N/A time=00:00:00.04 bitrate=N/A speed= 1x
video:73kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
....One thing i forgot to mention is that on my mac i used homebrew to install ffmpeg, where as on Ubuntu i used a static build
other stack overflow reference : Fastest way to extract frames using ffmpeg ?
-
ffmpeg python subprocess error only on ubuntu
10 décembre 2018, par WongerIm working on an application that is splitting videos from youtube into images. I work on a macbook pro for development, but our app servers run on an ubuntu 12.04 server. The current code on our servers running right now is the following
ffmpeg -i {video_file} -vf fps={fps}
which we run via a subprocess Popen function call in python. This has very slow performance because it is essentially playing back the whole video file to get the frames. I found another SO post that said you could use -accurate_seek -ss to grab single frames at a specific time, but I am facing some issues with that. When i run the command via command line when SSH into our dev server, it works fine, but when i run it via a subprocess Popen call in python, i get the following error :
(standard_in) 1: syntax error
ffmpeg version 3.2.4-static http://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 5.4.1 (Debian 5.4.1-5) 20170205
configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-5 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gray --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg
libavutil 55. 34.101 / 55. 34.101
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.101 / 57. 56.101
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
Option accurate_seek (enable/disable accurate seeking with -ss) cannot be applied to output url test.mkv -- you are trying to apply an input option to an output file or vice versa. Move this option before the file it belongs to.
Error parsing options for output file test.mkv.
Error opening output files: Invalid argumentpython code :
import subprocess
command = "for i in {0..3} ; do ffmpeg -accurate_seek -ss `echo $i*60.0 | bc` -i test.mkv -frames:v 1 images/test_img_$i.jpg ; done"
process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr = subprocess.STDOUT, shell=True)
output = process.communicate()
print output[0].replace('\\n' , '\n')The thing is, when i run this on my OSX terminal, it works fine, but there is some issue with doing it in ubuntu. Does anyone have experience with this issue ?
Output when i run the same exact code in osx :
ffmpeg version 3.0.2 Copyright (c) 2000-2016 the FFmpeg developers
built with Apple LLVM version 7.3.0 (clang-703.0.31)
configuration: --prefix=/usr/local/Cellar/ffmpeg/3.0.2 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libxvid --enable-libvpx --enable-vda
libavutil 55. 17.103 / 55. 17.103
libavcodec 57. 24.102 / 57. 24.102
libavformat 57. 25.100 / 57. 25.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 31.100 / 6. 31.100
libavresample 3. 0. 0 / 3. 0. 0
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Input #0, matroska,webm, from 'test.mkv':
Metadata:
COMPATIBLE_BRANDS: iso6avc1mp41
MAJOR_BRAND : dash
MINOR_VERSION : 0
ENCODER : Lavf57.25.100
Duration: 00:02:10.20, start: 0.007000, bitrate: 2729 kb/s
Stream #0:0: Video: h264 (High), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
Metadata:
HANDLER_NAME : VideoHandler
DURATION : 00:02:10.172000000
Stream #0:1(eng): Audio: opus, 48000 Hz, stereo, fltp (default)
Metadata:
DURATION : 00:02:10.201000000
[swscaler @ 0x7f9b4b008000] deprecated pixel format used, make sure you did set range correctly
Output #0, image2, to 'images/test_img_0.jpg':
Metadata:
COMPATIBLE_BRANDS: iso6avc1mp41
MAJOR_BRAND : dash
MINOR_VERSION : 0
encoder : Lavf57.25.100
Stream #0:0: Video: mjpeg, yuvj420p(pc), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 23.98 fps, 23.98 tbn, 23.98 tbc (default)
Metadata:
HANDLER_NAME : VideoHandler
DURATION : 00:02:10.172000000
encoder : Lavc57.24.102 mjpeg
Side data:
unknown side data type 10 (24 bytes)
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> mjpeg (native))
Press [q] to stop, [?] for help
frame= 1 fps=0.0 q=7.2 Lsize=N/A time=00:00:00.04 bitrate=N/A speed= 1x
video:73kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
....One thing i forgot to mention is that on my mac i used homebrew to install ffmpeg, where as on Ubuntu i used a static build
other stack overflow reference : Fastest way to extract frames using ffmpeg ?