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
zehd
Offline

Posting Freak

Posts: 5,119
Threads: 249
Joined: Feb 2006
#31
2006-05-26, 04:41 AM
drain Wrote:Hmmm, it seems to work fine for me. I changed the script to read your file rather than run ffmpeg like so:
Code:
for /f "eol=; tokens=1 delims=~" %%a in (ffmpegdata.txt) do (
and I get the attached output. The first couple of lines starting with **** are debug lines added to the findvideosize subroutine. I'm not sure how to proceed now. Are you sure you are running the latest incarnation? What OS are you using?

For the purposes of this thread I'm still using 96.12....
XP SP2, updated to the wazoo (windowsupdates)
FFDShow 2006-05-22 (rev. 2546) SSE from
http://www.free-codecs.com/download/FFDShow.htm

Sourceforges latest build is an alpha from 2004
ffdshow's wiki: http://ffdshow.sourceforge.net/tikiwiki/...ng+ffdshow
latest is ffdshow-20051129.exe

the build may be the only thing that might be wrong. Which build are you using. Can you try on your system with the 2006 version?
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]
jbs0902
Offline

Junior Member

Posts: 3
Threads: 1
Joined: Jun 2006
#32
2006-06-06, 05:13 AM (This post was last modified: 2006-06-06, 06:24 AM by jbs0902.)
I had a problem with this BAT file.
Because I thought I had other problems I added the thread here: http://forums.nextpvr.com/showthread.php?p=118275

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.
2) Trans2MVP.bat (this version) dies if your Recordings/Live TV Buffer directory has a space in the pathname. My directory was in "C:\Documents and Settings\..." so the BAT would die at the if "%2"=="" ( line because it got confused about the space. I changed my directories to c:\tmp. No problem.
3) Oh, and I changed all the "ffmpeg ... -r 25" to "ffmepg ... -r 29.97" for NTSC. But since I did that before I got everything working ...

Now Trans2MVP.bat runs mostly correctly. It transcodes. The video plays using the entire screen.

I do have the problem that when I hit "Stop" or "Back/Exit" on the remote while playing a 1st video the transcoding continues and if I play a 2nd video, I get the 1st video. But I'll work on that later.

PS:
I found a solution to the "Stop" problem. And by the brutality of the solution you can tell it is late here.

Add the line `pskill.exe -t ffmpeg` to the top of your BAT file (after the echo off).
This assumes you have:
1) downloaded the tool pskill from http://www.sysinternals.com/Utilities/PsKill.html and,
2) put pskill in your PATH

pskill kills any process containing the name ffmpeg. So, the last (stopped) transcoding dies, and then the rest of the batch file runs.
Not nice, but effective.
zehd
Offline

Posting Freak

Posts: 5,119
Threads: 249
Joined: Feb 2006
#33
2006-06-07, 08:34 AM
This thread is really ironing out a lot. I'm looking forward to trying this very last idea on how to kill the previous process after a stop and start of new video.

I wanted to ask something that's open to all reading...

If I use MVPScreenPosition and set the screen to 640/480, why not have the Trans2MVP.bat set the screen res to 640/480 too?

Just wanted to know...

----

PS. I'm thinking of a way to kill the previous MPG file. My idea to kill the previously created MPG files is: In the Trans2MVP, store the output filename to an external text file.

At the beginning to the Trans2MVP, delete all files listed in the file. I know I can make this work, just making time....
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]
zehd
Offline

Posting Freak

Posts: 5,119
Threads: 249
Joined: Feb 2006
#34
2006-06-07, 10:14 AM (This post was last modified: 2006-06-07, 08:39 PM by zehd.)
Here's my two cents...

First of all, the whole pathing error comes from the logic to use a second parameter as an output filepath. I eliminated that logic and hardcoded it to the %temp% directory, same filename, but with an mpg extension.

With the change drive, and change directory, there should be no need to change the system's path...

Second I used jbs0902's idea to kill preceding Transcode (ffmpeg) processes. I used the pskill.exe found at: http://www.sysinternals.com/Utilities/PsKill.html I saved the psKill.exe file into the main gbvr directory.

I moved all of the cleanup logic to its own batch file: CleanUpTrans2MVP.bat

And finally, I recognized that with all the transcoding, there would be a lot of temp mpegs laying around. Everytime Trans2MVP is called it saves an output file filespec to a temp text file...

Then, at the beginning of Trans2MVP (the cleaning up part) it calls CleanUpTrans2MVP.bat which kills the ffmpeg processes and then deletes every filespec found in the temp text file created previously.

Also, just to make it a bit easier on the text editing, I added a variable so you can change the 'frame rate' only once... NTSC 29.97 or PAL 25

[ATTACHMENT NOT FOUND]

[ATTACHMENT NOT FOUND]
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]
zehd
Offline

Posting Freak

