Page 1 of 2

Generic MPEG1

Posted: Wed Sep 08, 2021 4:17 pm
by Mahmoud Rady
Hi there,

I need to get the same media info for my MPEG1
requested output
output requested.png
output requested.png (37 KiB) Viewed 5813 times
Current setting
FF setting.png
FF setting.png (28.31 KiB) Viewed 5813 times
and the output file is
output now.png
output now.png (36.17 KiB) Viewed 5810 times
thanks in advance.

Re: Generic MPEG1

Posted: Wed Sep 08, 2021 7:40 pm
by emcodem
Hey Mahmoud, good to see you again here :-)
We could probably come up with a workaround for you using command executor or custom ffmpeg node.
But first one question: are your input files always the same? - especially the audio configuration, tracks and channels.

Final question: mpeg1 is a really, really, really old format. Just for interest, why do you need this? Are you feeding some very old but still running system with it?

Re: Generic MPEG1

Posted: Thu Sep 09, 2021 10:56 am
by Mahmoud Rady
Hey Emcodem,
Goot to see you too.
Yes I'm feeding a very old but still running system with it. I tried custom ffmpeg before but I could't get it work.
The inputs have different framerates and formats and I use somethig like iSkysoft Video Converter and TMPGEnc to output the mpg1 format.

Re: Generic MPEG1

Posted: Thu Sep 09, 2021 12:04 pm
by emcodem
Ok thanks for the infos!

So let's start easy on this. We need to add -bf to the ffmpeg command to get the BVOP flags.

You can use this in a commandline processor. What it does is to automatically use the first track, e.g. the number of audios in the output file depends on the input file's audio config.
Unfortunately it will not encode the "CBR" flag, this does not seem to be possible with ffmpeg anymore.

Code: Select all

"%s_ffmpeg%" -nostdin -hide_banner -analyzeduration 33554432 -i "%s_source%" -shortest -map_metadata -1  -sn  -c:a mp2 -ar 48000 -b:a 128k -vf "colorspace=fast=1:all=bt709:format=yuv422p:ispace=bt709:itrc=bt709:iprimaries=bt709,scale=352:in_h:flags=bilinear:in_range=full:out_range=full,scale=352:288:flags=bicubic:sws_dither=ed:in_range=full:out_range=full,fps=25,colorspace=fast=1:iall=bt709:all=bt709:format=yuv420p,setfield=prog,setdar=16/9,setsar=1" -minrate 1500k -maxrate 1500k -b:v 1500k -c:v mpeg1video -r 25 -color_primaries bt709 -color_trc bt709 -colorspace bt709 -field_order progressive -timecode 00:00:01:11 -aspect 16:9 -max_muxing_queue_size 700 -map_metadata -1 -metadata "creation_time=now" -y -bf 2 "%s_source%_mpeg1.mpeg"
Untitled.png
Untitled.png (21.42 KiB) Viewed 5788 times
Let me know if you could live with this.
@admin maybe a "bframes" option makes sense in the generic mpeg processor

Re: Generic MPEG1

Posted: Mon Sep 13, 2021 4:09 pm
by Mahmoud Rady
no, it's not working

Re: Generic MPEG1

Posted: Mon Sep 13, 2021 4:43 pm
by emcodem
Too bad. We don't have a choice here, ffmpeg just don't support the cbr flag for mpeg1. Mabye @FranceBB can help here with one of his tools?
But, before we go on please allow me the question: what is not working? The commandline i sent you leads to a failed job and you cannot get it to work or the finally produced file is not working on your legacy system?

Re: Generic MPEG1

Posted: Mon Sep 13, 2021 5:18 pm
by FranceBB
Of course I can, with tools coming straight from 2001! xD
Ok, so, I've tried with BBMpeg which is an MPEG-1 encoder which supports Avisynth Script input (8bit only) and although it works, it's only VBR, so then I switched to TMPGEnc, which also supports Avisynth input and by tweaking a few options you can get what you need:

Sample file: https://we.tl/t-0AJqJKtdjo

MediaInfo:

Image
Image

AVS Script:

Code: Select all

ColorBars(352, 288, pixel_type="YV12")

ChangeFPS(25)

Trim(0, 1000)

TMPEGEnc settings:

Image
Image
Image


Cheers,
Frank

Re: Generic MPEG1

Posted: Tue Sep 14, 2021 9:32 am
by Mahmoud Rady
emcodem wrote: Mon Sep 13, 2021 4:43 pm Too bad. We don't have a choice here, ffmpeg just don't support the cbr flag for mpeg1. Mabye @FranceBB can help here with one of his tools?
But, before we go on please allow me the question: what is not working? The commandline i sent you leads to a failed job and you cannot get it to work or the finally produced file is not working on your legacy system?
The output is not working on the system

Re: Generic MPEG1

Posted: Tue Sep 14, 2021 10:12 am
by FranceBB
Dammit. @Emcodem, this one is on you xD

Re: Generic MPEG1

Posted: Tue Sep 14, 2021 10:36 am
by Mahmoud Rady
FranceBB wrote: Mon Sep 13, 2021 5:18 pm Of course I can, with tools coming straight from 2001! xD
Ok, so, I've tried with BBMpeg which is an MPEG-1 encoder which supports Avisynth Script input (8bit only) and although it works, it's only VBR, so then I switched to TMPGEnc, which also supports Avisynth input and by tweaking a few options you can get what you need:


This is what I do now manually for every file… how to get this output using FFastrans?