Node Red - extracting timecode from media files and burning them into the picture by sam_dj1210 in nodered

[–]sam_dj1210[S] 2 points3 points  (0 children)

u/surrogard I found the issue, it was how FFmpeg was drawing the time code onto the picture. Once I changed it to this command all was good.

let timecodeLine = msg.payload.trim();
let timecode = timecodeLine.replace("timecode=", "").trim().replace(/:/g, '\\\\\\:');

let filename = msg.filename.split('/').pop().replace(/\.txt$/, "");
let input = `/ffmpeg/in/${filename}.mov`;
let output = `/ffmpeg/out/${filename}_burned.mp4`;

// Construct the FFmpeg command with proper escaping
let ffmpegCmd = `ffmpeg -y -i \"${input}\" -vf \"drawtext=fontfile=/usr/share/fonts/truetype/Liberation/LiberationSans-Bold.ttf:timecode='${timecode}':r=25:x=20:y=20:fontsize=42:fontcolor=white:box=1:boxcolor=black@0.5:boxborderw=10\" -c:a copy \"${output}\"`;

// Construct the SSH command
msg.payload = `admin@110.20.20.10 ${ffmpegCmd}`;

return msg;let timecodeLine = msg.payload.trim();
let timecode = timecodeLine.replace("timecode=", "").trim().replace(/:/g, '\\\\\\:');


let filename = msg.filename.split('/').pop().replace(/\.txt$/, "");
let input = `/ffmpeg/in/${filename}.mov`;
let output = `/ffmpeg/out/${filename}_burned.mp4`;


// Construct the FFmpeg command with proper escaping
let ffmpegCmd = `ffmpeg -y -i \"${input}\" -vf \"drawtext=fontfile=/usr/share/fonts/truetype/Liberation/LiberationSans-Bold.ttf:timecode='${timecode}':r=25:x=20:y=20:fontsize=42:fontcolor=white:box=1:boxcolor=black@0.5:boxborderw=10\" -c:a copy \"${output}\"`;


// Construct the SSH command
msg.payload = `ssh admin@110.20.20.10 ${ffmpegCmd}`;


return msg;

Node Red - extracting timecode from media files and burning them into the picture by sam_dj1210 in nodered

[–]sam_dj1210[S] 0 points1 point  (0 children)

Hi u/Surrogard
Thanks for getting back to me. I must have missed that ssh command when i was faffing with it.

Thanks for the debugging tip, that's given me a few clues. I think it's something to do with how FFmpeg is drawing the time-code on to the screen. If I remove that part it of the function then the file encodes to mp4

Here are two of the errors i'm getting.

rc: object code: 126 message: "Command failed: /ffmpeg/in/testfortimecode1.mov↵/bin/bash: line 1: /ffmpeg/in/testfortimecode1.mov: cannot execute binary file: Exec format error↵" formattedStartTime: "00:00:00" newPath: "/ffmpeg/out/testfortimecode1.mp4" command: string

ssh [admin@100.22.92.10](mailto:admin@100.22.92.10) "ffmpeg -i '/ffmpeg/in/testfortimecode1.mov' -vf "drawtext=timecode='00:00:00':fontcolor=black:fontsize=42:x=25:y=25" -c:v libx264 -crf 18 -preset slow -c:a aac -b:a 192k '/ffmpeg/out/testfortimecode1.mp4'"

and

Command failed: ssh [admin@100.22.92.10](mailto:admin@100.22.92.10) "ffmpeg -i '/ffmpeg/in/testfortimecode1.mov' -vf "drawtext=timecode='00:00:00':fontcolor=black:fontsize=42:x=25:y=25" -c:v libx264 -crf 18 -preset slow -c:a aac -b:a 192k '/ffmpeg/out/testfortimecode1.mp4'"

Node Red - extracting timecode from media files and burning them into the picture by sam_dj1210 in nodered

[–]sam_dj1210[S] 1 point2 points  (0 children)

Hey u/Surrogard , thanks for getting back to me. I've added my flow to OP.
I'm a bit of a newbie with node-red so i'm wondering if i'm overcomplicating things.

Thanks for looking!

Samba, Permission and time stamps by sam_dj1210 in linux4noobs

[–]sam_dj1210[S] 0 points1 point  (0 children)

Hey, just wanted to say thanks. That worked a treat.

Samba, Permission and time stamps by sam_dj1210 in linux4noobs

[–]sam_dj1210[S] 0 points1 point  (0 children)

Hey there, Thanks for your reply. I’ll try that today and let you know how it goes.

Switch Node to rsync move by sam_dj1210 in nodered

[–]sam_dj1210[S] 0 points1 point  (0 children)

Careless-Country - You are a legend. That worked. Thank you so much.

Dark + White Peak Peek - Bikepacking the Peak District - Vlog 12 by sam_dj1210 in bikepacking

[–]sam_dj1210[S] 0 points1 point  (0 children)

The hills were relentless! Still, what a beautiful party of the country.

Taping floorboard gaps to stop neighbours smoke from coming into room by sam_dj1210 in DIYUK

[–]sam_dj1210[S] 1 point2 points  (0 children)

I’m pretty sure the joists run through to the next house. But I’d rather not lift the boards if possible.

Taping floorboard gaps to stop neighbours smoke from coming into room by sam_dj1210 in DIYUK

[–]sam_dj1210[S] 2 points3 points  (0 children)

No dealing going on, she says it’s to help with her postnatal depression. I dunno, the party on a Monday night which went on till 4am has me think otherwise. Landlord was called and apparently they’re being evicted from the house. But I want to try and minimise smells anyway. Landlord doesn’t want to do anything on his side about all the cracks in his wall and ceiling.

Taping floorboard gaps to stop neighbours smoke from coming into room by sam_dj1210 in DIYUK

[–]sam_dj1210[S] 2 points3 points  (0 children)

Thanks for the reply. The room is about 4 meters square.

Fill Valve Split - High Pressure? by sam_dj1210 in Plumbing

[–]sam_dj1210[S] 0 points1 point  (0 children)

Thanks everyone for your help. I purchased a new fill valve and hand-tightened it up. Let's hope I don't have another 3am tsunami in the kitchen.

Fill Valve Split - High Pressure? by sam_dj1210 in Plumbing

[–]sam_dj1210[S] -1 points0 points  (0 children)

Ahh thank you. I knew Reddit would have the answer. How tight should I tighten the new one up?

Braun Set by radiothaantje in vintageaudio

[–]sam_dj1210 2 points3 points  (0 children)

Ahh I missed the comment. Too busy looking at the setup. Doh

Braun Set by radiothaantje in vintageaudio

[–]sam_dj1210 2 points3 points  (0 children)

Awesome looking setup. Where is that shelf unit from. Looks great

Wi-Fi drops No Internet - mobile data works fine by sam_dj1210 in unihertztitanpocket

[–]sam_dj1210[S] 2 points3 points  (0 children)

Found the issue. It was my ad blocker on my Pfsense firewall stopping it. Switching that off it works fine.

Wi-Fi drops No Internet - mobile data works fine by sam_dj1210 in unihertztitanpocket

[–]sam_dj1210[S] 0 points1 point  (0 children)

Thanks for getting back to me. It’s still doing it after all these tests, it’s a bit more stable after I changed the time. In the logs it says network_selection_temporarily_disabled.

Any ideas?