NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Other Clients Old Stuff (legacy) MVP & NMT v
« Previous 1 … 63 64 65 66 67 … 115 Next »
Maintaining aspect ratio with ffmpeg transcoding

 
  • 0 Vote(s) - 0 Average
Maintaining aspect ratio with ffmpeg transcoding
SuMo
Offline

Senior Member

Posts: 371
Threads: 13
Joined: May 2006
#51
2006-07-02, 09:25 PM (This post was last modified: 2006-07-03, 08:00 PM by SuMo.)
Would it be possible to include .srt or .ssa (subtitle) files in the transcoding using this batch file ( by enabeling the sub parameter or something)?
As far as I know FFmpeg can handle different types of subs
Since the timing of subtitles isn't working right in gbpvr, it would be great if it was hardcoded in the transcoded mpg.

jbs0902 Wrote:I had a problem with this BAT file.

Basically Trans2MVP.bat was dieing on me everytime I ran it.

What I found is the following.

My problem was two fold.
1) I needed to add ffmeg to my PATH (via the Sytem Control Panel & reboot). cd'ing to the directory was not sufficent.

What do you mean by "add ffmpeg to my PATH" ?

when using ffmpeg for "on the fly" transcoding, the MVP crashes. there was a space in the pathname that I removed, so the next option would be that PATH thing..........
SuMo
Offline

Senior Member

Posts: 371
Threads: 13
Joined: May 2006
#52
2006-07-04, 02:38 PM
SuMo Wrote:Would it be possible to include .srt or .ssa (subtitle) files in the transcoding using this batch file ( by enabeling the sub parameter or something)?

Hmm, been snooping around at soundforge and at createphpbb.com. seekin' for anwers, ffmpeg does NOT support subtitle files.Sad ffmpegX (for the apple) does.
tstngry
Offline

Junior Member

Posts: 15
Threads: 4
Joined: Jun 2006
#53
2006-07-05, 05:49 AM
- Your worry about subtitles lol, i still haven't got it working. If anyone has a setup that works please let me know, idk which of the .bat files to use from this topic. I dont mind if i have to weird things to get it to work either. Peace ;t
zehd
Offline

Posting Freak

Posts: 5,119
Threads: 249
Joined: Feb 2006
#54
2006-07-05, 08:19 AM (This post was last modified: 2006-07-05, 08:28 AM by zehd.)
OK, first off, I reckon some of this info applies to NTSC and MVP rev H2. That's what I have..

I'll first summarize this thread and give you a couple of hints that I learned, at least to test. If you are using PAL, I may still be able to help too.

Basically, GB-PVR can't show AVIs on the MVP. It needs them in MPG form. We need to convert them on the fly...

There were a couple of batch files that a couple of guys wrote (quite ingenious I might add) that took an avi video, calculated its dimensions and added padding around it so that the apsect ratio of the input video was preserved in the Output video.

My biggest problem was to find the correct Output dimensions of the file, so that the MVP would display a 4x3, and not squish everything to the top.

Finally, I wrote a program I'll be releasing shortly, once I get it documented, that will make the troubleshooting of the sizing for the MVP very easy indeed...

But for now, to give you hope here's some manula stuff you can try...

First, back up you config.xml

Find these two lines, confirm the True and False

<MVPTranscodeUseFFDSHOW>false</MVPTranscodeUseFFDSHOW>
<MVPTranscodeUsingFFmpeg>true</MVPTranscodeUsingFFmpeg>

The 'Using FFMPeg = true' tells GBPVR to call FFMeg directly, and does not use a Trans2mvp.bat or trans2mvp.exe...

