Generic MPEG1

Questions and answers on how to get the most out of FFAStrans
Mahmoud Rady
Posts: 29
Joined: Tue Sep 17, 2019 10:49 am

Generic MPEG1

Post 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 5807 times
Current setting
FF setting.png
FF setting.png (28.31 KiB) Viewed 5807 times
and the output file is
output now.png
output now.png (36.17 KiB) Viewed 5804 times
thanks in advance.
emcodem
Posts: 1811
Joined: Wed Sep 19, 2018 8:11 am

Re: Generic MPEG1

Post 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?
emcodem, wrapping since 2009 you got the rhyme?
Mahmoud Rady
Posts: 29
Joined: Tue Sep 17, 2019 10:49 am

Re: Generic MPEG1

Post 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.
emcodem
Posts: 1811
Joined: Wed Sep 19, 2018 8:11 am

Re: Generic MPEG1

Post 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 5782 times
Let me know if you could live with this.
@admin maybe a "bframes" option makes sense in the generic mpeg processor
emcodem, wrapping since 2009 you got the rhyme?
Mahmoud Rady
Posts: 29
Joined: Tue Sep 17, 2019 10:49 am

Re: Generic MPEG1

Post by Mahmoud Rady »

no, it's not working
emcodem
Posts: 1811
Joined: Wed Sep 19, 2018 8:11 am

Re: Generic MPEG1

Post 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?
emcodem, wrapping since 2009 you got the rhyme?
User avatar
FranceBB
Posts: 264
Joined: Sat Jun 25, 2016 3:43 pm
Contact:

Re: Generic MPEG1

Post 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
Mahmoud Rady
Posts: 29
Joined: Tue Sep 17, 2019 10:49 am

Re: Generic MPEG1

Post 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
User avatar
FranceBB
Posts: 264
Joined: Sat Jun 25, 2016 3:43 pm
Contact:

Re: Generic MPEG1

Post by FranceBB »

Dammit. @Emcodem, this one is on you xD
Mahmoud Rady
Posts: 29
Joined: Tue Sep 17, 2019 10:49 am

Re: Generic MPEG1

Post 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?
Post Reply