<p><code>rawvideo</code> has no metadata so you have to supply all parameters. Since your input is mjpeg (<strong>edit</strong>: sequence), just keep it as that.</p>

<pre><code>ffmpeg -f image2pipe -vcodec mjpeg -i - -c copy -f mjpeg part_N
</code></pre>

<p>Generate a text file like this</p>

<pre><code>file part_0
file part_1
file part_2
...
file part_N
</code></pre>

<p>and then</p>

<pre><code>ffmpeg -f concat -safe 0 -r 30 -i list.txt output.mp4
</code></pre>

<p>here <code>-r</code> is the desired framerate. Default is 25.</p>

CC BY-SA 4.0
2020-03-25T17:22:09.900Z
I'm getting `part_%d: No such file or directory`. Also tried `%3d` and `%03d`, and enclosed in single quotes, same results
Thiatt
CC BY-SA 4.0
2020-03-25T18:06:35.017Z
Save to part_N.jpg and then input part_%d.jpg
Gyan
CC BY-SA 4.0
2020-03-25T19:59:02.140Z
saving it as .jpg causes the output video to only contain the first frame of each
Thiatt
CC BY-SA 4.0
2020-04-05T08:03:25.137Z
Edited answer with new cmd.
Gyan
CC BY-SA 4.0
2020-03-25T16:37:20.213Z
2020-03-26T05:20:43.287Z
2020-03-26T05:20:43.287Z
Gyan
<p>I'm trying to create a timelapse video from several images that I'm fetching from a website. In order to make this faster, my plan was split the workload between multiple cores, each fetching their respective frames (I'm streaming the images to ffmpeg stdin):</p>

<p><code>ffmpeg -f image2pipe -vcodec mjpeg -i - -f rawvideo part_N</code></p>

<p>Then I wanted to stitch the rawvideo parts to an mp4:</p>

<p><code>ffmpeg -f rawvideo -i part_0 -f rawvideo -i part_1 ... output.mp4</code></p>

<p>But I'm getting the following error:</p>

<blockquote>
<pre><code>Picture size 0x0 is invalid`
</code></pre>
</blockquote>

<ffmpeg>
stitch rawvideo with ffmpeg - Picture size 0x0 is invalid
Thiatt
# stitch rawvideo with ffmpeg - Picture size 0x0 is invalid

(Asked by: username_0 on 2020-03-25)

I'm trying to create a timelapse video from several images that I'm fetching from a website. In order to make this faster, my plan was split the workload between multiple cores, each fetching their respective frames (I'm streaming the images to ffmpeg stdin):
ffmpeg -f image2pipe -vcodec mjpeg -i - -f rawvideo part_N
Then I wanted to stitch the rawvideo parts to an mp4:
ffmpeg -f rawvideo -i part_0 -f rawvideo -i part_1 ... output.mp4
But I'm getting the following error:

Picture size 0x0 is invalid`

**Tags:** ffmpeg


---

## 1 answers

### Answer by username_1 on 2020-03-25. Score: 2

rawvideo has no metadata so you have to supply all parameters. Since your input is mjpeg (edit: sequence), just keep it as that.
ffmpeg -f image2pipe -vcodec mjpeg -i - -c copy -f mjpeg part_N

Generate a text file like this
file part_0
file part_1
file part_2
...
file part_N

and then
ffmpeg -f concat -safe 0 -r 30 -i list.txt output.mp4

here -r is the desired framerate. Default is 25.

> **Comments:**
> **username_0**: I'm getting `part_%d: No such file or directory`. Also tried `%3d` and `%03d`, and enclosed in single quotes, same results  
> **username_1**: Save to part_N.jpg and then input part_%d.jpg  
> **username_0**: saving it as .jpg causes the output video to only contain the first frame of each  
> **username_1**: Edited answer with new cmd.  

---

