Recherche avancée

Médias (91)

Autres articles (67)

  • Participer à sa documentation

    10 avril 2011

    La documentation est un des travaux les plus importants et les plus contraignants lors de la réalisation d’un outil technique.
    Tout apport extérieur à ce sujet est primordial : la critique de l’existant ; la participation à la rédaction d’articles orientés : utilisateur (administrateur de MediaSPIP ou simplement producteur de contenu) ; développeur ; la création de screencasts d’explication ; la traduction de la documentation dans une nouvelle langue ;
    Pour ce faire, vous pouvez vous inscrire sur (...)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

Sur d’autres sites (6468)

  • Your 6-step guide to increasing acquisition

    2 juillet 2019, par Matomo Core Team — Analytics Tips

    Your 6-step guide to increasing acquisition

    Want to save time and money, as well as increase conversions and acquisition ? Matomo Analytics is here to help with that !

    Let’s start by helping you create a website visitors’ acquisition strategy, without it you might be going in blind and missing opportunities that might’ve been easily found in your metrics.

    To help you craft a strategy for your site, check out the steps below !

    Step one : Get familiar with the Acquisition feature

    The easiest way is to start with Matomo’s Acquisition feature itself. Discover and take action on the marketing channels with the biggest ROI for your business. You’ll learn :

    How to get traffic from external websites : Find out who’s helping you succeed from external websites and convince them to do more of it. Get more traffic by proactively asking for : paid sponsorships ; guest blog posts ; or spending more advertising on the particular website.

    About Social Networks : Which social media channels are connecting with the audience you want ? Take the guesswork out by using only the ones you need. By finding out which social channels your ideal audience prefers, you can generate shareable, convincing and engaging content to drive shares and traffic through to your site.

    Campaigns : This helps you understand which marketing campaign is working and which isn’t. You can then shift your efforts to effectively gain more visitors with less costs. Keep track of every ad and content piece you show across internal and external channels to see which has the biggest impact on your business objectives.

    Enhanced SEO : Every acquisition plan needs a focus on maximising your Search Engine Optimization (SEO) efforts. When it comes to getting conclusive search engine referrer metrics, you need to be sure you’re getting ALL the insights to drive your SEO strategy. See keyword position rankings, integrate Google, Bing and Yahoo search consoles, and no longer be restricted with “keyword not defined” showing up in your keywords reports.

    >> Watch Acquisition introduction video (playtime : 2.54 minutes)

    Step two : Set your goals and monitor conversion funnels

    Let the Goals feature guide you

    Goals are essential for building your marketing strategy and getting new customers. The more goals you track, the more you learn about behavioural changes and modify pathways to impact acquisitions over time. 

    Are you checking :

    • Which channels are converting the best for your business ?
    • Which cities/countries are most popular ?
    • What devices will attract the most visitors ?
    • How engaged your visitors are before converting ?

    This way you can see if your campaigns (SEO, PPC, signups, blogs etc.) or optimising efforts (A/B Testing, Funnels) have made an impact with the time and investment you’ve put in.

    >> Watch Goals introduction video (playtime : 2.04 minutes)

    The Funnels feature leads you to success

    Conversion funnels give you the big picture on whether your acquisition plans are paying off and where they may be falling short. If the ultimate goal of your site is to drive conversions, then each funnel can tell you how effectively you’re driving traffic through to your desired outcome.

    >> Watch Funnels introduction video (playtime : 2.29 minutes)

    Goals feature web analytics

    Step three : Measure the success of every touchpoint in your customer’s journey

    Multi Attribution feature

    Accurately identify channels where visitors first engage with your business, as well as the final channel they came from, before purchasing your product/service. This helps you make smarter decisions when determining acquisition spend to accurately calculate the Customer Acquisition Cost (CAC). Here you no longer falsely over-estimate investment in failing marketing channels.

    >> Watch Multi Attribution introduction video (playtime : 2.28 minutes)

    Step four : For ecommerce sites, understand who your customers are to increase sales

    Ecommerce feature to significantly increase $ potential

    If your website’s overall purpose is to generate revenue, the Ecommerce feature gives you comprehensive insights into your customer’s purchasing behaviours.

    This heavily reduces your risks when marketing products to potential customers as you’ll understand who to target, what to target them with and where further opportunities exist.

    >> Watch Ecommerce introduction video (playtime : 2.04 minutes)

    e-commerce analytics

    Step five : Make sure the forms on your website are easy to complete

    Form Analytics feature

    Once you get visitors through the funnel, the forms on your website are the final step to conversion and need special attention. If not done right, you could be missing out on converting a large portion of your visitors.

    Thankfully, you can now identify and fix pain points on the forms that are most important to your business’ success.

    >> Watch Form Analytics introduction video (playtime : 2.39 minutes)

    Form analytics feature

    Step six : Discover what a customer journey looks like on a user-by-user basis and bring in key acquisition elements to your strategy

    Visitor Profiles tell you each visitors’ history

    The Profile feature summarises every visit, action and purchase made.

    Better understand :

    • Why your visitors viewed your website.
    • Why your returning visitors continue to view your website.
    • What specifically your visitors are looking for and whether they found it on your website.

    The benefit is being able to see how a combination of acquisition channels play a part in a single buyer’s journey.

    >> Watch Visitors introduction video (playtime : 1.46 minutes)

    To summarise

    This guide will set you on a path to creating a well-planned acquisition strategy. It’s the key to attracting and capturing the attention of potential visitors/leads, and successfully driving them through a funnel/buyer’s journey on your website.

    Because of Matomo’s reputation as a trusted analytics platform, the features above can be used to assist you in making smarter data-driven decisions. You can pursue different acquisition avenues with confidence and create a strategy that’s agile and ready for success, all while respecting user privacy.

  • Laravel Process() with FFMPEG times out for any video that is even kind of large

    16 août 2024, par Hunter

    I am creating an application that lets users upload video files, and once they do it will convert them all to .mp4's (it does some other things, but since this first part of the code is breaking before it gets a chance to reach the other stuff, and the process for each is pretty similar, lets just discuss this issue).

    



    Once a user submits, it gets sent to GameController@store. Below is a code sample (the one that keeps getting sent back to me as problematic) from the controller :

    



    $process = new Process(env('APP_FFMPEG', 'ffmpeg') . ' -i ' . $fileURL . ' -f mp4 -vcodec libx264 -preset medium -profile:v main -c:a aac -movflags +faststart ' . $newFileName . ' -hide_banner');
              $process->setTimeout(360);
              $process->setIdleTimeout(60);
              $process->run();
              if (!$process->isSuccessful()) {
                throw new ProcessFailedException($process);
              }


    



    I am using the Symfony Process() class to run the FFMpeg conversion. The weird thing is, when I run this with a 1 or 2 second video, it goes without a hitch. This, to me, rules out issues like path problems, permission problems, etc. Multiple file types work with this, as long as they are very short. As soon as I put in a video that is even around 1min, it returns with this :

    



    The process "/usr/local/bin/ffmpeg -i http://localhost/storage/team_1_folder/game_26/team_1_game_26_vid_1.mp4 -f mp4 -vcodec libx264 -preset medium -profile:v main -c:a aac -movflags +faststart storage/team_1_folder/game_26/convertedVideo_1.mp4 -hide_banner" exceeded the timeout of 360 seconds.


    



    Now, notice that it says 'timeout of 360 seconds'. That is because I have also edited ALL of the possible timeout constraints, as well as the file size constraints that I can think of. Here is what I have done :

    



    -Changed php.ini (in my MAMP installation) values :
    
