
Recherche avancée
Autres articles (62)
-
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 -
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. -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...)
Sur d’autres sites (6690)
-
Ffmpeg : How to fix error "Please choose an encoder manually" ?
9 juillet 2023, par AlexI am trying to convert a x265 videofile to a x264 format so it can be played on a television. I am trying the following command


ffmpeg -i input.mkv -f mp4 -vcodec libx264 -preset fast -profile:v main -acodec aac -map 0:0 -map 0:1 -map 0:2 test.mp4



to select videos stream 0:0 for video, stream 0:1 for audio and stream 0:2 for the subtitle. However I get an error


Automatic encoder selection failed Default encoder for format mp4 (codec none) is probably disabled. Please choose an encoder manually.
Error selecting an encoder



How to fix this command ?


P.S. I am not an expert in
ffmpeg
or videos conversion/formats/encodings/audio formats/subtitle formats.

I found EXACTLY ONE google search result with the exact error phrase HERE. And that is not helping as I do not even understand the first sentence.


Below is the output for the first three streams :


Input #0, matroska,webm, from 'input.mkv':
 Metadata:
 creation_time : 2021-03-25T09:13:20.000000Z
 ENCODER : Lavf58.29.100
 Duration: 00:23:57.65, start: 0.000000, bitrate: 2103 kb/s
 Stream #0:0(jpn): Video: hevc (Main 10), yuv420p10le(tv), 1920x1080, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 1k tbn (default)
 Metadata:
 title : [Judas] x265 10b
 ENCODER : Lavc58.54.100 libx265
 BPS-eng : 1973938
 DURATION-eng : 00:23:55.017000000
 NUMBER_OF_FRAMES-eng: 34406
 NUMBER_OF_BYTES-eng: 354079423
 _STATISTICS_WRITING_APP-eng: mkvmerge v48.0.0 ('Fortress Around Your Heart') 64-bit
 _STATISTICS_WRITING_DATE_UTC-eng: 2021-03-25 09:13:20
 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
 Stream #0:1(jpn): Audio: aac (LC), 44100 Hz, stereo, fltp (default)
 Metadata:
 title : Japanese
 BPS-eng : 128000
 DURATION-eng : 00:23:55.086000000
 NUMBER_OF_FRAMES-eng: 61804
 NUMBER_OF_BYTES-eng: 22961378
 _STATISTICS_WRITING_APP-eng: mkvmerge v48.0.0 ('Fortress Around Your Heart') 64-bit
 _STATISTICS_WRITING_DATE_UTC-eng: 2021-03-25 09:13:20
 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
 Stream #0:2(eng): Subtitle: ass
 Metadata:
 title : English
 BPS-eng : 196
 DURATION-eng : 00:23:53.580000000
 NUMBER_OF_FRAMES-eng: 478
 NUMBER_OF_BYTES-eng: 35129
 _STATISTICS_WRITING_APP-eng: mkvmerge v48.0.0 ('Fortress Around Your Heart') 64-bit
 _STATISTICS_WRITING_DATE_UTC-eng: 2021-03-25 09:13:20
 _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES



I found a related question HERE whose answer I do not fully understand. However, I tried the following command


ffmpeg -i input.mkv -f mp4 -vcodec libx264 -preset fast -profile:v main -acodec aac -map 0:0 -map 0:1 -map 0:2 -c:s mov_text test.mp4



but got a new error


Error initializing output stream: Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height



I thought I am defining an "encoder" for output stream "#0:0" (which I think is video), namely libx264. So what else to do here ?


I tried
-acode copy
and also to use-qp 0
in the command line which all did not work.

-
Opencv VideoCapture not streaming RTSP link and returns "no frame !"
6 septembre 2023, par Asadullah NaeemI am trying to stream my HikVision IP camera throough python. I am using
cv2.VideoCapture("rtsp_link")
which works fine on my Laptop but when I try to run the same python script with same Opencv and FFmpeg version it gives me following error :

Error :


[h264 @ 000002124c7f9a40] missing picture in access unit with size 47
[h264 @ 000002124c7f9a40] no frame!



I have so far tried to run this script on 5 computer devices but it gives the same error. I am using the following python script and my Opencv version is
4.6.0.66
and ffmpeg version2022-06-20-git-56419428a8-essentials_build-www.gyan.dev
:

Python Script :


import cv2

# RTSP stream URL
rtsp_url = "rtsp://username:password@ip_address:port/Streaming/Channels/501"

# Open the RTSP stream
cap = cv2.VideoCapture(rtsp_url)

# Check if the stream was successfully opened
if not cap.isOpened():
 print("Failed to open RTSP stream.")
 exit()

# Read and display frames from the stream
while True:
 # Read a frame from the stream
 ret, frame = cap.read()

 # Check if the frame was successfully read
 if not ret:
 print("Failed to read frame from RTSP stream.")
 break

 # Display the frame
 cv2.imshow("RTSP Stream", frame)

 # Exit if 'q' is pressed
 if cv2.waitKey(1) & 0xFF == ord('q'):
 break

# Release the resources
cap.release()
cv2.destroyAllWindows()




Update :


Code runs on a laptop on both wifi and mobile internet (4G) but on other devices rtsp link is accessible only with mobile internet (4G).


-
The latest ffmpeg shows "get_buffer() failed". Is this a bug ?
20 juin 2023, par Ryanffmpeg version 2023-06-19-git-1617d1a752-full_build-www.gyan.dev


i7-1255U, Windows 11


The command line is


"ffmpeg.exe" -y -hwaccel qsv -ss 00:00:03.461 -to 00:00:12.009 -i "input.mov" -c:v h264_qsv -global_quality 25 -look_ahead 1 -preset veryslow -c:a aac -ar 48000 -ac 2 -ab 128k output.mp4



The "input.mov" is mjpeg.


The result is :


[mjpeg_qsv @ 0000019930260080] get_buffer() failed
[vist#0:0/mjpeg @ 000001993025ff00] Error submitting packet to decoder: Cannot allocate memory
[mjpeg_qsv @ 0000019930260080] get_buffer() failed
[vist#0:0/mjpeg @ 000001993025ff00] Error submitting packet to decoder: Cannot allocate memory
[mjpeg_qsv @ 0000019930260080] get_buffer() failed
[vist#0:0/mjpeg @ 000001993025ff00] Error submitting packet to decoder: Cannot allocate memory
[mjpeg_qsv @ 0000019930260080] get_buffer() failed
[vist#0:0/mjpeg @ 000001993025ff00] Error submitting packet to decoder: Cannot allocate memory
[mjpeg_qsv @ 0000019930260080] get_buffer() failed
[vist#0:0/mjpeg @ 000001993025ff00] Error submitting packet to decoder: Cannot allocate memory



The messages above repeats many many many times. Finally, it shows :


[vist#0:0/mjpeg @ 000001993025ff00] Error submitting EOF to decoder: Cannot allocate memory



I tried the same command line on a very old version, and it works fine. Is this a bug or there is something new that comes with the new version ?


Thank you for your help.