Next Check out these lines. (Back them up if you haven't already...)


<MVPFFmpegTranscodeCmdLinePAL>-y -i "{SOURCE_FILE}" {SEEK_CMD} -b 2400 -ac 2 -ab 224 -r 25 -s 352x288 -f svcd "{DEST_FILE}"</MVPFFmpegTranscodeCmdLinePAL>

<MVPFFmpegTranscodeCmdLineNTSC>-y -i "{SOURCE_FILE}" {SEEK_CMD} -b 2400 -ac 2 -ab 224 -r 29.97 -s 352x240 -f svcd "{DEST_FILE}"</MVPFFmpegTranscodeCmdLineNTSC>


Change both lines to this:

<MVPFFmpegTranscodeCmdLinePAL>-y -i "{SOURCE_FILE}" {SEEK_CMD} -b 4000 -ac 2 -ab 224 -r 29.97 -s 336x160 -padtop 40 -padbottom 40 -f svcd "{DEST_FILE}"</MVPFFmpegTranscodeCmdLinePAL>

<MVPFFmpegTranscodeCmdLineNTSC>-y -i "{SOURCE_FILE}" {SEEK_CMD} -b 4000 -ac 2 -ab 224 -r 29.97 -s 336x160 -padtop 40 -padbottom 40 -f svcd "{DEST_FILE}"</MVPFFmpegTranscodeCmdLineNTSC>

Note: I've purposely made both lines set to NTSC... These lines use a padding for the top and bottom. But the total Width x Height is actually, 336 x 240 which is actually NOT true 4x3. Go figure!

On my NTSC, Rev H2 this string plays most of my videos, but it doesn't really compensate for strange aspect ratios or even 4x3 files...

Anyway, try these lines out and see if you at least get a better picture then the squished at the top stuff.

If the picture starts, and sort of looks good, then crashes, that's another story....
Frank Z
[COLOR="Gray"]
I used to ask 'why?' Now I just reinstall...
[SIZE="1"]______________________________________________
Author: ZTools: ZProcess, MVPServerChecker; UltraXMLTV Enhancer, Renamer, Manager; [/SIZE]
[/COLOR]
SuMo
Offline

Senior Member

Posts: 371
Threads: 13
Joined: May 2006
#55
2006-07-05, 09:50 AM
Thanx Zehd for the reply.
Can hardly wait for your nifty tool/plugin/program or whatever to be released.

It's a pain in the ass to watch these streched movies. Till now I've been using virtualdub to do the padding and hardcode the subs ,the wife won't watch a movie without any subs.... so it's pretty important for the WAF (wife approval factor-> adapted this from somone else on this forum)
I know 'bout the need to transcode an avi to mpg for the MVP to play it.
As someone in this thread said: "so close I can almost smell it" is exactly how I felt when this thread ( and the batch file) kept evolving
Well, I might play around with the settings you described, I'll just have to do the math to get the PAL resolution for this.

Keeping the <MVPTranscodeUsingFFmpeg>true</MVPTranscodeUsingFFmpeg>
and a shortcut of the trans2mvp.bat on the desktop to drop the avi on so a minute later I can start to watch the transcoded part while the trans2mvp keeps running works great....but no subs though.

Oh well.....................
SuMo
Offline

Senior Member

Posts: 371
Threads: 13
Joined: May 2006
#56
2006-07-05, 09:59 AM (This post was last modified: 2006-07-05, 10:26 AM by SuMo.)
tstngry Wrote:- Your worry about subtitles lol, i still haven't got it working. If anyone has a setup that works please let me know, idk which of the .bat files to use from this topic. I dont mind if i have to weird things to get it to work either. Peace ;t


Yeah I know... subs are a definite a "must" to get the wife of my back for spending time on this project.

I've used the batch file before the last one 'cause this outputs the transcoded file to the same dir as the original.
On the fly transcoding doesn't work on my setup though.
zehd
Offline

Posting Freak

Posts: 5,119
Threads: 249
Joined: Feb 2006
#57
2006-07-05, 12:02 PM (This post was last modified: 2006-07-05, 12:06 PM by zehd.)
In a way I'm happy you're in the Netherlands (Have some Dutch blood in me, BTW)

I can nail down the settings for PAL. Try 336x288 for the Output

Oh and BTW, I'm sorry to say, but I don't think my program will have anything to do with subtitles. It's really just a front end for some existing batch files. If ffmpeg can't do it, then I can't do it.

I understand that ffdshow can do it, and it can be used as a codec for/with ffmpeg, but so far that's completely out of my ability...

My basic reason for the program was to make configuration and troubleshooting easier for setting up the MVP. Sorry if I raised your hopes.
Frank Z
[COLOR="Gray"]
I used to ask 'why?' Now I just reinstall...
[SIZE="1"]______________________________________________
Author: ZTools: ZProcess, MVPServerChecker; UltraXMLTV Enhancer, Renamer, Manager; [/SIZE]
[/COLOR]
SuMo
Offline

Senior Member

Posts: 371
Threads: 13
Joined: May 2006
#58
2006-07-05, 02:06 PM (This post was last modified: 2006-07-05, 06:12 PM by SuMo.)
Wow... dutch blood all the way in Canada... impressive. Ever planning on visiting Holland ?

You didn't put my hopes up to high 'cause I already figured out that ffmpeg doesn't handle sub files, ffmpegX does, and as far as I know it's the same sourcecode...bummer.... well enough of that.
Still am very curious about your program.

ffdshow has it's own problems from what I've read. so I'll leave it for the time being.

On the other hand, sub's intention is to fix the .srt subtitle file timing in the next release. So with your program and this fix.....
It's getting better by the minute !
-[Arjan]-
___________________________
[SIZE="1"]-I'm not a pessimist, just realistic- :p[/SIZE]
tstngry
Offline

Junior Member

Posts: 15
Threads: 4
Joined: Jun 2006
#59
2006-07-06, 05:57 AM
@SuMo - Hadn't considered the wife factor lol, I am only trying to please myself (that sounded wrong).

@zehd - I did what you suggested in the config and now instead of 1/2 I get 2/3 of the screen. Also the sound is delayed (or advanced, can't tell which), but that would be a smaller problem I imagine. I would be fine with pre-encoding them, my computer is pretty fast, but idk what dimensions would work for my T.V. It might just be all on my end, and not the typical problem because I also have a small problem with the display of Live TV on my TV, it crops a small portion of the right side. Anyway I am always here to try w.e. expiriments u wish me too, keep up the good work. Thanks & Peace.
SuMo
Offline

Senior Member

Posts: 371
Threads: 13
Joined: May 2006
#60
2006-07-06, 07:40 AM
Here's the one I'm using. The output dimensions are set for PAL so if you're using NTSC you'll have to change this.

set outputxsize=720
set outputysize=576
set border_top=24
set border_bottom=24

Also to cut down on the CPU usage you can change the bitrate from 4000 to 2000, it still looks OK but that's up to you.

ffmpeg -y -i %inputfile% -b 4000 -ac 2 -ab 224 -r 25 -s %outputxsize%x%newysize% -padtop %padding% -padbottom %padding% -f svcd %outputfile%
goto end

Copy the trans2mvp.bat in /gbprv root. create a shortcut on your desktop en drop the divx file you want to transcode on it. Off you go.
The transcoded .mpg file will be in the same dir as the original.

I can even start to watch it after a minute or so, as long as the transcoding keeps ahead of the playhead.

Hope this will help
-[Arjan]-
___________________________
[SIZE="1"]-I'm not a pessimist, just realistic- :p[/SIZE]
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (8): « Previous 1 … 4 5 6 7 8 Next »
Jump to page 


Possibly Related Threads…
Thread Author Replies Views Last Post
  MVP transcoding? dinki 12 9,309 2014-02-03, 09:35 PM
Last Post: mvallevand
  Change FFMPEG commandline Astraeus 5 3,502 2012-01-22, 06:49 PM
Last Post: mvallevand
  LiveTV & ffmpeg MVP playback stops pvruser 4 3,306 2009-02-27, 10:44 PM
Last Post: Bobins
  MVP Transcoding drbenjamin 1 1,725 2008-12-01, 06:07 AM
Last Post: mvallevand
  MVP transcoding with TS Mux daneo 0 1,466 2008-11-09, 09:20 AM
Last Post: daneo
  Transcoding files times out before they begin Zato 3 2,194 2008-10-13, 04:01 AM
Last Post: Zato
  Any way to automatically save MPG output file when transcoding jonrigg68 2 2,140 2008-06-27, 04:14 PM
Last Post: HtV
  MVP TS transcoding config.xml bug. BerkA 1 1,999 2008-06-07, 11:47 AM
Last Post: sub
  Transcoding causes pc to shut down jonrigg68 5 2,535 2008-06-07, 11:04 AM
Last Post: psycik
  MVP problems (Live TV/transcoding) natty 5 2,655 2008-04-11, 06:57 PM
Last Post: sub

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode