Recherche avancée

Médias (0)

Mot : - Tags -/interaction

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (2)

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 is the first MediaSPIP stable release.
    Its official release date is June 21, 2013 and is announced here.
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

Sur d’autres sites (2256)

  • ffprobe to bitrate variable stopped working

    6 novembre 2023, par Bricktop

    I have a simple script to encode a video using the same bitrate as the original. I use ffprobe to fetch the bitrate like this :

    


    ffprobe "%file%" -v 0 -select_streams v:0 -show_entries stream=bit_rate -print_format compact=p=0:nokey=1 >%temp%\bitrate.txt


    


    However, while fixing a but in the script where I had an odd number of " marks, I suddenly ran into this problem with ffprobe :

    


    Argument ' -v 0 -select_streams v:0 -show_entries stream=bit_rate -print_format compact=p=0:nokey=1 >C:\Users\ADMINI~1\AppData\Local\Temp\bitrate.txt' provided as input filename, but 'D:\VIDEO\AMBIANCE\SCOPITONE\MUSIC TELEVISION\This Here - Calm - OFFICIAL VIDEO (1080p 25fps AV1-128kbit AAC).mp4' was already specified.


    


    I am trying to understand this, scanning insanely for yet another " or something in my code but can't figure it out. Here is the full code :

    


    :: write file to queue (first)
move /y "%~dpn0.txt" "%temp%\%~n0.tmp" >nul
echo "%~1" >"%~dpn0.txt"
type "%temp%\%~n0.tmp" >>"%~dpn0.txt"

:: desyncronize instances (todo: try support for adding 9 files at a time)
timeout /t %time:~9,1% /nobreak
:: if not first instance exit
tasklist /fi "imagename eq handbrakecli.exe" | find /i "handbrakecli" && exit
title Transcode

:: delegate queue
for /f "delims=" %%f in (%~dpn0.txt) do (
    set "name=%%~nf"
    set "file=%%~f"
    rem todo: if file has x264 or other video codec mentioned, change to x265
    set "code=%%~dpnf (x265 transcoded)%%~xf"
    call :transcode
)
echo all done!
exit /b

:transcode
title "%name%"
if not exist "%file%" echo %date% %time% source file missing %file% >>%~dpn0.log & goto cleanup
if exist "%code%" echo %date% %time% target file exists %file% >>%~dpn0.log & goto cleanup

:: determine appropriate bitrate (does not seem to work on .webm files, closing the script as a result)
%~dp0ffprobe "%file%" -v 0 -select_streams v:0 -show_entries stream=bit_rate -print_format compact=p=0:nokey=1 >%temp%\bitrate.txt
set /p bitrate=<%temp%\bitrate.txt
:: reduce to full kilobytes
set "bitrate=%bitrate:~0,-3%"
if not defined bitrate echo failed to fetch bitrate & echo %date% %time% no bitrate for %file% >>%~dpn0.log & exit /b
if %bitrate% gtr 7000 set bitrate=7000

:: transcode
%~dp0HandBrakeCLI -i "%file%" -o "%code%" --encoder x265_10bit --encoder-preset slow --encoder-profile main444-10 --vb %bitrate% --two-pass --turbo --audio 1-9 --aencoder copy --audio-copy-mask aac,ac3,mp2,mp3,opus --audio-fallback opus --ab 160 --drc 2.0

:: remove current file from queue, regardless
:cleanup
findstr /v /c:"%file%" "%~dpn0.txt" >"%temp%\%~n0.tmp"
move /y "%temp%\%~n0.tmp" "%~dpn0.txt"


    


    It appears that the set "file=%%~f" is the problem, somehow it shows up as set "file=D:\VIDEO\this video here.mp4" " where the last two characters " should not belong, and I don't know what to change to fix this.

    


    Every type of improvement to the script is very welcomed !

    


  • OpenCV (3.3.0) returns fail on VideoCapture with Video but works with Webcam [OS X]

    1er novembre 2017, par njoye

    Thanks for reading already, I’ve been trying to get this to work for a day and I didn’t get closer to the solution.

    I’m trying to get this object tracker to work. When I use a video from my webcam (with : python object-tracker-single.py -d 0, everything works as expected.

    But as soon as I’m trying to use a video file (i’ve tried different formats : .mp4, .mkv & .avi. I also tried to use the file given in the repository, that didn’t work as well. To see if there is a File not found-Error, I passed an invalid path to the function and an error got printed, that has not been printed when I used the other videos. So the file(s) i’m using is(/are) valid and not corrupted.

    I installed dlib through homebrew following this article and compiled OpenCV from the official source. This is the CMakeCache.txt that CMake spit out. After the first time I compiled it, I added opencv_contrib to the mix, thinking that it could help (I also think that I actually needed it), but that didn’t fix the problem.

    This is the code I’m having problems with :

    # Create the VideoCapture object
    cam = cv2.VideoCapture(source)

    # If Camera Device is not opened, exit the program
    if not cam.isOpened():
       print "Video device or file couldn't be opened"
       exit()

    print "Press key `p` to pause the video to start tracking"
    while True:
       # Retrieve an image and Display it.
       retval, img = cam.read() #<-- this returns false when trying to read a video
       if not retval:
           print "Cannot capture frame device"
           exit()

    At the marked line, retval equals False and image equals None.
    It would already help me if I could somehow debug this behavior, but I didn’t find any way of doing so.

    I found that many Windows Users had problems with missing ffmpeg support, but that is not the case for me, since I used ffmpeg in previous (not OpenCV-related) projects and CMakeCache.txt reports that ffmpeg has been found and the compilation succeeded.

    I also tried using a fully qualified file-name for the video file, which either resulted in Video device or file couldn't be opened or the given problem.

    If you have any idea how this problem can be completely resolved, have an Idea on how to solve it or can provide me with a way of properly debugging this behavior, I’d be super glad to here it !

    Thanks already !

    -

    System : MacBook Pro (macOS Sierra 10.12.6)

    OpenCV Version : 3.3.0

    Dlib Version (not necessary imo, but hey) : 19.4.0

    Edit 2
    Output of cmake -DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib-master/modules ../ >> result.txt : pastebin

  • Can not add thumbnail image to MP4 using FFMPEG CLI

    5 novembre 2019, par Youssof H.

    After searching for hours, about the easiest solution for adding a thumbnail to an MP4 using a CLI, I came back to the start "FFMPEG". Though I skipped it at first wishing I will get a working tool but no, I will stick to "FFMPEG".

    Even after updating the repository ==> Same issue.

    I followed the exact code present at the official documentation that says :

    ffmpeg -i path/to/in.mp4 -i path/to/IMAGE.png -map 0 -map 1 -c copy -c:v:1 png -disposition:v:1 attached_pic path/to/out.mp4

    The following error log shows :

    Stream mapping:
     Stream #0:0 -> #0:0 (copy)
     Stream #0:1 -> #0:1 (copy)
     Stream #1:0 -> #0:2 (mjpeg (native) -> png (native))
    Press [q] to stop, [?] for help
    [swscaler @ 0x1fd0860] deprecated pixel format used, make sure you did set range correctly
    [swscaler @ 0x1fd0860] No accelerated colorspace conversion found from yuv420p to rgb24.
    [mp4 @ 0x1f747e0] track 1: codec frame size is not set
    [mp4 @ 0x1f747e0] opus in MP4 support is experimental, add '-strict -2' if you want to use it.
    Could not write header for output file #0 (incorrect codec parameters ?): Experimental feature
    Error initializing output stream 0:2 --
    Conversion failed!

    I have no idea how to fix this. I read the issues forum of the website but I did not find a similar issue. So I hope you guys will give a hand.

    Any suggested edits will be taken into consideration.

    Edit1 :

    Test1 : I brought an image(thumbnail) from the video itself and ran the command.

    Test2 : I brought a unique image(thumbnail) with different resolutions than the video yet the same error appears.

    ==>Useless

    Edit2 :

    First :

    After fixing my command to be like this
    ffmpeg -i path/to/in.mp4 -i path/to/IMAGE.png -map 0 -map 1 -c copy -c:v:1 png -disposition:v:1 attached_pic -strict -2 path/to/out.mp4
    I viewed the thumbnail using VLC (video player) so it showed up at first. But when I replaced the video and the thumbnail image with others I ran the command it runned smoothly, untill I viewed thumbnail again using VLC it showed the old thumbnail image it seemed to be cached somewhere during "FFMPEG" process. I had to delete the folder and make a new one in order to update the new thumbnail, but again it "caches" the first thumbnail used and shows it in VLC.

    Is it an issue from VLC or the "FFMPEG" is doing something weird ?

    Second :

    After I had the thumbnail showing up in VLC I wanted to test this feature by sending it to a contact on WhatsApp but it didn’t show. After a little search, I realized it might be connected to "og:image" metadata. Is there a way to edit this using CLI ?

    Third :

    Further, the video embedded with a thumbnail doesn’t play on Windows nor on iPhone nor on Android. When I open this using windows media player it says

    Windows Media Player cannot play the file. The Player might not support the file type or might not support the codec that was used to compress the file.

    From here I think there is something I have to do with the codec.

    Note : the thumbnail shows in Windows File Explorer (but can not play video)

    Do you have any idea ?