Skip to content

Commit

Permalink
deploy: ae03e74
Browse files Browse the repository at this point in the history
  • Loading branch information
OsaAjani committed Jan 10, 2025
1 parent 87ec921 commit e11bbff
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions _modules/moviepy/video/io/ffmpeg_reader.html
Original file line number Diff line number Diff line change
Expand Up @@ -1155,8 +1155,12 @@ <h1>Source code for moviepy.video.io.ffmpeg_reader</h1><div class="highlight"><p
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Returns a tuple with a metadata field-value pair given a ffmpeg `-i`</span>
<span class="sd"> command output line.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">raw_field</span><span class="p">,</span> <span class="n">raw_value</span> <span class="o">=</span> <span class="n">line</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s2">&quot;:&quot;</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span>
<span class="k">return</span> <span class="p">(</span><span class="n">raw_field</span><span class="o">.</span><span class="n">strip</span><span class="p">(</span><span class="s2">&quot; &quot;</span><span class="p">),</span> <span class="n">raw_value</span><span class="o">.</span><span class="n">strip</span><span class="p">(</span><span class="s2">&quot; &quot;</span><span class="p">))</span></div>
<span class="n">info</span> <span class="o">=</span> <span class="n">line</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s2">&quot;:&quot;</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span>
<span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">info</span><span class="p">)</span> <span class="o">==</span> <span class="mi">2</span><span class="p">:</span>
<span class="n">raw_field</span><span class="p">,</span> <span class="n">raw_value</span> <span class="o">=</span> <span class="n">info</span>
<span class="k">return</span> <span class="p">(</span><span class="n">raw_field</span><span class="o">.</span><span class="n">strip</span><span class="p">(</span><span class="s2">&quot; &quot;</span><span class="p">),</span> <span class="n">raw_value</span><span class="o">.</span><span class="n">strip</span><span class="p">(</span><span class="s2">&quot; &quot;</span><span class="p">))</span>
<span class="k">else</span><span class="p">:</span>
<span class="k">return</span> <span class="p">(</span><span class="s2">&quot;&quot;</span><span class="p">,</span> <span class="s2">&quot;&quot;</span><span class="p">)</span></div>

<div class="viewcode-block" id="FFmpegInfosParser.video_metadata_type_casting"><a class="viewcode-back" href="../../../../reference/reference/moviepy.video.io.ffmpeg_reader.FFmpegInfosParser.html#moviepy.video.io.ffmpeg_reader.FFmpegInfosParser.video_metadata_type_casting">[docs]</a> <span class="k">def</span><span class="w"> </span><span class="nf">video_metadata_type_casting</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">field</span><span class="p">,</span> <span class="n">value</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Cast needed video metadata fields to other types than the default str.&quot;&quot;&quot;</span>
Expand Down

0 comments on commit e11bbff

Please sign in to comment.