# Recording Lengths not uniform

**URL:** <https://forums.wyze.com/t/recording-lengths-not-uniform/322230>\
**Category:** Cameras\
**Tags:** android, battery-cam-pro\
**Created:** [January 27, 2025, 3:09am UTC](https://forums.wyze.com/t/recording-lengths-not-uniform/322230 "2025-01-27T03:09:46Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![calyrex989](https://avatars.discourse-cdn.com/v4/letter/c/22d042/32.png) [@calyrex989](https://forums.wyze.com/u/calyrex989)\
**Post date:** [January 27, 2025, 3:09am UTC](https://forums.wyze.com/t/recording-lengths-not-uniform/322230/1 "2025-01-27T03:09:46Z")

</div>

Some 1 minute recordings were split into 2 to 3 parts such as 05.01\_05.23, 05.23\_06.00, etc. And also when i join the files together using MKVTOOLNIX (for ease of viewing), at some point in the video, there’s just random flashing colors (idk the technical term for that), But the individual file has no problem. The mSD card is in exFAT and its SanDisk 256GB High Endurance (lightly previously used). Is this sign of card going bad or the WYZE BATTERY CAM PRO ?

---

<div class="post-metadata">

**Author:** ![Alfred10](https://avatars.discourse-cdn.com/v4/letter/a/e480ec/32.png) [@Alfred10](https://forums.wyze.com/u/Alfred10)\
**Post date:** [January 27, 2025, 3:31am UTC](https://forums.wyze.com/t/recording-lengths-not-uniform/322230/2 "2025-01-27T03:31:07Z")

</div>

You can use ffmpeg for join video.

Create a file, e.g., file\_list.txt,  
Inside the txt, paste  
file ‘05.01\_05.11.mp4’  
file ‘05.11\_06.00.mp4’  
file ‘05.01\_05.11.mp4’  
file ‘05.11\_06.00.mp4’

ffmpeg -f concat -safe 0 -i file\_list.txt -c copy output.mp4

I have one question:  
How did you get access to the these files?

---

<div class="post-metadata">

**Author:** ![calyrex989](https://avatars.discourse-cdn.com/v4/letter/c/22d042/32.png) [@calyrex989](https://forums.wyze.com/u/calyrex989)\
**Post date:** [January 27, 2025, 3:36am UTC](https://forums.wyze.com/t/recording-lengths-not-uniform/322230/3 "2025-01-27T03:36:21Z")

</div>

I record it to local storage aka micro SD card.

I have one question:  
I am very new at this. How do I generate a text file that has 24 hours with 60 1-minute files for each hour.

---

<div class="post-metadata">

**Author:** ![dave27](https://avatars.discourse-cdn.com/v4/letter/d/e274bd/32.png) [@dave27](https://forums.wyze.com/u/dave27)\
**Post date:** [January 27, 2025, 3:42am UTC](https://forums.wyze.com/t/recording-lengths-not-uniform/322230/4 "2025-01-27T03:42:03Z")

</div>

If you use continuous recording, they should all be 1 minute videos. If event only, then you may be having multiple events in the 1 minute that each get recorded separately. Not sure if smart detections have any impact on that, it may start a new file for each one (if you’re using those).

To generate a list of flies you can go to a command prompt on a PC and do a “dir” of the SD card, then drop it in excel or google sheets and grab just the column with file names covering the range of time you want.

---

<div class="post-metadata">

**Author:** ![calyrex989](https://avatars.discourse-cdn.com/v4/letter/c/22d042/32.png) [@calyrex989](https://forums.wyze.com/u/calyrex989)\
**Post date:** [January 27, 2025, 3:49am UTC](https://forums.wyze.com/t/recording-lengths-not-uniform/322230/5 "2025-01-27T03:49:42Z")

</div>

i got this error :  
[mp4 @ 00000225c9023b80] Could not find tag for codec pcm\_mulaw in stream #1, codec not currently supported in container  
[out#0/mp4 @ 00000225c8fff0c0] Could not write header (incorrect codec parameters ?): Invalid argument  
Conversion failed!

---

<div class="post-metadata">

**Author:** ![dave27](https://avatars.discourse-cdn.com/v4/letter/d/e274bd/32.png) [@dave27](https://forums.wyze.com/u/dave27)\
**Post date:** [January 27, 2025, 3:56am UTC](https://forums.wyze.com/t/recording-lengths-not-uniform/322230/6 "2025-01-27T03:56:17Z")

</div>

> [@calyrex989](#):
>
> pcm\_mulaw

Are you using the latest version? According to this thread they added support for that years ago

> <https://github.com/google/ExoPlayer/issues/4360>
>
> Hi,
> I'm trying to play a file with an audio stream encoded as \*\*pcm\_mulaw\*\* (co…ntainer is \*\*mp4\*\*).
> 
> \### Scenario
> \*\*ffprobe\*\* outputs the following:
> \`\`\`
> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'y.mp4':
> Metadata:
> major\_brand : mp42
> minor\_version : 0
> compatible\_brands: mp42isom
> creation\_time : 2018-05-25 21:38:57
> Duration: 00:00:30.00, start: 0.000000, bitrate: 670 kb/s
> Stream #0:0(und): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p, 1280x720, 605 kb/s, 15 fps, 15 tbr, 90k tbn, 180k tbc (default)
> Metadata:
> creation\_time : 2018-05-25 21:38:57
> encoder : JVT/AVC Coding
> Stream #0:1(und): Audio: pcm\_mulaw (ulaw / 0x77616C75), 8000 Hz, 1 channels, s16, 64 kb/s (default)
> Metadata:
> creation\_time : 2018-05-25 21:38:57
> \`\`\`
> 
> And since ffmpeg supports pcm\_mulaw, I thought the \*\*ffmpeg extension\*\* would do the trick.
> So I \*\*built the extension using the following options:\*\*
> \`\`\`
> COMMON\_OPTIONS="\\
> --target-os=android \\
> --disable-static \\
> --enable-shared \\
> --disable-doc \\
> --disable-programs \\
> --disable-everything \\
> --disable-avdevice \\
> --disable-avformat \\
> --disable-swscale \\
> --disable-postproc \\
> --disable-avfilter \\
> --disable-symver \\
> --disable-swresample \\
> --enable-avresample \\
> --enable-decoder=vorbis \\
> --enable-decoder=opus \\
> --enable-decoder=flac \\
> --enable-decoder=wavpack \\
> --enable-decoder=pcm\_mulaw \\
> " && \\
> cd "${FFMPEG\_EXT\_PATH}/jni" && \\
> ...
> \`\`\`
> 
> Then verified \`FfmpegLibrary.isAvailable()\` was \`true\`, and asked \`DefaultRenderersFactory\` to \`EXTENSION\_RENDERER\_MODE\_PREFER\` as shown:
> \`\`\`
> // Renderers factory
> final DefaultRenderersFactory renderersFactory =
> new DefaultRenderersFactory(this, DefaultRenderersFactory.EXTENSION\_RENDERER\_MODE\_PREFER);
> 
> // Track selector
> final BandwidthMeter bandwidthMeter = new DefaultBandwidthMeter();
> final TrackSelection.Factory trackSelectionFactory = new AdaptiveTrackSelection.Factory(bandwidthMeter);
> final DefaultTrackSelector trackSelector = new DefaultTrackSelector(trackSelectionFactory);
> 
> // Exoplayer instance
> mExoPlayer = ExoPlayerFactory.newSimpleInstance(renderersFactory, trackSelector);
> \`\`\`
> 
> \### Results
> \- Noticed audio has no focus (hitting the phone's volume keys updates ringing volume).
> \- Attaching the debugger, I see \`FfmpegAudioRenderer\` is being instantiated and supportsMixedMimeTypeAdaptation() is called, but neither \`supportsFormatInternal()\` nor \`createDecoder()\` are called.
> \- Regarding \`FfmpegLibrary\`: neither \`supportsFormat()\` nor \`getCodecName()\` are called, although the fact that \`MimeType.AUDIO\_MLAW\` isn't listed as a coded could imply it's not supported?
> 
> \### Questions
> \- If I'm doing something wrong, any thoughts about what it could be?
> \- If \`g711-mlaw\` is supported by ffmpeg, but not by the ffmpeg extension: is there something out there that does?
> \- If there isn't and I'd have to figure it out by myself, would it be easier if I write my custom \`Extractor\` and force its use? (I know the format of the source is always the same)
> 
> Thanks,
> Rena

---

<div class="post-metadata">

**Author:** ![calyrex989](https://avatars.discourse-cdn.com/v4/letter/c/22d042/32.png) [@calyrex989](https://forums.wyze.com/u/calyrex989)\
**Post date:** [January 27, 2025, 3:57am UTC](https://forums.wyze.com/t/recording-lengths-not-uniform/322230/7 "2025-01-27T03:57:37Z")

</div>

mine is this … ffmpeg-2025-01-02-git-0457aaf0d3-essentials\_build, i guess it is ?

---

<div class="post-metadata">

**Author:** ![dave27](https://avatars.discourse-cdn.com/v4/letter/d/e274bd/32.png) [@dave27](https://forums.wyze.com/u/dave27)\
**Post date:** [January 27, 2025, 4:00am UTC](https://forums.wyze.com/t/recording-lengths-not-uniform/322230/8 "2025-01-27T04:00:39Z")

</div>

May not be included in the essentials build.

---

<div class="post-metadata">

**Author:** ![calyrex989](https://avatars.discourse-cdn.com/v4/letter/c/22d042/32.png) [@calyrex989](https://forums.wyze.com/u/calyrex989)\
**Post date:** [January 27, 2025, 4:02am UTC](https://forums.wyze.com/t/recording-lengths-not-uniform/322230/9 "2025-01-27T04:02:20Z")

</div>

> [@calyrex989](#):
>
> ffmpeg

Can you show me which one to download, Im at the site right now but theres so many things. I dont know where to go to. Thankyou

---

<div class="post-metadata">

**Author:** ![calyrex989](https://avatars.discourse-cdn.com/v4/letter/c/22d042/32.png) [@calyrex989](https://forums.wyze.com/u/calyrex989)\
**Post date:** [January 27, 2025, 4:07am UTC](https://forums.wyze.com/t/recording-lengths-not-uniform/322230/10 "2025-01-27T04:07:33Z")

</div>

I just downloaded the FULL build and got this error. I put a sample of 3 video files AND the txt file in the same folder as the ffmpeg program itself (inside the BIN folder).

[mp4 @ 000001e58778e6c0] Could not find tag for codec pcm\_mulaw in stream #1, codec not currently supported in container  
[out#0/mp4 @ 000001e58719a900] Could not write header (incorrect codec parameters ?): Invalid argument  
Conversion failed!

---

<div class="post-metadata">

**Author:** ![Alfred10](https://avatars.discourse-cdn.com/v4/letter/a/e480ec/32.png) [@Alfred10](https://forums.wyze.com/u/Alfred10)\
**Post date:** [January 27, 2025, 4:15am UTC](https://forums.wyze.com/t/recording-lengths-not-uniform/322230/11 "2025-01-27T04:15:07Z")

</div>

Are your videos with audio? Maybe ffmpeg is having problems with convert the audio.

You can check  
Terminal / console  
ffmpeg -i and paste the paste one video path (like C:\Folder/video.mp4.

---

<div class="post-metadata">

**Author:** ![calyrex989](https://avatars.discourse-cdn.com/v4/letter/c/22d042/32.png) [@calyrex989](https://forums.wyze.com/u/calyrex989)\
**Post date:** [January 27, 2025, 4:18am UTC](https://forums.wyze.com/t/recording-lengths-not-uniform/322230/12 "2025-01-27T04:18:25Z")

</div>

This is from MEDIAINFO program, if you can help me in any possible way:

General  
Complete name : C:\Users\R\Documents\20250123\20250123\_00\_02.01\_03.01.mp4  
Format : MPEG-4  
Format profile : Base Media / Version 2  
Codec ID : mp42 (mp42/isom)  
File size : 12.2 MiB  
Duration : 1 min 0 s  
Overall bit rate : 1 700 kb/s

Video  
ID : 1  
Format : AVC  
Format/Info : Advanced Video Codec  
Format profile : High@L5.1  
Format settings : CABAC / 1 Ref Frames  
Format settings, CABAC : Yes  
Format settings, Reference : 1 frame  
Format settings, GOP : M=1, N=20  
Muxing mode : Container profile=Main@4.1  
Codec ID : avc1  
Codec ID/Info : Advanced Video Coding  
Duration : 1 min 0 s  
Bit rate : 1 633 kb/s  
Width : 2 560 pixels  
Height : 1 440 pixels  
Display aspect ratio : 16:9  
Frame rate mode : Variable  
Frame rate : 19.941 FPS  
Minimum frame rate : 10.000 FPS  
Maximum frame rate : 20.833 FPS  
Color space : YUV  
Chroma subsampling : 4:2:0  
Bit depth : 8 bits  
Scan type : Progressive  
Bits/(Pixel\*Frame) : 0.022  
Stream size : 11.7 MiB (96%)  
Codec configuration box : avcC

Audio  
ID : 2  
Format : ADPCM  
Format profile : U-Law  
Codec ID : ulaw  
Duration : 1 min 0 s  
Bit rate mode : Constant  
Bit rate : 64.0 kb/s  
Sampling rate : 8 000 Hz  
Stream size : 470 KiB (4%)  
Default : Yes  
Alternate group : 1

---

<div class="post-metadata">

**Author:** ![dave27](https://avatars.discourse-cdn.com/v4/letter/d/e274bd/32.png) [@dave27](https://forums.wyze.com/u/dave27)\
**Post date:** [January 27, 2025, 4:21am UTC](https://forums.wyze.com/t/recording-lengths-not-uniform/322230/13 "2025-01-27T04:21:23Z")

</div>

FFMPEG seems to be mis-interpreting the audio format. ULAW is the one you need. Someone else was asking about this in here a while back. I thought ffmpeg actually used ULAW as standard so surprised it isn’t recognizing it. But may need to use a different joiner program that has support for that.

---

<div class="post-metadata">

**Author:** ![Alfred10](https://avatars.discourse-cdn.com/v4/letter/a/e480ec/32.png) [@Alfred10](https://forums.wyze.com/u/Alfred10)\
**Post date:** [January 27, 2025, 4:24am UTC](https://forums.wyze.com/t/recording-lengths-not-uniform/322230/14 "2025-01-27T04:24:45Z")

</div>

Ok. Try this

ffmpeg -f concat -safe 0 -i file\_list.txt -c:v copy -an output.mp4

Will ignore join the audio. Latter you can add the audio, after convert into other format

---

<div class="post-metadata">

**Author:** ![calyrex989](https://avatars.discourse-cdn.com/v4/letter/c/22d042/32.png) [@calyrex989](https://forums.wyze.com/u/calyrex989)\
**Post date:** [January 27, 2025, 5:07am UTC](https://forums.wyze.com/t/recording-lengths-not-uniform/322230/15 "2025-01-27T05:07:03Z")

</div>

I have so many questions.  
@Alfred10 How do I add back audio when the files are all combined ? and how do I even convert the audio format  
@dave27 how do I input whole video file path in the text file, instead of just its name.extension, because when I put in the folder path, the backslashes are all gone and it becomes a new name…

---

<div class="post-metadata">

**Author:** ![Alfred10](https://avatars.discourse-cdn.com/v4/letter/a/e480ec/32.png) [@Alfred10](https://forums.wyze.com/u/Alfred10)\
**Post date:** [January 27, 2025, 5:24am UTC](https://forums.wyze.com/t/recording-lengths-not-uniform/322230/16 "2025-01-27T05:24:49Z")

</div>

There are many ways to do this in batch. You can create a script to extract only the audio and convert it into AAC or MP3.

Then, you can merge the audio with the video

---

<div class="post-metadata">

**Author:** ![dave27](https://avatars.discourse-cdn.com/v4/letter/d/e274bd/32.png) [@dave27](https://forums.wyze.com/u/dave27)\
**Post date:** [January 27, 2025, 5:26am UTC](https://forums.wyze.com/t/recording-lengths-not-uniform/322230/17 "2025-01-27T05:26:20Z")

</div>

If you want the audio, there is no point in merging them without the audio then going to more work to try and extract, merge, and line up the audio again. You’ll need to find software that can handle the audio CODEC in use.

The path will depend on what operating system you’re using but you can also use a spreadsheet to re-add the path to the beginning of the file name easily.

You may want to search in some reddit forums on video editing to find software that supports both the video and audio codecs you need. U-LAW is also known as G.711.

---

<div class="post-metadata">

**Author:** ![calyrex989](https://avatars.discourse-cdn.com/v4/letter/c/22d042/32.png) [@calyrex989](https://forums.wyze.com/u/calyrex989)\
**Post date:** [January 28, 2025, 4:25am UTC](https://forums.wyze.com/t/recording-lengths-not-uniform/322230/18 "2025-01-28T04:25:55Z")

</div>

how do I use ffmpeg to split the joined video in to 20 minute segments ?

---

<div class="post-metadata">

**Author:** ![Alfred10](https://avatars.discourse-cdn.com/v4/letter/a/e480ec/32.png) [@Alfred10](https://forums.wyze.com/u/Alfred10)\
**Post date:** [January 29, 2025, 4:07am UTC](https://forums.wyze.com/t/recording-lengths-not-uniform/322230/19 "2025-01-29T04:07:04Z")

</div>

You can try with this:

ffmpeg -i input.mp4 -c copy -map 0 -segment\_time 1200 -f segment output%03d.mp4

---

<div class="post-metadata">

**Author:** ![StevenA](https://sea2.discourse-cdn.com/wyze/user_avatar/forums.wyze.com/stevena/32/98871_2.png) [@StevenA](https://forums.wyze.com/u/StevenA)\
**Post date:** [January 29, 2025, 2:53pm UTC](https://forums.wyze.com/t/recording-lengths-not-uniform/322230/20 "2025-01-29T14:53:13Z")

</div>

If you are trying to join or split MP4 files, try MP4Joiner and MP4Splitter Free, open source and works on Windows, Mac and Linux.

[https://www.mp4joiner.org/en/](https://www.mp4joiner.org/en/)

[Next page](https://forums.wyze.com/t/recording-lengths-not-uniform/322230.md?page=2)