—max_execution_time = 300 (default was 30)
    
—memory_limit = 1280M (default was 128)
    
—post_max_size = 800M
    
—upload_max_filesize = 3200M
    
-max_input_time=300

    



    -In the GameController (code above)
    
—$process->setTimeout(360) ;
    
—$process->setTimeout(360) ;

    



    After all that, with a big file, the thing will just stall for the 6 minutes that I have set on the timeout thing, and then send an error. Is FFmpeg just stalling, or is this a process issue ? Who knows. Errors surrounding these things are just beautifully vague.

    



    I have tagged Laravel, PHP, and FFmpeg in hopes that someone will recognize this issue. I know that Process() is sending me the error, but since it is sending me a timeout, I don't know what is at fault.

    



    I'm not ruling anything out, so hit me with ideas, even crazy ones !

    



    Edit
Here is the output of the -report. I cut some of it off because the end part gets repetitive and goes for literally 1000 lines :

    



    ffmpeg started on 2019-06-24 at 18:50:23
Report written to "ffmpeg-20190624-185023.log"
Command line:
/usr/local/bin/ffmpeg -i http://localhost/storage/team_1_folder/game_31/team_1_game_31_vid_1.mp4 -f mp4 -vcodec libx264 -preset medium -profile:v main -c:a aac -movflags +faststart storage/team_1_folder/game_31/convertedVideo_1.mp4 -report
ffmpeg version 4.1.3 Copyright (c) 2000-2019 the FFmpeg developers
  built with Apple LLVM version 10.0.1 (clang-1001.0.46.4)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1.3_1 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags='-I/Library/Java/JavaVirtualMachines/adoptopenjdk-11.0.2.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-11.0.2.jdk/Contents/Home/include/darwin' --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-videotoolbox --disable-libjack --disable-indev=jack --enable-libaom --enable-libsoxr
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100
Splitting the commandline.
Reading option '-i' ... matched as input url with argument 'http://localhost/storage/team_1_folder/game_31/team_1_game_31_vid_1.mp4'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'mp4'.
Reading option '-vcodec' ... matched as option 'vcodec' (force video codec ('copy' to copy stream)) with argument 'libx264'.
Reading option '-preset' ... matched as AVOption 'preset' with argument 'medium'.
Reading option '-profile:v' ... matched as option 'profile' (set profile) with argument 'main'.
Reading option '-c:a' ... matched as option 'c' (codec name) with argument 'aac'.
Reading option '-movflags' ... matched as AVOption 'movflags' with argument '+faststart'.
Reading option 'storage/team_1_folder/game_31/convertedVideo_1.mp4' ... matched as output url.
Reading option '-report' ... matched as option 'report' (generate a report) with argument '1'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option report (generate a report) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input url http://localhost/storage/team_1_folder/game_31/team_1_game_31_vid_1.mp4.
Successfully parsed a group of options.
Opening an input file: http://localhost/storage/team_1_folder/game_31/team_1_game_31_vid_1.mp4.
[NULL @ 0x7f9ad480ae00] Opening 'http://localhost/storage/team_1_folder/game_31/team_1_game_31_vid_1.mp4' for reading
[http @ 0x7f9ad3c6b540] Setting default whitelist 'http,https,tls,rtp,tcp,udp,crypto,httpproxy'
[tcp @ 0x7f9ad3e00400] Original list of addresses:
[tcp @ 0x7f9ad3e00400] Address ::1 port 80
[tcp @ 0x7f9ad3e00400] Address 127.0.0.1 port 80
[tcp @ 0x7f9ad3e00400] Interleaved list of addresses:
[tcp @ 0x7f9ad3e00400] Address ::1 port 80
[tcp @ 0x7f9ad3e00400] Address 127.0.0.1 port 80
[tcp @ 0x7f9ad3e00400] Starting connection attempt to ::1 port 80
[tcp @ 0x7f9ad3e00400] Successfully connected to ::1 port 80
[http @ 0x7f9ad3c6b540] request: GET /storage/team_1_folder/game_31/team_1_game_31_vid_1.mp4 HTTP/1.1
User-Agent: Lavf/58.20.100
Accept: */*
Range: bytes=0-
Connection: close
Host: localhost
Icy-MetaData: 1


[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9ad480ae00] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9ad480ae00] ISO: File Type Major Brand: isom
[tcp @ 0x7f9ad3c6b840] Original list of addresses:
[tcp @ 0x7f9ad3c6b840] Address ::1 port 80
[tcp @ 0x7f9ad3c6b840] Address 127.0.0.1 port 80
[tcp @ 0x7f9ad3c6b840] Interleaved list of addresses:
[tcp @ 0x7f9ad3c6b840] Address ::1 port 80
[tcp @ 0x7f9ad3c6b840] Address 127.0.0.1 port 80
[tcp @ 0x7f9ad3c6b840] Starting connection attempt to ::1 port 80
[tcp @ 0x7f9ad3c6b840] Successfully connected to ::1 port 80
[http @ 0x7f9ad3c6b540] request: GET /storage/team_1_folder/game_31/team_1_game_31_vid_1.mp4 HTTP/1.1
User-Agent: Lavf/58.20.100
Accept: */*
Range: bytes=170169585-
Connection: close
Host: localhost
Icy-MetaData: 1