Posts: 5,119
Threads: 249
Joined: Feb 2006
#35
2006-06-07, 08:50 PM
ARRRRGH! Please disregard my last message. At least for me, it down't work.

The theory's good, But I just can't get GB-PVR to play the avi-transcoded-to-MPG to play very well. The transcoded file plays right. just not on the fly...

If I use the built in Transcoding using ffmpeg, I get a slightly squished picture at the top. I'm sure I'm missing a bit at the top too.

It seems that switching between Hauppauge and GBPVR is the only way I get this working right...
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]
HtV
Offline

Posting Freak

Posts: 3,470
Threads: 46
Joined: Dec 2005
#36
2006-06-07, 09:23 PM
Quote:The transcoded file plays right. just not on the fly...

Probably too little cpu-power, GBPVR used to transcode to something like 350x280, but in the new trans2mvp.bats it transcodes to dvd-specs, 720x480 or even more for pal. i tried on my system but it I couldn't get it to run on the fly, but run alone it would do it in about real time.

Quote:If I use the built in Transcoding using ffmpeg, I get a slightly squished picture at the top. I'm sure I'm missing a bit at the top too.

I think in the last trans2mvp.bats there was some overscan things going on (forgive me for my lousy English). You could change that yourself quite easily.

Quote:
It seems that switching between Hauppauge and GBPVR is the only way I get this working right
For on the fly encoding you are probably right, when encoding seperately I think there are still quite some options to explore. One thing that makes it more difficult is the vary-ing quality of avi's, a lot of timeline errors, strange resoultions, etc etc.
AMD Athlon 64 3000, HDD: 80, 120, 200 GB, Hauppauge 350 + 150, MVP, Asus 6000L Laptop client, Asus X50sl client,
Fritz!box 7140 modem/router, GBPVR 1.3.7.
HtV
Offline

Posting Freak

Posts: 3,470
Threads: 46
Joined: Dec 2005
#37
2006-06-07, 09:28 PM
Just to add:
I haven't tried your scripts and solutions yet, I haven't got the time and when Ihave the time the computer is occupied, by a 17 year old busy for her last test of the year, doing home workvia MSNRolleyes However I must say she is doing very well.
AMD Athlon 64 3000, HDD: 80, 120, 200 GB, Hauppauge 350 + 150, MVP, Asus 6000L Laptop client, Asus X50sl client,
Fritz!box 7140 modem/router, GBPVR 1.3.7.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,686
Threads: 767
Joined: Nov 2003
#38
2006-06-07, 09:43 PM
Yes, I agree, its almost certainly a matter of your CPU not quite being able to do it in real time.
zehd
Offline

Posting Freak

Posts: 5,119
Threads: 249
Joined: Feb 2006
#39
2006-06-08, 09:55 AM
I was really thinking that a 2.0ghz machine should be ok..
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]
zehd
Offline

Posting Freak

Posts: 5,119
Threads: 249
Joined: Feb 2006
#40
2006-06-08, 10:14 AM
HtV Wrote:...but in the new trans2mvp.bats...

Which ones, these ones from this thread? Yeah I've been comparing the code from these batch files and the cmdline sub has in the config.xml.

I even started with smaller numbers than 720x480...


[quote] I think in the last trans2mvp.bats there was some overscan things going on (forgive me for my lousy English). You could change that yourself quite easily.[/quote ]

My problem I guess, is not really understanding resolution and aspect ratios...

I mean you record an mpeg, (by default) it's stored as 720x480... It plays back at 4x3...

You get an avi which is say 512x288 which is inherently 16x9. If you blow up the file to have 720 x 405 (I think rounded down to 404) that should mean that I should pad the picture with 38 on top and bottom...

Yeah that should work, right....
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]
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

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


Possibly Related Threads…
Thread Author Replies Views Last Post
  MVP transcoding? dinki 12 9,296 2014-02-03, 09:35 PM
Last Post: mvallevand
  Change FFMPEG commandline Astraeus 5 3,479 2012-01-22, 06:49 PM
Last Post: mvallevand
  LiveTV & ffmpeg MVP playback stops pvruser 4 3,291 2009-02-27, 10:44 PM
Last Post: Bobins
  MVP Transcoding drbenjamin 1 1,717 2008-12-01, 06:07 AM
Last Post: mvallevand
  MVP transcoding with TS Mux daneo 0 1,460 2008-11-09, 09:20 AM
Last Post: daneo
  Transcoding files times out before they begin Zato 3 2,185 2008-10-13, 04:01 AM
Last Post: Zato
  Any way to automatically save MPG output file when transcoding jonrigg68 2 2,125 2008-06-27, 04:14 PM
Last Post: HtV
  MVP TS transcoding config.xml bug. BerkA 1 1,993 2008-06-07, 11:47 AM
Last Post: sub
  Transcoding causes pc to shut down jonrigg68 5 2,524 2008-06-07, 11:04 AM
Last Post: psycik
  MVP problems (Live TV/transcoding) natty 5 2,648 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