Recherche avancée

Médias (1)

Mot : - Tags -/book

Autres articles (60)

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

Sur d’autres sites (10165)

  • How to embed pic_timing SEI wall clock timecodes in RTMP streaming ?

    16 mai 2019, par MorenoGentili

    I need to stream my desktop to the AWS MediaLive service and, as a requirement, I must include wallclock timecodes in the stream. The AWS support kindly informed me that for h.264 encoded streams, I need to provide timecodes as "pic_timing SEI messages".

    I’m streaming with Ffmpeg via the RTMP protocol on Windows 10 so, I tried adding the use_wallclock_as_timestamps and copyts flags to my command.

    ffmpeg -f gdigrab -framerate 30 -offset_x 0 -offset_y 0 -video_size 1920x1080 -show_region 1 -use_wallclock_as_timestamps 1 -i desktop -vf scale=320:240 -c:v libx264 -c:a aac -profile:v main -level 3.1 -pix_fmt yuv420p -copyts -f flv rtmp://<ip>:1935/<app>/<stream>
    </stream></app></ip>

    However, the timecodes are not picked up by AWS MediaLive.

    My questions are :

    • Does the use_wallclock_as_timestamps flag actually create timecodes as "pic_timing SEI messages" as required ?
    • If not, how do I add wallclock timecodes as "pic_timing SEI messages" ? It doesn’t have to be every frame. Every 2 or 3 seconds would suffice.

    I’m stumped. I couldn’t find the answer in the Ffmpeg documentation.

    Thanks for your help.

  • No member named 'clock' in the global namespace when using FFmpeg pod

    24 mai 2021, par Bobrovsky

    My app (iOS 7+, Xcode 6) uses CocoaPods for its dependencies. One of the dependencies is FFmpeg.

    &#xA;&#xA;

    When I build my app I get several similar looking issues like

    &#xA;&#xA;

    &#xA;

    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ctime:60:9 :&#xA; No member named 'clock' in the global namespace ; did you mean 'flock' ?

    &#xA;

    &#xA;&#xA;

    I learned that this is because FFmpeg includes time.h file in libavutil subfolder. This time.h hides system time.h from the compiler and thus the errors.

    &#xA;&#xA;

    I tried to manually rename FFmpeg's time.h to something else and this helps. Now I want to do that automatically and in a way that will survive next 'pod update'.

    &#xA;&#xA;

    I tried to add libavutil to Sub-Directories to Exclude In Recursive Searches but this doesn't help at all.

    &#xA;&#xA;

    I tried to remove "$PODS_ROOT/Headers/Public/FFmpeg/libavutil" from Header Search Paths and it didn't help either.

    &#xA;&#xA;

    I know there are prepare_command and post_install hooks one can use in his Podfile but unfortunately I don't know if these are helpful in my case.

    &#xA;&#xA;

    So, how can I exclude time.h in libavutil of FFmpeg pod from header search paths (I don't mind to rename or even remove the time.h) ?

    &#xA;

  • OSError : MoviePy error : the file guitar.mp4 could not be found

    9 septembre 2023, par dunnjm814

    I'm working on a video to audio converter with react and flask/python.&#xA;I have received a 500 with this error :

    &#xA;

    raise IOError(("MoviePy error: the file %s could not be found!\n"&#xA;OSError: MoviePy error: the file guitar.mp4 could not be found!&#xA;Please check that you entered the correct path.&#xA;

    &#xA;

    EDIT : As stated in comments, moviepy VideoFileClip is looking for a path. Per suggestion, I am now attempting to write the incoming video file to a temp directory housed in the backend of the app. The updated stack trace shows the filepath printing, however when presented to VideoFileClip it is still unhappy.

    &#xA;

    The following snippet is the onSubmit for the video file upload :

    &#xA;

    const onSubmit = async (e) => {&#xA;    e.preventDefault()&#xA;    const data = new FormData()&#xA;    console.log(&#x27;hopefully the mp4&#x27;, videoData)&#xA;    data.append(&#x27;mp3&#x27;, videoData)&#xA;    console.log(&#x27;hopefully a form object with mp4&#x27;, data)&#xA;    const response = await fetch(&#x27;/api/convert&#x27;, {&#xA;      method: "POST",&#xA;      body: data&#xA;    })&#xA;    if (response.ok) {&#xA;      const converted = await response.json()&#xA;      setMp3(converted)&#xA;      console.log(mp3)&#xA;    } else {&#xA;      window.alert("something went wrong :(");&#xA;    }&#xA;  }&#xA;

    &#xA;

    Here is a link to an image depicting the console output of my file upload&#xA;from within init.py

    &#xA;

    app = Flask(__name__)&#xA;&#xA;app.config.from_object(Config)&#xA;app.register_blueprint(convert, url_prefix=&#x27;/api/convert&#x27;)&#xA;&#xA;CORS(app)&#xA;&#xA;

    &#xA;

    from within converter.py

    &#xA;

    import os&#xA;from flask import Blueprint, jsonify, request&#xA;import imageio&#xA;from moviepy.editor import *&#xA;&#xA;&#xA;convert = Blueprint(&#x27;convert&#x27;, __name__)&#xA;&#xA;@convert.route(&#x27;&#x27;, methods=[&#x27;POST&#x27;])&#xA;def convert_mp4():&#xA;  if request.files[&#x27;mp3&#x27;].filename:&#xA;    os.getcwd()&#xA;    filename = request.files[&#x27;mp3&#x27;].filename&#xA;    print(&#x27;hey its a file again&#x27;, filename)&#xA;    safe_filename = secure_filename(filename)&#xA;    video_file = os.path.join("/temp/", safe_filename)&#xA;    print(&#x27;hey its the file path&#x27;, video_file)&#xA;    video_clip = VideoFileClip(video_file)&#xA;    print(&#x27;hey its the VideoFileClip&#x27;, video_clip)&#xA;    audio_clip = video_clip.audio&#xA;    audio_clip.write_audiofile(os.path.join("/temp/", f"{safe_filename}-converted.mp3"))&#xA;&#xA;    video_clip.close()&#xA;    audio_clip.close()&#xA;&#xA;    return jsonify(send_from_directory(os.path.join("/temp/", f"{safe_filename}-converted.mp3")))&#xA;  else:&#xA;    return {&#x27;error&#x27;: &#x27;something went wrong :(&#x27;}&#xA;&#xA;&#xA;

    &#xA;

    In the stack trace below you can see file printing the name of the video, my only other thought on why this may not be working was because it was getting lost in the post request, however the fact it is printing after my if file: check is leaving me pretty confused.

    &#xA;

    hey its a file again guitar.mp4&#xA;hey its the file path /temp/guitar.mp4&#xA;127.0.0.1 - - [22/Apr/2021 12:12:15] "POST /api/convert HTTP/1.1" 500 -&#xA;Traceback (most recent call last):&#xA;  File "/home/jasondunn/projects/audioconverter/.venv/lib/python3.8/site-packages/flask/app.py", line 2464, in __call__&#xA;    return self.wsgi_app(environ, start_response)&#xA;  File "/home/jasondunn/projects/audioconverter/.venv/lib/python3.8/site-packages/flask/app.py", line 2450, in wsgi_app&#xA;    response = self.handle_exception(e)&#xA;  File "/home/jasondunn/projects/audioconverter/.venv/lib/python3.8/site-packages/flask_cors/extension.py", line 161, in wrapped_function&#xA;    return cors_after_request(app.make_response(f(*args, **kwargs)))&#xA;  File "/home/jasondunn/projects/audioconverter/.venv/lib/python3.8/site-packages/flask/app.py", line 1867, in handle_exception&#xA;    reraise(exc_type, exc_value, tb)&#xA;  File "/home/jasondunn/projects/audioconverter/.venv/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise&#xA;    raise value&#xA;  File "/home/jasondunn/projects/audioconverter/.venv/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app&#xA;    response = self.full_dispatch_request()&#xA;  File "/home/jasondunn/projects/audioconverter/.venv/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request&#xA;    rv = self.handle_user_exception(e)&#xA;  File "/home/jasondunn/projects/audioconverter/.venv/lib/python3.8/site-packages/flask_cors/extension.py", line 161, in wrapped_function&#xA;    return cors_after_request(app.make_response(f(*args, **kwargs)))&#xA;  File "/home/jasondunn/projects/audioconverter/.venv/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception&#xA;    reraise(exc_type, exc_value, tb)&#xA;  File "/home/jasondunn/projects/audioconverter/.venv/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise&#xA;    raise value&#xA;  File "/home/jasondunn/projects/audioconverter/.venv/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request&#xA;    rv = self.dispatch_request()&#xA;  File "/home/jasondunn/projects/audioconverter/.venv/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request&#xA;    return self.view_functions[rule.endpoint](**req.view_args)&#xA;  File "/home/jasondunn/projects/audioconverter/back/api/converter.py", line 20, in convert_mp4&#xA;    video_clip = VideoFileClip(video_file)&#xA;  File "/home/jasondunn/projects/audioconverter/.venv/lib/python3.8/site-packages/moviepy/video/io/VideoFileClip.py", line 88, in __init__&#xA;    self.reader = FFMPEG_VideoReader(filename, pix_fmt=pix_fmt,&#xA;  File "/home/jasondunn/projects/audioconverter/.venv/lib/python3.8/site-packages/moviepy/video/io/ffmpeg_reader.py", line 35, in __init__&#xA;    infos = ffmpeg_parse_infos(filename, print_infos, check_duration,&#xA;  File "/home/jasondunn/projects/audioconverter/.venv/lib/python3.8/site-packages/moviepy/video/io/ffmpeg_reader.py", line 270, in ffmpeg_parse_infos&#xA;    raise IOError(("MoviePy error: the file %s could not be found!\n"&#xA;OSError: MoviePy error: the file /temp/guitar.mp4 could not be found!&#xA;Please check that you entered the correct path.&#xA;

    &#xA;

    thanks in advance for taking a look/future advice. First official post on Stack Overflow :)

    &#xA;