[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9ad480ae00] Unknown dref type 0x206c7275 size 12
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9ad480ae00] Processing st: 0, edit list 0 - media time: 0, duration: 10584600
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9ad480ae00] stts: 0 ctts: 0, ctts_index: 0, ctts_count: 10575
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9ad480ae00] stts: 1 ctts: 4002, ctts_index: 1, ctts_count: 10575
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9ad480ae00] stts: 1000 ctts: 0, ctts_index: 2, ctts_count: 10575
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9ad480ae00] stts: 2001 ctts: 0, ctts_index: 3, ctts_count: 10575
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9ad480ae00] stts: 3002 ctts: 0, ctts_index: 4, ctts_count: 10575
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9ad480ae00] stts: 4003 ctts: 4004, ctts_index: 5, ctts_count: 10575
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9ad480ae00] stts: 5004 ctts: 0, ctts_index: 6, ctts_count: 10575


    



    Edit 2
I also found this towards the bottom :

    



    [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9ad480ae00] stts: 10582571 ctts: 0, ctts_index: 10573, ctts_count: 10575
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9ad480ae00] stts: 10583572 ctts: 1001, ctts_index: 10574, ctts_count: 10575
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9ad480ae00] Setting codecpar->delay to 1 for stream st: 0
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9ad480ae00] Unknown dref type 0x206c7275 size 12
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9ad480ae00] Processing st: 1, edit list 0 - media time: 0, duration: 15563816
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9ad480ae00] Before avformat_find_stream_info() pos: 170509020 bytes read:372203 seeks:1 nb_streams:2
[h264 @ 0x7f9ad4811200] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0x7f9ad4811200] nal_unit_type: 8(PPS), nal_ref_idc: 3
[tcp @ 0x7f9ad3c72d40] Original list of addresses:
[tcp @ 0x7f9ad3c72d40] Address ::1 port 80
[tcp @ 0x7f9ad3c72d40] Address 127.0.0.1 port 80
[tcp @ 0x7f9ad3c72d40] Interleaved list of addresses:
[tcp @ 0x7f9ad3c72d40] Address ::1 port 80
[tcp @ 0x7f9ad3c72d40] Address 127.0.0.1 port 80
[tcp @ 0x7f9ad3c72d40] Starting connection attempt to ::1 port 80
[tcp @ 0x7f9ad3c72d40] Successfully connected to ::1 port 80
[http @ 0x7f9ad3c6b540] request: GET /storage/team_1_folder/game_31/team_1_game_31_vid_1.mp4 HTTP/1.1
User-Agent: Lavf/58.20.100
Accept: */*
Range: bytes=48-
Connection: close
Host: localhost
Icy-MetaData: 1


[h264 @ 0x7f9ad4811200] nal_unit_type: 5(IDR), nal_ref_idc: 1
[h264 @ 0x7f9ad4811200] Format yuv420p chosen by get_format().
[h264 @ 0x7f9ad4811200] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f9ad4811200] no picture 
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9ad480ae00] All info found
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9ad480ae00] After avformat_find_stream_info() pos: 308454 bytes read:680609 seeks:2 frames:2
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'http://localhost/storage/team_1_folder/game_31/team_1_game_31_vid_1.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf56.40.101
  Duration: 00:05:52.92, start: 0.000000, bitrate: 3865 kb/s
    Stream #0:0(und), 1, 1/30000: Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 3730 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und), 1, 1/44100: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 127 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
Successfully opened the file.
Parsing a group of options: output url storage/team_1_folder/game_31/convertedVideo_1.mp4.
Applying option f (force format) with argument mp4.
Applying option vcodec (force video codec ('copy' to copy stream)) with argument libx264.
Applying option profile:v (set profile) with argument main.
Applying option c:a (codec name) with argument aac.
Successfully parsed a group of options.
Opening an output file: storage/team_1_folder/game_31/convertedVideo_1.mp4.
[file @ 0x7f9ad3f02740] Setting default whitelist 'file,crypto'
Successfully opened the file.
detected 4 logical cores
[h264 @ 0x7f9ad5813a00] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0x7f9ad5813a00] nal_unit_type: 8(PPS), nal_ref_idc: 3
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[graph_1_in_0_1 @ 0x7f9ad3dbcc00] Setting 'time_base' to value '1/44100'
[graph_1_in_0_1 @ 0x7f9ad3dbcc00] Setting 'sample_rate' to value '44100'
[graph_1_in_0_1 @ 0x7f9ad3dbcc00] Setting 'sample_fmt' to value 'fltp'
[graph_1_in_0_1 @ 0x7f9ad3dbcc00] Setting 'channel_layout' to value '0x3'
[graph_1_in_0_1 @ 0x7f9ad3dbcc00] tb:1/44100 samplefmt:fltp samplerate:44100 chlayout:0x3
[format_out_0_1 @ 0x7f9ad3c71040] Setting 'sample_fmts' to value 'fltp'
[format_out_0_1 @ 0x7f9ad3c71040] Setting 'sample_rates' to value '96000|88200|64000|48000|44100|32000|24000|22050|16000|12000|11025|8000|7350'
[AVFilterGraph @ 0x7f9ad3e00440] query_formats: 4 queried, 9 merged, 0 already done, 0 delayed
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[h264 @ 0x7f9ad5813a00] nal_unit_type: 5(IDR), nal_ref_idc: 1
[h264 @ 0x7f9ad5813a00] Format yuv420p chosen by get_format().
[h264 @ 0x7f9ad5813a00] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0x7f9ad5813a00] no picture 
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[h264 @ 0x7f9ad5804600] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[h264 @ 0x7f9ad5804c00] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[h264 @ 0x7f9ad5805200] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[h264 @ 0x7f9ad5805800] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[h264 @ 0x7f9ad5813a00] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
[graph 0 input from stream 0:0 @ 0x7f9ad3dbfb80] Setting 'video_size' to value '1920x1080'
[graph 0 input from stream 0:0 @ 0x7f9ad3dbfb80] Setting 'pix_fmt' to value '0'
[graph 0 input from stream 0:0 @ 0x7f9ad3dbfb80] Setting 'time_base' to value '1/30000'
[graph 0 input from stream 0:0 @ 0x7f9ad3dbfb80] Setting 'pixel_aspect' to value '1/1'
[graph 0 input from stream 0:0 @ 0x7f9ad3dbfb80] Setting 'sws_param' to value 'flags=2'
[graph 0 input from stream 0:0 @ 0x7f9ad3dbfb80] Setting 'frame_rate' to value '30000/1001'
[graph 0 input from stream 0:0 @ 0x7f9ad3dbfb80] w:1920 h:1080 pixfmt:yuv420p tb:1/30000 fr:30000/1001 sar:1/1 sws_param:flags=2
[format @ 0x7f9ad3dc0100] Setting 'pix_fmts' to value 'yuv420p|yuvj420p|yuv422p|yuvj422p|yuv444p|yuvj444p|nv12|nv16|nv21|yuv420p10le|yuv422p10le|yuv444p10le|nv20le'
[AVFilterGraph @ 0x7f9ad3c6e880] query_formats: 4 queried, 3 merged, 0 already done, 0 delayed
[libx264 @ 0x7f9ad5811200] using mv_range_thread = 88
[libx264 @ 0x7f9ad5811200] using SAR=1/1
[libx264 @ 0x7f9ad5811200] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x7f9ad5811200] profile Main, level 4.0
[libx264 @ 0x7f9ad5811200] 264 - core 155 r2917 0a84d98 - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 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=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'storage/team_1_folder/game_31/convertedVideo_1.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.20.100
    Stream #0:0(und), 0, 1/30000: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 29.97 fps, 30k tbn, 29.97 tbc (default)
    Metadata:
      handler_name    : VideoHandler
      encoder         : Lavc58.35.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    Stream #0:1(und), 0, 1/44100: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      encoder         : Lavc58.35.100 aac
Clipping frame in rate conversion by 0.000008
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[h264 @ 0x7f9ad5804600] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
Clipping frame in rate conversion by 0.000999
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[h264 @ 0x7f9ad5804c00] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
Clipping frame in rate conversion by 0.000999
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
Clipping frame in rate conversion by 0.000999
[h264 @ 0x7f9ad5805200] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
Clipping frame in rate conversion by 0.000999
[h264 @ 0x7f9ad5805800] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
Clipping frame in rate conversion by 0.000999
[h264 @ 0x7f9ad5813a00] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
Clipping frame in rate conversion by 0.000999
[h264 @ 0x7f9ad5804600] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
Clipping frame in rate conversion by 0.000999
[h264 @ 0x7f9ad5804c00] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
Clipping frame in rate conversion by 0.000999
[h264 @ 0x7f9ad5805200] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
Clipping frame in rate conversion by 0.000999
[h264 @ 0x7f9ad5805800] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
Clipping frame in rate conversion by 0.000999
[h264 @ 0x7f9ad5813a00] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
Clipping frame in rate conversion by 0.000999
[h264 @ 0x7f9ad5804600] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
Clipping frame in rate conversion by 0.000999
[h264 @ 0x7f9ad5804c00] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
Clipping frame in rate conversion by 0.000999
[h264 @ 0x7f9ad5805200] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
Clipping frame in rate conversion by 0.000999
[h264 @ 0x7f9ad5805800] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
Clipping frame in rate conversion by 0.000999
[h264 @ 0x7f9ad5813a00] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
Clipping frame in rate conversion by 0.000999
[h264 @ 0x7f9ad5804600] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
Clipping frame in rate conversion by 0.000999
[h264 @ 0x7f9ad5804c00] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
Clipping frame in rate conversion by 0.000999
[h264 @ 0x7f9ad5805200] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
Clipping frame in rate conversion by 0.000999


    


  • Encode h264 to match existing stream

    6 juin 2013, par Diego Sánchez

    In short : I have to encode a tiny amount of video frames and stitch them in front of a much bigger h.264 stream without reencoding said stream.

    The details : I receive a multi GB transport stream containing a h.264 es and an audio es. Currently the h.264 streams are always generated using x264, and I can assume this will be the case in the future. Now I have to prepend some video frames to this stream, but am not allowed to decode/encode the whole stream ; which leaves me with the only option to find out the exact parameters I need to pass x264_encoder_open so both streams match.

    Currently what I'm doing is :

    1. Demux the original ts and extract h.264 NAL packets.
    2. When I find the first "user data unregistered" SEI packet, I parse it and find a bunch of x264 parameters.
    3. Use libavcodec to start decoding the video. That gives me the dimensions of the picture and the h264 profile and level in the AVCodecContext structure.
    4. Match all of that as best as I can in the x264_param_t structure.

    I can do some encoding with that, and the encoded video plays correctly up to the join point. When VLC is reaching the stitch point it starts throwing out the following sequence of messages and soon after stops playing :

    [h264 @ 0x7fe36cd75be0] decode_slice_header error
    [h264 @ 0x7fe36cd75be0] no frame!
    [h264 @ 0x7fe36ccc9080] Width/height changing with threads is not implemented. Update your Libav version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.

    which clearly shows that my encoded frames do not match the original ones. I've been browsing the source code and can't seem to find a way of doing this. What I have currently (besides not working), involves a lot of guesswork, so even if I could make it work with the handful of example files I have, I would be scared to deploy this in production servers.

    So the obvious question is : Is there a safe, formal way of doing this ?

    Thanks in Advance